@react-aria/dnd 3.4.2-nightly.4153 → 3.4.2-nightly.4162

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/import.mjs CHANGED
@@ -84,12 +84,12 @@ const $103790afe9474d1c$export$f8fc6581787339b3 = "application/octet-stream";
84
84
  const $7252cd45fc48c07c$export$dfdf5deeaf27473f = new WeakMap();
85
85
  const $7252cd45fc48c07c$export$990fced5dfac2637 = Symbol();
86
86
  function $7252cd45fc48c07c$export$3093291712f09a77(state) {
87
- let { id: id } = $7252cd45fc48c07c$export$dfdf5deeaf27473f.get(state);
87
+ let { id: id } = $7252cd45fc48c07c$export$dfdf5deeaf27473f.get(state);
88
88
  if (!id) throw new Error("Droppable item outside a droppable collection");
89
89
  return id;
90
90
  }
91
91
  function $7252cd45fc48c07c$export$7e397efd01d3db27(state) {
92
- let { ref: ref } = $7252cd45fc48c07c$export$dfdf5deeaf27473f.get(state);
92
+ let { ref: ref } = $7252cd45fc48c07c$export$dfdf5deeaf27473f.get(state);
93
93
  if (!ref) throw new Error("Droppable item outside a droppable collection");
94
94
  return ref;
95
95
  }
@@ -306,7 +306,7 @@ function $7252cd45fc48c07c$export$6c10d32b362bfa5f(state) {
306
306
  $7252cd45fc48c07c$export$6ca6700462636d0b = state;
307
307
  }
308
308
  function $7252cd45fc48c07c$export$78bf638634500fa5(ref) {
309
- let { draggingCollectionRef: draggingCollectionRef , dropCollectionRef: dropCollectionRef } = $7252cd45fc48c07c$export$6ca6700462636d0b;
309
+ let { draggingCollectionRef: draggingCollectionRef, dropCollectionRef: dropCollectionRef } = $7252cd45fc48c07c$export$6ca6700462636d0b;
310
310
  return (draggingCollectionRef === null || draggingCollectionRef === void 0 ? void 0 : draggingCollectionRef.current) != null && draggingCollectionRef.current === ((ref === null || ref === void 0 ? void 0 : ref.current) || (dropCollectionRef === null || dropCollectionRef === void 0 ? void 0 : dropCollectionRef.current));
311
311
  }
312
312
  let $7252cd45fc48c07c$export$8e6636520ac15722;
@@ -2311,7 +2311,7 @@ const $8253ed7ece74b463$var$MESSAGES = {
2311
2311
  }
2312
2312
  };
2313
2313
  function $8253ed7ece74b463$export$7941f8aafa4b6021(options) {
2314
- let { hasDragButton: hasDragButton } = options;
2314
+ let { hasDragButton: hasDragButton } = options;
2315
2315
  let stringFormatter = (0, $fP8tg$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($865c2eb7c00a83f1$exports))));
2316
2316
  let state = (0, $fP8tg$useRef)({
2317
2317
  options: options,
@@ -2325,7 +2325,7 @@ function $8253ed7ece74b463$export$7941f8aafa4b6021(options) {
2325
2325
  isDraggingRef.current = isDragging;
2326
2326
  setDraggingState(isDragging);
2327
2327
  };
2328
- let { addGlobalListener: addGlobalListener , removeAllGlobalListeners: removeAllGlobalListeners } = (0, $fP8tg$useGlobalListeners)();
2328
+ let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $fP8tg$useGlobalListeners)();
2329
2329
  let modalityOnPointerDown = (0, $fP8tg$useRef)(null);
2330
2330
  let onDragStart = (e)=>{
2331
2331
  var _options_preview;
@@ -2595,7 +2595,7 @@ function $224594fe3e57ff1e$export$62447ad3d2ec7da6() {
2595
2595
 
2596
2596
  const $5c06e4929e123553$var$DROP_ACTIVATE_TIMEOUT = 800;
2597
2597
  function $5c06e4929e123553$export$ccdee5eaf73cf661(options) {
2598
- let { hasDropButton: hasDropButton } = options;
2598
+ let { hasDropButton: hasDropButton } = options;
2599
2599
  let [isDropTarget, setDropTarget] = (0, $fP8tg$useState)(false);
2600
2600
  let state = (0, $fP8tg$useRef)({
2601
2601
  x: 0,
@@ -2767,7 +2767,7 @@ function $5c06e4929e123553$export$ccdee5eaf73cf661(options) {
2767
2767
  if (options.getDropOperation) return options.getDropOperation(types, allowedOperations);
2768
2768
  return allowedOperations[0];
2769
2769
  });
2770
- let { ref: ref } = options;
2770
+ let { ref: ref } = options;
2771
2771
  (0, $fP8tg$useLayoutEffect)(()=>$67560de7c78cb232$export$c28d9fb4a54e471a({
2772
2772
  element: ref.current,
2773
2773
  getDropOperation: getDropOperationKeyboard,
@@ -2789,7 +2789,7 @@ function $5c06e4929e123553$export$ccdee5eaf73cf661(options) {
2789
2789
  onKeyboardDrop,
2790
2790
  onDropActivate
2791
2791
  ]);
2792
- let { dropProps: dropProps } = (0, $224594fe3e57ff1e$export$62447ad3d2ec7da6)();
2792
+ let { dropProps: dropProps } = (0, $224594fe3e57ff1e$export$62447ad3d2ec7da6)();
2793
2793
  return {
2794
2794
  dropProps: {
2795
2795
  ...!hasDropButton && dropProps,
@@ -2960,10 +2960,10 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
2960
2960
  localState.props = props;
2961
2961
  localState.state = state;
2962
2962
  let defaultOnDrop = (0, $fP8tg$useCallback)(async (e)=>{
2963
- let { onInsert: onInsert , onRootDrop: onRootDrop , onItemDrop: onItemDrop , onReorder: onReorder , acceptedDragTypes: acceptedDragTypes = "all" , shouldAcceptItemDrop: shouldAcceptItemDrop } = localState.props;
2964
- let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
2963
+ let { onInsert: onInsert, onRootDrop: onRootDrop, onItemDrop: onItemDrop, onReorder: onReorder, acceptedDragTypes: acceptedDragTypes = "all", shouldAcceptItemDrop: shouldAcceptItemDrop } = localState.props;
2964
+ let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
2965
2965
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(ref);
2966
- let { target: target , dropOperation: dropOperation , items: items } = e;
2966
+ let { target: target, dropOperation: dropOperation, items: items } = e;
2967
2967
  let filteredItems = items;
2968
2968
  if (acceptedDragTypes !== "all" || shouldAcceptItemDrop) filteredItems = items.filter((item)=>{
2969
2969
  let itemTypes;
@@ -3012,7 +3012,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3012
3012
  ref
3013
3013
  ]);
3014
3014
  let autoScroll = (0, $80d9daea3067eff3$export$6323452ca4533ed8)(ref);
3015
- let { dropProps: dropProps } = (0, $5c06e4929e123553$export$ccdee5eaf73cf661)({
3015
+ let { dropProps: dropProps } = (0, $5c06e4929e123553$export$ccdee5eaf73cf661)({
3016
3016
  ref: ref,
3017
3017
  onDropEnter () {
3018
3018
  state.setTarget(localState.nextTarget);
@@ -3022,7 +3022,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3022
3022
  autoScroll.move(e.x, e.y);
3023
3023
  },
3024
3024
  getDropOperationForPoint (types, allowedOperations, x, y) {
3025
- let { draggingKeys: draggingKeys , dropCollectionRef: dropCollectionRef } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3025
+ let { draggingKeys: draggingKeys, dropCollectionRef: dropCollectionRef } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3026
3026
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(ref);
3027
3027
  let isValidDropTarget = (target)=>state.getDropOperation({
3028
3028
  target: target,
@@ -3086,14 +3086,14 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3086
3086
  if (state.target) onDrop(e, state.target);
3087
3087
  // If there wasn't a collection being tracked as a dragged collection, then we are in a case where a non RSP drag is dropped on a
3088
3088
  // RSP collection and thus we don't need to preserve the global DnD state for onDragEnd
3089
- let { draggingCollectionRef: draggingCollectionRef } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3089
+ let { draggingCollectionRef: draggingCollectionRef } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3090
3090
  if (draggingCollectionRef == null) (0, $7252cd45fc48c07c$export$70936501603e6c57)();
3091
3091
  }
3092
3092
  });
3093
3093
  let droppingState = (0, $fP8tg$useRef)(null);
3094
3094
  let onDrop = (0, $fP8tg$useCallback)((e, target)=>{
3095
3095
  var _state_collection_getItem;
3096
- let { state: state } = localState;
3096
+ let { state: state } = localState;
3097
3097
  // Focus the collection.
3098
3098
  state.selectionManager.setFocused(true);
3099
3099
  // Save some state of the collection/selection before the drop occurs so we can compare later.
@@ -3126,7 +3126,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3126
3126
  // If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
3127
3127
  // focus that item and show the focus ring to give the user feedback that the drop occurred.
3128
3128
  // Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
3129
- let { state: state } = localState;
3129
+ let { state: state } = localState;
3130
3130
  if (target.type === "item" && target.dropPosition === "on" && state.collection.getItem(target.key) != null) {
3131
3131
  state.selectionManager.setFocusedKey(target.key);
3132
3132
  state.selectionManager.setFocused(true);
@@ -3166,13 +3166,13 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3166
3166
  droppingState.current = null;
3167
3167
  }
3168
3168
  });
3169
- let { direction: direction } = (0, $fP8tg$useLocale)();
3169
+ let { direction: direction } = (0, $fP8tg$useLocale)();
3170
3170
  (0, $fP8tg$useEffect)(()=>{
3171
3171
  let getNextTarget = (target, wrap = true, horizontal = false)=>{
3172
3172
  if (!target) return {
3173
3173
  type: "root"
3174
3174
  };
3175
- let { keyboardDelegate: keyboardDelegate } = localState.props;
3175
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
3176
3176
  let nextKey;
3177
3177
  if ((target === null || target === void 0 ? void 0 : target.type) === "item") nextKey = horizontal ? keyboardDelegate.getKeyRightOf(target.key) : keyboardDelegate.getKeyBelow(target.key);
3178
3178
  else nextKey = horizontal && direction === "rtl" ? keyboardDelegate.getLastKey() : keyboardDelegate.getFirstKey();
@@ -3209,7 +3209,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3209
3209
  };
3210
3210
  };
3211
3211
  let getPreviousTarget = (target, wrap = true, horizontal = false)=>{
3212
- let { keyboardDelegate: keyboardDelegate } = localState.props;
3212
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
3213
3213
  let nextKey;
3214
3214
  if ((target === null || target === void 0 ? void 0 : target.type) === "item") nextKey = horizontal ? keyboardDelegate.getKeyLeftOf(target.key) : keyboardDelegate.getKeyAbove(target.key);
3215
3215
  else nextKey = horizontal && direction === "rtl" ? keyboardDelegate.getFirstKey() : keyboardDelegate.getLastKey();
@@ -3248,7 +3248,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3248
3248
  let nextValidTarget = (target, types, allowedDropOperations, getNextTarget, wrap = true)=>{
3249
3249
  let seenRoot = 0;
3250
3250
  let operation;
3251
- let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3251
+ let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3252
3252
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(ref);
3253
3253
  do {
3254
3254
  let nextTarget = getNextTarget(target, wrap);
@@ -3270,7 +3270,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3270
3270
  element: ref.current,
3271
3271
  getDropOperation (types, allowedOperations) {
3272
3272
  if (localState.state.target) {
3273
- let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3273
+ let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3274
3274
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(ref);
3275
3275
  return localState.state.getDropOperation({
3276
3276
  target: localState.state.target,
@@ -3313,7 +3313,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3313
3313
  key: key,
3314
3314
  dropPosition: dropPosition
3315
3315
  };
3316
- let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3316
+ let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3317
3317
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(ref);
3318
3318
  var _nextValidTarget;
3319
3319
  // If the default target is not valid, find the next one that is.
@@ -3350,7 +3350,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3350
3350
  if (localState.state.target) onDrop(e, target || localState.state.target);
3351
3351
  },
3352
3352
  onKeyDown (e, drag) {
3353
- let { keyboardDelegate: keyboardDelegate } = localState.props;
3353
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
3354
3354
  let types = (0, $7252cd45fc48c07c$export$e1d41611756c6326)(drag.items);
3355
3355
  switch(e.key){
3356
3356
  case "ArrowDown":
@@ -3409,7 +3409,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3409
3409
  };
3410
3410
  // If the target does not accept the drop, find the next valid target.
3411
3411
  // If no next valid target, find the previous valid target.
3412
- let { draggingCollectionRef: draggingCollectionRef , draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3412
+ let { draggingCollectionRef: draggingCollectionRef, draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3413
3413
  let isInternal = (draggingCollectionRef === null || draggingCollectionRef === void 0 ? void 0 : draggingCollectionRef.current) === (ref === null || ref === void 0 ? void 0 : ref.current);
3414
3414
  let operation = localState.state.getDropOperation({
3415
3415
  target: target,
@@ -3449,7 +3449,7 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3449
3449
  }
3450
3450
  // If the target does not accept the drop, find the previous valid target.
3451
3451
  // If no next valid target, find the next valid target.
3452
- let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3452
+ let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3453
3453
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(ref);
3454
3454
  let operation = localState.state.getDropOperation({
3455
3455
  target: target,
@@ -3504,14 +3504,14 @@ function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state, ref) {
3504
3504
 
3505
3505
 
3506
3506
  function $bfaab576ce1c580e$export$f7b0c5d28b66b6a5(options, state, ref) {
3507
- let { dropProps: dropProps } = (0, $224594fe3e57ff1e$export$62447ad3d2ec7da6)();
3507
+ let { dropProps: dropProps } = (0, $224594fe3e57ff1e$export$62447ad3d2ec7da6)();
3508
3508
  let droppableCollectionRef = (0, $7252cd45fc48c07c$export$7e397efd01d3db27)(state);
3509
3509
  (0, $fP8tg$useEffect)(()=>{
3510
3510
  if (ref.current) return $67560de7c78cb232$export$aef80212ac99c003({
3511
3511
  element: ref.current,
3512
3512
  target: options.target,
3513
3513
  getDropOperation (types, allowedOperations) {
3514
- let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3514
+ let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3515
3515
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(droppableCollectionRef);
3516
3516
  return state.getDropOperation({
3517
3517
  target: options.target,
@@ -3529,7 +3529,7 @@ function $bfaab576ce1c580e$export$f7b0c5d28b66b6a5(options, state, ref) {
3529
3529
  droppableCollectionRef
3530
3530
  ]);
3531
3531
  let dragSession = $67560de7c78cb232$export$418e185dd3f1b968();
3532
- let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3532
+ let { draggingKeys: draggingKeys } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3533
3533
  let isInternal = (0, $7252cd45fc48c07c$export$78bf638634500fa5)(droppableCollectionRef);
3534
3534
  let isValidDropTarget = dragSession && state.getDropOperation({
3535
3535
  target: options.target,
@@ -3573,11 +3573,11 @@ function $bfaab576ce1c580e$export$f7b0c5d28b66b6a5(options, state, ref) {
3573
3573
 
3574
3574
 
3575
3575
  function $ddf25448c71fc93a$export$8d0e41d2815afac5(props, state, ref) {
3576
- let { target: target } = props;
3577
- let { collection: collection } = state;
3576
+ let { target: target } = props;
3577
+ let { collection: collection } = state;
3578
3578
  let stringFormatter = (0, $fP8tg$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($865c2eb7c00a83f1$exports))));
3579
3579
  let dragSession = $67560de7c78cb232$export$418e185dd3f1b968();
3580
- let { dropProps: dropProps } = (0, $bfaab576ce1c580e$export$f7b0c5d28b66b6a5)(props, state, ref);
3580
+ let { dropProps: dropProps } = (0, $bfaab576ce1c580e$export$f7b0c5d28b66b6a5)(props, state, ref);
3581
3581
  let id = (0, $fP8tg$useId)();
3582
3582
  var _collection_getTextValue;
3583
3583
  let getText = (key)=>{
@@ -3663,7 +3663,7 @@ const $fd98cf7cbf233429$var$MESSAGES = {
3663
3663
  function $fd98cf7cbf233429$export$b35afafff42da2d9(props, state) {
3664
3664
  let stringFormatter = (0, $fP8tg$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($865c2eb7c00a83f1$exports))));
3665
3665
  let isDisabled = state.selectionManager.isDisabled(props.key);
3666
- let { dragProps: dragProps , dragButtonProps: dragButtonProps } = (0, $8253ed7ece74b463$export$7941f8aafa4b6021)({
3666
+ let { dragProps: dragProps, dragButtonProps: dragButtonProps } = (0, $8253ed7ece74b463$export$7941f8aafa4b6021)({
3667
3667
  getItems () {
3668
3668
  return state.getItems(props.key);
3669
3669
  },
@@ -3679,7 +3679,7 @@ function $fd98cf7cbf233429$export$b35afafff42da2d9(props, state) {
3679
3679
  state.moveDrag(e);
3680
3680
  },
3681
3681
  onDragEnd (e) {
3682
- let { dropOperation: dropOperation } = e;
3682
+ let { dropOperation: dropOperation } = e;
3683
3683
  let isInternal = dropOperation === "cancel" ? false : (0, $7252cd45fc48c07c$export$78bf638634500fa5)();
3684
3684
  state.endDrag({
3685
3685
  ...e,
@@ -3720,7 +3720,7 @@ function $fd98cf7cbf233429$export$b35afafff42da2d9(props, state) {
3720
3720
  let descriptionProps = (0, $fP8tg$useDescription)(description);
3721
3721
  if (description) Object.assign(dragProps, descriptionProps);
3722
3722
  if (!props.hasDragButton && props.hasAction) {
3723
- let { onKeyDownCapture: onKeyDownCapture , onKeyUpCapture: onKeyUpCapture } = dragProps;
3723
+ let { onKeyDownCapture: onKeyDownCapture, onKeyUpCapture: onKeyUpCapture } = dragProps;
3724
3724
  if (modality === "touch") // Remove long press description if an action is present, because in that case long pressing selects the item.
3725
3725
  delete dragProps["aria-describedby"];
3726
3726
  // Require Alt key if there is a conflicting action.
@@ -3755,7 +3755,7 @@ function $fd98cf7cbf233429$export$b35afafff42da2d9(props, state) {
3755
3755
  */
3756
3756
  function $4ac1fdc3a0fcd564$export$2962a7984b2f0a80(props, state, ref) {
3757
3757
  // Update global DnD state if this keys within this collection are dragged
3758
- let { draggingCollectionRef: draggingCollectionRef } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3758
+ let { draggingCollectionRef: draggingCollectionRef } = (0, $7252cd45fc48c07c$export$6ca6700462636d0b);
3759
3759
  if (state.draggingKeys.size > 0 && (draggingCollectionRef === null || draggingCollectionRef === void 0 ? void 0 : draggingCollectionRef.current) !== ref.current) (0, $7252cd45fc48c07c$export$f2be18a910c0caa6)(ref);
3760
3760
  }
3761
3761
 
@@ -3800,7 +3800,7 @@ function $9fcc7f0d70d084ee$var$addGlobalEventListener(event, fn) {
3800
3800
  }
3801
3801
  function $9fcc7f0d70d084ee$export$2314ca2a3e892862(options) {
3802
3802
  let isFocusedRef = (0, $fP8tg$useRef)(false);
3803
- let { focusProps: focusProps } = (0, $fP8tg$useFocus)({
3803
+ let { focusProps: focusProps } = (0, $fP8tg$useFocus)({
3804
3804
  onFocusChange: (isFocused)=>{
3805
3805
  isFocusedRef.current = isFocused;
3806
3806
  }
package/dist/main.js CHANGED
@@ -103,12 +103,12 @@ const $76b1e110a27b1ccd$export$f8fc6581787339b3 = "application/octet-stream";
103
103
  const $4620ae0dc40f0031$export$dfdf5deeaf27473f = new WeakMap();
104
104
  const $4620ae0dc40f0031$export$990fced5dfac2637 = Symbol();
105
105
  function $4620ae0dc40f0031$export$3093291712f09a77(state) {
106
- let { id: id } = $4620ae0dc40f0031$export$dfdf5deeaf27473f.get(state);
106
+ let { id: id } = $4620ae0dc40f0031$export$dfdf5deeaf27473f.get(state);
107
107
  if (!id) throw new Error("Droppable item outside a droppable collection");
108
108
  return id;
109
109
  }
110
110
  function $4620ae0dc40f0031$export$7e397efd01d3db27(state) {
111
- let { ref: ref } = $4620ae0dc40f0031$export$dfdf5deeaf27473f.get(state);
111
+ let { ref: ref } = $4620ae0dc40f0031$export$dfdf5deeaf27473f.get(state);
112
112
  if (!ref) throw new Error("Droppable item outside a droppable collection");
113
113
  return ref;
114
114
  }
@@ -325,7 +325,7 @@ function $4620ae0dc40f0031$export$6c10d32b362bfa5f(state) {
325
325
  $4620ae0dc40f0031$export$6ca6700462636d0b = state;
326
326
  }
327
327
  function $4620ae0dc40f0031$export$78bf638634500fa5(ref) {
328
- let { draggingCollectionRef: draggingCollectionRef , dropCollectionRef: dropCollectionRef } = $4620ae0dc40f0031$export$6ca6700462636d0b;
328
+ let { draggingCollectionRef: draggingCollectionRef, dropCollectionRef: dropCollectionRef } = $4620ae0dc40f0031$export$6ca6700462636d0b;
329
329
  return (draggingCollectionRef === null || draggingCollectionRef === void 0 ? void 0 : draggingCollectionRef.current) != null && draggingCollectionRef.current === ((ref === null || ref === void 0 ? void 0 : ref.current) || (dropCollectionRef === null || dropCollectionRef === void 0 ? void 0 : dropCollectionRef.current));
330
330
  }
331
331
  let $4620ae0dc40f0031$export$8e6636520ac15722;
@@ -2330,7 +2330,7 @@ const $dc204e8ec58447a6$var$MESSAGES = {
2330
2330
  }
2331
2331
  };
2332
2332
  function $dc204e8ec58447a6$export$7941f8aafa4b6021(options) {
2333
- let { hasDragButton: hasDragButton } = options;
2333
+ let { hasDragButton: hasDragButton } = options;
2334
2334
  let stringFormatter = (0, $4vY0V$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($7c8adf3925a26206$exports))));
2335
2335
  let state = (0, $4vY0V$react.useRef)({
2336
2336
  options: options,
@@ -2344,7 +2344,7 @@ function $dc204e8ec58447a6$export$7941f8aafa4b6021(options) {
2344
2344
  isDraggingRef.current = isDragging;
2345
2345
  setDraggingState(isDragging);
2346
2346
  };
2347
- let { addGlobalListener: addGlobalListener , removeAllGlobalListeners: removeAllGlobalListeners } = (0, $4vY0V$reactariautils.useGlobalListeners)();
2347
+ let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $4vY0V$reactariautils.useGlobalListeners)();
2348
2348
  let modalityOnPointerDown = (0, $4vY0V$react.useRef)(null);
2349
2349
  let onDragStart = (e)=>{
2350
2350
  var _options_preview;
@@ -2614,7 +2614,7 @@ function $419982e205c8e8dc$export$62447ad3d2ec7da6() {
2614
2614
 
2615
2615
  const $1ca228bc9257ca16$var$DROP_ACTIVATE_TIMEOUT = 800;
2616
2616
  function $1ca228bc9257ca16$export$ccdee5eaf73cf661(options) {
2617
- let { hasDropButton: hasDropButton } = options;
2617
+ let { hasDropButton: hasDropButton } = options;
2618
2618
  let [isDropTarget, setDropTarget] = (0, $4vY0V$react.useState)(false);
2619
2619
  let state = (0, $4vY0V$react.useRef)({
2620
2620
  x: 0,
@@ -2786,7 +2786,7 @@ function $1ca228bc9257ca16$export$ccdee5eaf73cf661(options) {
2786
2786
  if (options.getDropOperation) return options.getDropOperation(types, allowedOperations);
2787
2787
  return allowedOperations[0];
2788
2788
  });
2789
- let { ref: ref } = options;
2789
+ let { ref: ref } = options;
2790
2790
  (0, $4vY0V$reactariautils.useLayoutEffect)(()=>$28e10663603f5ea1$export$c28d9fb4a54e471a({
2791
2791
  element: ref.current,
2792
2792
  getDropOperation: getDropOperationKeyboard,
@@ -2808,7 +2808,7 @@ function $1ca228bc9257ca16$export$ccdee5eaf73cf661(options) {
2808
2808
  onKeyboardDrop,
2809
2809
  onDropActivate
2810
2810
  ]);
2811
- let { dropProps: dropProps } = (0, $419982e205c8e8dc$export$62447ad3d2ec7da6)();
2811
+ let { dropProps: dropProps } = (0, $419982e205c8e8dc$export$62447ad3d2ec7da6)();
2812
2812
  return {
2813
2813
  dropProps: {
2814
2814
  ...!hasDropButton && dropProps,
@@ -2979,10 +2979,10 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
2979
2979
  localState.props = props;
2980
2980
  localState.state = state;
2981
2981
  let defaultOnDrop = (0, $4vY0V$react.useCallback)(async (e)=>{
2982
- let { onInsert: onInsert , onRootDrop: onRootDrop , onItemDrop: onItemDrop , onReorder: onReorder , acceptedDragTypes: acceptedDragTypes = "all" , shouldAcceptItemDrop: shouldAcceptItemDrop } = localState.props;
2983
- let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
2982
+ let { onInsert: onInsert, onRootDrop: onRootDrop, onItemDrop: onItemDrop, onReorder: onReorder, acceptedDragTypes: acceptedDragTypes = "all", shouldAcceptItemDrop: shouldAcceptItemDrop } = localState.props;
2983
+ let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
2984
2984
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(ref);
2985
- let { target: target , dropOperation: dropOperation , items: items } = e;
2985
+ let { target: target, dropOperation: dropOperation, items: items } = e;
2986
2986
  let filteredItems = items;
2987
2987
  if (acceptedDragTypes !== "all" || shouldAcceptItemDrop) filteredItems = items.filter((item)=>{
2988
2988
  let itemTypes;
@@ -3031,7 +3031,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3031
3031
  ref
3032
3032
  ]);
3033
3033
  let autoScroll = (0, $12cc069a1c69155b$export$6323452ca4533ed8)(ref);
3034
- let { dropProps: dropProps } = (0, $1ca228bc9257ca16$export$ccdee5eaf73cf661)({
3034
+ let { dropProps: dropProps } = (0, $1ca228bc9257ca16$export$ccdee5eaf73cf661)({
3035
3035
  ref: ref,
3036
3036
  onDropEnter () {
3037
3037
  state.setTarget(localState.nextTarget);
@@ -3041,7 +3041,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3041
3041
  autoScroll.move(e.x, e.y);
3042
3042
  },
3043
3043
  getDropOperationForPoint (types, allowedOperations, x, y) {
3044
- let { draggingKeys: draggingKeys , dropCollectionRef: dropCollectionRef } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3044
+ let { draggingKeys: draggingKeys, dropCollectionRef: dropCollectionRef } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3045
3045
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(ref);
3046
3046
  let isValidDropTarget = (target)=>state.getDropOperation({
3047
3047
  target: target,
@@ -3105,14 +3105,14 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3105
3105
  if (state.target) onDrop(e, state.target);
3106
3106
  // If there wasn't a collection being tracked as a dragged collection, then we are in a case where a non RSP drag is dropped on a
3107
3107
  // RSP collection and thus we don't need to preserve the global DnD state for onDragEnd
3108
- let { draggingCollectionRef: draggingCollectionRef } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3108
+ let { draggingCollectionRef: draggingCollectionRef } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3109
3109
  if (draggingCollectionRef == null) (0, $4620ae0dc40f0031$export$70936501603e6c57)();
3110
3110
  }
3111
3111
  });
3112
3112
  let droppingState = (0, $4vY0V$react.useRef)(null);
3113
3113
  let onDrop = (0, $4vY0V$react.useCallback)((e, target)=>{
3114
3114
  var _state_collection_getItem;
3115
- let { state: state } = localState;
3115
+ let { state: state } = localState;
3116
3116
  // Focus the collection.
3117
3117
  state.selectionManager.setFocused(true);
3118
3118
  // Save some state of the collection/selection before the drop occurs so we can compare later.
@@ -3145,7 +3145,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3145
3145
  // If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
3146
3146
  // focus that item and show the focus ring to give the user feedback that the drop occurred.
3147
3147
  // Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
3148
- let { state: state } = localState;
3148
+ let { state: state } = localState;
3149
3149
  if (target.type === "item" && target.dropPosition === "on" && state.collection.getItem(target.key) != null) {
3150
3150
  state.selectionManager.setFocusedKey(target.key);
3151
3151
  state.selectionManager.setFocused(true);
@@ -3185,13 +3185,13 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3185
3185
  droppingState.current = null;
3186
3186
  }
3187
3187
  });
3188
- let { direction: direction } = (0, $4vY0V$reactariai18n.useLocale)();
3188
+ let { direction: direction } = (0, $4vY0V$reactariai18n.useLocale)();
3189
3189
  (0, $4vY0V$react.useEffect)(()=>{
3190
3190
  let getNextTarget = (target, wrap = true, horizontal = false)=>{
3191
3191
  if (!target) return {
3192
3192
  type: "root"
3193
3193
  };
3194
- let { keyboardDelegate: keyboardDelegate } = localState.props;
3194
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
3195
3195
  let nextKey;
3196
3196
  if ((target === null || target === void 0 ? void 0 : target.type) === "item") nextKey = horizontal ? keyboardDelegate.getKeyRightOf(target.key) : keyboardDelegate.getKeyBelow(target.key);
3197
3197
  else nextKey = horizontal && direction === "rtl" ? keyboardDelegate.getLastKey() : keyboardDelegate.getFirstKey();
@@ -3228,7 +3228,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3228
3228
  };
3229
3229
  };
3230
3230
  let getPreviousTarget = (target, wrap = true, horizontal = false)=>{
3231
- let { keyboardDelegate: keyboardDelegate } = localState.props;
3231
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
3232
3232
  let nextKey;
3233
3233
  if ((target === null || target === void 0 ? void 0 : target.type) === "item") nextKey = horizontal ? keyboardDelegate.getKeyLeftOf(target.key) : keyboardDelegate.getKeyAbove(target.key);
3234
3234
  else nextKey = horizontal && direction === "rtl" ? keyboardDelegate.getFirstKey() : keyboardDelegate.getLastKey();
@@ -3267,7 +3267,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3267
3267
  let nextValidTarget = (target, types, allowedDropOperations, getNextTarget, wrap = true)=>{
3268
3268
  let seenRoot = 0;
3269
3269
  let operation;
3270
- let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3270
+ let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3271
3271
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(ref);
3272
3272
  do {
3273
3273
  let nextTarget = getNextTarget(target, wrap);
@@ -3289,7 +3289,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3289
3289
  element: ref.current,
3290
3290
  getDropOperation (types, allowedOperations) {
3291
3291
  if (localState.state.target) {
3292
- let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3292
+ let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3293
3293
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(ref);
3294
3294
  return localState.state.getDropOperation({
3295
3295
  target: localState.state.target,
@@ -3332,7 +3332,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3332
3332
  key: key,
3333
3333
  dropPosition: dropPosition
3334
3334
  };
3335
- let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3335
+ let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3336
3336
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(ref);
3337
3337
  var _nextValidTarget;
3338
3338
  // If the default target is not valid, find the next one that is.
@@ -3369,7 +3369,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3369
3369
  if (localState.state.target) onDrop(e, target || localState.state.target);
3370
3370
  },
3371
3371
  onKeyDown (e, drag) {
3372
- let { keyboardDelegate: keyboardDelegate } = localState.props;
3372
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
3373
3373
  let types = (0, $4620ae0dc40f0031$export$e1d41611756c6326)(drag.items);
3374
3374
  switch(e.key){
3375
3375
  case "ArrowDown":
@@ -3428,7 +3428,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3428
3428
  };
3429
3429
  // If the target does not accept the drop, find the next valid target.
3430
3430
  // If no next valid target, find the previous valid target.
3431
- let { draggingCollectionRef: draggingCollectionRef , draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3431
+ let { draggingCollectionRef: draggingCollectionRef, draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3432
3432
  let isInternal = (draggingCollectionRef === null || draggingCollectionRef === void 0 ? void 0 : draggingCollectionRef.current) === (ref === null || ref === void 0 ? void 0 : ref.current);
3433
3433
  let operation = localState.state.getDropOperation({
3434
3434
  target: target,
@@ -3468,7 +3468,7 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3468
3468
  }
3469
3469
  // If the target does not accept the drop, find the previous valid target.
3470
3470
  // If no next valid target, find the next valid target.
3471
- let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3471
+ let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3472
3472
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(ref);
3473
3473
  let operation = localState.state.getDropOperation({
3474
3474
  target: target,
@@ -3523,14 +3523,14 @@ function $7f93a158ac20b90a$export$f4e2f423c21f7b04(props, state, ref) {
3523
3523
 
3524
3524
 
3525
3525
  function $fc1876157e07bcec$export$f7b0c5d28b66b6a5(options, state, ref) {
3526
- let { dropProps: dropProps } = (0, $419982e205c8e8dc$export$62447ad3d2ec7da6)();
3526
+ let { dropProps: dropProps } = (0, $419982e205c8e8dc$export$62447ad3d2ec7da6)();
3527
3527
  let droppableCollectionRef = (0, $4620ae0dc40f0031$export$7e397efd01d3db27)(state);
3528
3528
  (0, $4vY0V$react.useEffect)(()=>{
3529
3529
  if (ref.current) return $28e10663603f5ea1$export$aef80212ac99c003({
3530
3530
  element: ref.current,
3531
3531
  target: options.target,
3532
3532
  getDropOperation (types, allowedOperations) {
3533
- let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3533
+ let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3534
3534
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(droppableCollectionRef);
3535
3535
  return state.getDropOperation({
3536
3536
  target: options.target,
@@ -3548,7 +3548,7 @@ function $fc1876157e07bcec$export$f7b0c5d28b66b6a5(options, state, ref) {
3548
3548
  droppableCollectionRef
3549
3549
  ]);
3550
3550
  let dragSession = $28e10663603f5ea1$export$418e185dd3f1b968();
3551
- let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3551
+ let { draggingKeys: draggingKeys } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3552
3552
  let isInternal = (0, $4620ae0dc40f0031$export$78bf638634500fa5)(droppableCollectionRef);
3553
3553
  let isValidDropTarget = dragSession && state.getDropOperation({
3554
3554
  target: options.target,
@@ -3592,11 +3592,11 @@ function $fc1876157e07bcec$export$f7b0c5d28b66b6a5(options, state, ref) {
3592
3592
 
3593
3593
 
3594
3594
  function $c5557edbed563ebf$export$8d0e41d2815afac5(props, state, ref) {
3595
- let { target: target } = props;
3596
- let { collection: collection } = state;
3595
+ let { target: target } = props;
3596
+ let { collection: collection } = state;
3597
3597
  let stringFormatter = (0, $4vY0V$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($7c8adf3925a26206$exports))));
3598
3598
  let dragSession = $28e10663603f5ea1$export$418e185dd3f1b968();
3599
- let { dropProps: dropProps } = (0, $fc1876157e07bcec$export$f7b0c5d28b66b6a5)(props, state, ref);
3599
+ let { dropProps: dropProps } = (0, $fc1876157e07bcec$export$f7b0c5d28b66b6a5)(props, state, ref);
3600
3600
  let id = (0, $4vY0V$reactariautils.useId)();
3601
3601
  var _collection_getTextValue;
3602
3602
  let getText = (key)=>{
@@ -3682,7 +3682,7 @@ const $0cbbd00cda972c67$var$MESSAGES = {
3682
3682
  function $0cbbd00cda972c67$export$b35afafff42da2d9(props, state) {
3683
3683
  let stringFormatter = (0, $4vY0V$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($7c8adf3925a26206$exports))));
3684
3684
  let isDisabled = state.selectionManager.isDisabled(props.key);
3685
- let { dragProps: dragProps , dragButtonProps: dragButtonProps } = (0, $dc204e8ec58447a6$export$7941f8aafa4b6021)({
3685
+ let { dragProps: dragProps, dragButtonProps: dragButtonProps } = (0, $dc204e8ec58447a6$export$7941f8aafa4b6021)({
3686
3686
  getItems () {
3687
3687
  return state.getItems(props.key);
3688
3688
  },
@@ -3698,7 +3698,7 @@ function $0cbbd00cda972c67$export$b35afafff42da2d9(props, state) {
3698
3698
  state.moveDrag(e);
3699
3699
  },
3700
3700
  onDragEnd (e) {
3701
- let { dropOperation: dropOperation } = e;
3701
+ let { dropOperation: dropOperation } = e;
3702
3702
  let isInternal = dropOperation === "cancel" ? false : (0, $4620ae0dc40f0031$export$78bf638634500fa5)();
3703
3703
  state.endDrag({
3704
3704
  ...e,
@@ -3739,7 +3739,7 @@ function $0cbbd00cda972c67$export$b35afafff42da2d9(props, state) {
3739
3739
  let descriptionProps = (0, $4vY0V$reactariautils.useDescription)(description);
3740
3740
  if (description) Object.assign(dragProps, descriptionProps);
3741
3741
  if (!props.hasDragButton && props.hasAction) {
3742
- let { onKeyDownCapture: onKeyDownCapture , onKeyUpCapture: onKeyUpCapture } = dragProps;
3742
+ let { onKeyDownCapture: onKeyDownCapture, onKeyUpCapture: onKeyUpCapture } = dragProps;
3743
3743
  if (modality === "touch") // Remove long press description if an action is present, because in that case long pressing selects the item.
3744
3744
  delete dragProps["aria-describedby"];
3745
3745
  // Require Alt key if there is a conflicting action.
@@ -3774,7 +3774,7 @@ function $0cbbd00cda972c67$export$b35afafff42da2d9(props, state) {
3774
3774
  */
3775
3775
  function $c3e901bab7fcc6ff$export$2962a7984b2f0a80(props, state, ref) {
3776
3776
  // Update global DnD state if this keys within this collection are dragged
3777
- let { draggingCollectionRef: draggingCollectionRef } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3777
+ let { draggingCollectionRef: draggingCollectionRef } = (0, $4620ae0dc40f0031$export$6ca6700462636d0b);
3778
3778
  if (state.draggingKeys.size > 0 && (draggingCollectionRef === null || draggingCollectionRef === void 0 ? void 0 : draggingCollectionRef.current) !== ref.current) (0, $4620ae0dc40f0031$export$f2be18a910c0caa6)(ref);
3779
3779
  }
3780
3780
 
@@ -3819,7 +3819,7 @@ function $74f3dedaa4d234b4$var$addGlobalEventListener(event, fn) {
3819
3819
  }
3820
3820
  function $74f3dedaa4d234b4$export$2314ca2a3e892862(options) {
3821
3821
  let isFocusedRef = (0, $4vY0V$react.useRef)(false);
3822
- let { focusProps: focusProps } = (0, $4vY0V$reactariainteractions.useFocus)({
3822
+ let { focusProps: focusProps } = (0, $4vY0V$reactariainteractions.useFocus)({
3823
3823
  onFocusChange: (isFocused)=>{
3824
3824
  isFocusedRef.current = isFocused;
3825
3825
  }