@planningcenter/react-beautiful-dnd 13.4.0 → 13.5.0

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.
@@ -1,4 +1,4 @@
1
- import React, { useLayoutEffect, useEffect, useRef, useState, useContext } from 'react';
1
+ import React, { useLayoutEffect as useLayoutEffect$1, useEffect, useRef, useState, useContext } from 'react';
2
2
  import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import { createStore as createStore$1, applyMiddleware, compose, bindActionCreators } from 'redux';
@@ -9,16 +9,16 @@ import memoizeOne from 'memoize-one';
9
9
  import rafSchd from 'raf-schd';
10
10
  import ReactDOM from 'react-dom';
11
11
 
12
- var isProduction = process.env.NODE_ENV === 'production';
12
+ var isProduction$1 = process.env.NODE_ENV === 'production';
13
13
  var spacesAndTabs = /[ \t]{2,}/g;
14
14
  var lineStartWithSpaces = /^[ \t]*/gm;
15
15
 
16
- var clean = function clean(value) {
16
+ var clean$2 = function clean(value) {
17
17
  return value.replace(spacesAndTabs, ' ').replace(lineStartWithSpaces, '').trim();
18
18
  };
19
19
 
20
20
  var getDevMessage = function getDevMessage(message) {
21
- return clean("\n %creact-beautiful-dnd\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77\u200D This is a development only message. It will be removed in production builds.\n");
21
+ return clean$2("\n %creact-beautiful-dnd\n\n %c" + clean$2(message) + "\n\n %c\uD83D\uDC77\u200D This is a development only message. It will be removed in production builds.\n");
22
22
  };
23
23
 
24
24
  var getFormattedMessage = function getFormattedMessage(message) {
@@ -28,7 +28,7 @@ var isDisabledFlag = '__react-beautiful-dnd-disable-dev-warnings';
28
28
  function log(type, message) {
29
29
  var _console;
30
30
 
31
- if (isProduction) {
31
+ if (isProduction$1) {
32
32
  return;
33
33
  }
34
34
 
@@ -41,7 +41,7 @@ function log(type, message) {
41
41
  var warning = log.bind(null, 'warn');
42
42
  var error = log.bind(null, 'error');
43
43
 
44
- function noop() {}
44
+ function noop$2() {}
45
45
 
46
46
  function getOptions(shared, fromBinding) {
47
47
  return _extends({}, shared, {}, fromBinding);
@@ -62,8 +62,8 @@ function bindEvents(el, bindings, sharedOptions) {
62
62
  };
63
63
  }
64
64
 
65
- var isProduction$1 = process.env.NODE_ENV === 'production';
66
- var prefix = 'Invariant failed';
65
+ var isProduction = process.env.NODE_ENV === 'production';
66
+ var prefix$1 = 'Invariant failed';
67
67
  function RbdInvariant(message) {
68
68
  this.message = message;
69
69
  }
@@ -77,10 +77,10 @@ function invariant(condition, message) {
77
77
  return;
78
78
  }
79
79
 
80
- if (isProduction$1) {
81
- throw new RbdInvariant(prefix);
80
+ if (isProduction) {
81
+ throw new RbdInvariant(prefix$1);
82
82
  } else {
83
- throw new RbdInvariant(prefix + ": " + (message || ''));
83
+ throw new RbdInvariant(prefix$1 + ": " + (message || ''));
84
84
  }
85
85
  }
86
86
 
@@ -96,7 +96,7 @@ var ErrorBoundary = function (_React$Component) {
96
96
 
97
97
  _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
98
98
  _this.callbacks = null;
99
- _this.unbind = noop;
99
+ _this.unbind = noop$2;
100
100
 
101
101
  _this.onWindowError = function (event) {
102
102
  var callbacks = _this.getCallbacks();
@@ -242,6 +242,7 @@ var preset = {
242
242
  onDragUpdate: onDragUpdate,
243
243
  onDragEnd: onDragEnd
244
244
  };
245
+ var preset$1 = preset;
245
246
 
246
247
  var origin = {
247
248
  x: 0,
@@ -259,7 +260,7 @@ var subtract = function subtract(point1, point2) {
259
260
  y: point1.y - point2.y
260
261
  };
261
262
  };
262
- var isEqual = function isEqual(point1, point2) {
263
+ var isEqual$1 = function isEqual(point1, point2) {
263
264
  return point1.x === point2.x && point1.y === point2.y;
264
265
  };
265
266
  var negate = function negate(point) {
@@ -280,7 +281,7 @@ var patch = function patch(line, value, otherValue) {
280
281
  var distance = function distance(point1, point2) {
281
282
  return Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2));
282
283
  };
283
- var closest = function closest(target, points) {
284
+ var closest$1 = function closest(target, points) {
284
285
  return Math.min.apply(Math, points.map(function (point) {
285
286
  return distance(target, point);
286
287
  }));
@@ -339,7 +340,7 @@ var noSpacing = {
339
340
  left: 0
340
341
  };
341
342
 
342
- var scroll = function scroll(target, frame) {
343
+ var scroll$1 = function scroll(target, frame) {
343
344
  if (!frame) {
344
345
  return target;
345
346
  }
@@ -370,7 +371,7 @@ var getSubject = (function (_ref) {
370
371
  withPlaceholder = _ref.withPlaceholder,
371
372
  axis = _ref.axis,
372
373
  frame = _ref.frame;
373
- var scrolled = scroll(page.marginBox, frame);
374
+ var scrolled = scroll$1(page.marginBox, frame);
374
375
  var increased = increase(scrolled, axis, withPlaceholder);
375
376
  var clipped = clip(increased, frame);
376
377
  return {
@@ -588,6 +589,7 @@ var noImpact = {
588
589
  displacedBy: noDisplacedBy,
589
590
  at: null
590
591
  };
592
+ var noImpact$1 = noImpact;
591
593
 
592
594
  var isWithin = (function (lowerBound, upperBound) {
593
595
  return function (value) {
@@ -689,7 +691,7 @@ var isVisibleInViewport = function isVisibleInViewport(target, viewport, isVisib
689
691
  return isVisibleThroughFrameFn(viewport)(target);
690
692
  };
691
693
 
692
- var isVisible = function isVisible(_ref) {
694
+ var isVisible$1 = function isVisible(_ref) {
693
695
  var toBeDisplaced = _ref.target,
694
696
  destination = _ref.destination,
695
697
  viewport = _ref.viewport,
@@ -700,17 +702,17 @@ var isVisible = function isVisible(_ref) {
700
702
  };
701
703
 
702
704
  var isPartiallyVisible = function isPartiallyVisible(args) {
703
- return isVisible(_extends({}, args, {
705
+ return isVisible$1(_extends({}, args, {
704
706
  isVisibleThroughFrameFn: isPartiallyVisibleThroughFrame
705
707
  }));
706
708
  };
707
709
  var isTotallyVisible = function isTotallyVisible(args) {
708
- return isVisible(_extends({}, args, {
710
+ return isVisible$1(_extends({}, args, {
709
711
  isVisibleThroughFrameFn: isTotallyVisibleThroughFrame
710
712
  }));
711
713
  };
712
714
  var isTotallyVisibleOnAxis = function isTotallyVisibleOnAxis(args) {
713
- return isVisible(_extends({}, args, {
715
+ return isVisible$1(_extends({}, args, {
714
716
  isVisibleThroughFrameFn: isTotallyVisibleThroughFrameOnAxis(args.destination.axis)
715
717
  }));
716
718
  };
@@ -1192,7 +1194,7 @@ var scrollViewport = (function (viewport, newScroll) {
1192
1194
  return updated;
1193
1195
  });
1194
1196
 
1195
- function getDraggables(ids, draggables) {
1197
+ function getDraggables$1(ids, draggables) {
1196
1198
  return ids.map(function (id) {
1197
1199
  return draggables[id];
1198
1200
  });
@@ -1220,7 +1222,7 @@ var speculativelyIncrease = (function (_ref) {
1220
1222
  var scrolledDroppable = destination.frame ? scrollDroppable(destination, add(destination.frame.scroll.current, maxScrollChange)) : destination;
1221
1223
  var last = impact.displaced;
1222
1224
  var withViewportScroll = getDisplacementGroups({
1223
- afterDragging: getDraggables(last.all, draggables),
1225
+ afterDragging: getDraggables$1(last.all, draggables),
1224
1226
  destination: destination,
1225
1227
  displacedBy: impact.displacedBy,
1226
1228
  viewport: scrolledViewport.frame,
@@ -1228,7 +1230,7 @@ var speculativelyIncrease = (function (_ref) {
1228
1230
  forceShouldAnimate: false
1229
1231
  });
1230
1232
  var withDroppableScroll = getDisplacementGroups({
1231
- afterDragging: getDraggables(last.all, draggables),
1233
+ afterDragging: getDraggables$1(last.all, draggables),
1232
1234
  destination: scrolledDroppable,
1233
1235
  displacedBy: impact.displacedBy,
1234
1236
  viewport: viewport.frame,
@@ -1452,8 +1454,8 @@ var getBestCrossAxisDroppable = (function (_ref) {
1452
1454
  }
1453
1455
 
1454
1456
  return candidates.sort(function (a, b) {
1455
- var first = closest(pageBorderBoxCenter, getCorners(getKnownActive(a)));
1456
- var second = closest(pageBorderBoxCenter, getCorners(getKnownActive(b)));
1457
+ var first = closest$1(pageBorderBoxCenter, getCorners(getKnownActive(a)));
1458
+ var second = closest$1(pageBorderBoxCenter, getCorners(getKnownActive(b)));
1457
1459
 
1458
1460
  if (first !== second) {
1459
1461
  return first - second;
@@ -1761,7 +1763,7 @@ var whatIsDraggedOver = (function (impact) {
1761
1763
  return at.combine.droppableId;
1762
1764
  });
1763
1765
 
1764
- var getDroppableOver = function getDroppableOver(impact, droppables) {
1766
+ var getDroppableOver$1 = function getDroppableOver(impact, droppables) {
1765
1767
  var id = whatIsDraggedOver(impact);
1766
1768
  return id ? droppables[id] : null;
1767
1769
  };
@@ -1769,7 +1771,7 @@ var getDroppableOver = function getDroppableOver(impact, droppables) {
1769
1771
  var moveInDirection = (function (_ref) {
1770
1772
  var state = _ref.state,
1771
1773
  type = _ref.type;
1772
- var isActuallyOver = getDroppableOver(state.impact, state.dimensions.droppables);
1774
+ var isActuallyOver = getDroppableOver$1(state.impact, state.dimensions.droppables);
1773
1775
  var isMainAxisMovementAllowed = Boolean(isActuallyOver);
1774
1776
  var home = state.dimensions.droppables[state.critical.droppable.id];
1775
1777
  var isOver = isActuallyOver || home;
@@ -1842,7 +1844,7 @@ function getFurthestAway(_ref) {
1842
1844
  return sorted[0] ? sorted[0].id : null;
1843
1845
  }
1844
1846
 
1845
- function getDroppableOver$1(_ref2) {
1847
+ function getDroppableOver(_ref2) {
1846
1848
  var pageBorderBox = _ref2.pageBorderBox,
1847
1849
  draggable = _ref2.draggable,
1848
1850
  droppables = _ref2.droppables;
@@ -2064,14 +2066,14 @@ var getDragImpact = (function (_ref) {
2064
2066
  viewport = _ref.viewport,
2065
2067
  afterCritical = _ref.afterCritical;
2066
2068
  var pageBorderBox = offsetRectByPosition(draggable.page.borderBox, pageOffset);
2067
- var destinationId = getDroppableOver$1({
2069
+ var destinationId = getDroppableOver({
2068
2070
  pageBorderBox: pageBorderBox,
2069
2071
  draggable: draggable,
2070
2072
  droppables: droppables
2071
2073
  });
2072
2074
 
2073
2075
  if (!destinationId) {
2074
- return noImpact;
2076
+ return noImpact$1;
2075
2077
  }
2076
2078
 
2077
2079
  var destination = droppables[destinationId];
@@ -2226,7 +2228,7 @@ var update = (function (_ref) {
2226
2228
  return result;
2227
2229
  });
2228
2230
 
2229
- function getDraggables$1(ids, draggables) {
2231
+ function getDraggables(ids, draggables) {
2230
2232
  return ids.map(function (id) {
2231
2233
  return draggables[id];
2232
2234
  });
@@ -2239,7 +2241,7 @@ var recompute = (function (_ref) {
2239
2241
  destination = _ref.destination,
2240
2242
  forceShouldAnimate = _ref.forceShouldAnimate;
2241
2243
  var last = impact.displaced;
2242
- var afterDragging = getDraggables$1(last.all, draggables);
2244
+ var afterDragging = getDraggables(last.all, draggables);
2243
2245
  var displaced = getDisplacementGroups({
2244
2246
  afterDragging: afterDragging,
2245
2247
  destination: destination,
@@ -2536,18 +2538,18 @@ function removeScrollJumpRequest(state) {
2536
2538
  return state;
2537
2539
  }
2538
2540
 
2539
- var idle = {
2541
+ var idle$2 = {
2540
2542
  phase: 'IDLE',
2541
2543
  completed: null,
2542
2544
  shouldFlush: false
2543
2545
  };
2544
2546
  var reducer = (function (state, action) {
2545
2547
  if (state === void 0) {
2546
- state = idle;
2548
+ state = idle$2;
2547
2549
  }
2548
2550
 
2549
2551
  if (action.type === 'FLUSH') {
2550
- return _extends({}, idle, {
2552
+ return _extends({}, idle$2, {
2551
2553
  shouldFlush: true
2552
2554
  });
2553
2555
  }
@@ -2639,7 +2641,7 @@ var reducer = (function (state, action) {
2639
2641
  !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? invariant(false, action.type + " not permitted in phase " + state.phase) : invariant(false) : void 0;
2640
2642
  var _clientSelection = action.payload.client;
2641
2643
 
2642
- if (isEqual(_clientSelection, state.current.client.selection)) {
2644
+ if (isEqual$1(_clientSelection, state.current.client.selection)) {
2643
2645
  return state;
2644
2646
  }
2645
2647
 
@@ -2722,7 +2724,7 @@ var reducer = (function (state, action) {
2722
2724
  !state.isWindowScrollAllowed ? process.env.NODE_ENV !== "production" ? invariant(false, 'Window scrolling is currently not supported for fixed lists') : invariant(false) : void 0;
2723
2725
  var _newScroll = action.payload.newScroll;
2724
2726
 
2725
- if (isEqual(state.viewport.scroll.current, _newScroll)) {
2727
+ if (isEqual$1(state.viewport.scroll.current, _newScroll)) {
2726
2728
  return removeScrollJumpRequest(state);
2727
2729
  }
2728
2730
 
@@ -2748,7 +2750,7 @@ var reducer = (function (state, action) {
2748
2750
 
2749
2751
  var maxScroll = action.payload.maxScroll;
2750
2752
 
2751
- if (isEqual(maxScroll, state.viewport.scroll.max)) {
2753
+ if (isEqual$1(maxScroll, state.viewport.scroll.max)) {
2752
2754
  return state;
2753
2755
  }
2754
2756
 
@@ -2838,7 +2840,7 @@ var beforeInitialCapture = function beforeInitialCapture(args) {
2838
2840
  payload: args
2839
2841
  };
2840
2842
  };
2841
- var lift = function lift(args) {
2843
+ var lift$1 = function lift(args) {
2842
2844
  return {
2843
2845
  type: 'LIFT',
2844
2846
  payload: args
@@ -2940,7 +2942,7 @@ var completeDrop = function completeDrop(args) {
2940
2942
  payload: args
2941
2943
  };
2942
2944
  };
2943
- var drop = function drop(args) {
2945
+ var drop$1 = function drop(args) {
2944
2946
  return {
2945
2947
  type: 'DROP',
2946
2948
  payload: args
@@ -2996,7 +2998,7 @@ function validateDimensions(critical, dimensions) {
2996
2998
  }
2997
2999
  }
2998
3000
 
2999
- var lift$1 = (function (marshal) {
3001
+ var lift = (function (marshal) {
3000
3002
  return function (_ref) {
3001
3003
  var getState = _ref.getState,
3002
3004
  dispatch = _ref.dispatch;
@@ -3104,7 +3106,7 @@ var transitions = {
3104
3106
  };
3105
3107
 
3106
3108
  var moveTo = function moveTo(offset) {
3107
- return isEqual(offset, origin) ? null : "translate(" + offset.x + "px, " + offset.y + "px)";
3109
+ return isEqual$1(offset, origin) ? null : "translate(" + offset.x + "px, " + offset.y + "px)";
3108
3110
  };
3109
3111
 
3110
3112
  var transforms = {
@@ -3211,7 +3213,7 @@ var getDropImpact = (function (_ref) {
3211
3213
  };
3212
3214
  });
3213
3215
 
3214
- var drop$1 = (function (_ref) {
3216
+ var drop = (function (_ref) {
3215
3217
  var getState = _ref.getState,
3216
3218
  dispatch = _ref.dispatch;
3217
3219
  return function (next) {
@@ -3282,7 +3284,7 @@ var drop$1 = (function (_ref) {
3282
3284
  result: result,
3283
3285
  impact: impact
3284
3286
  };
3285
- var isAnimationRequired = !isEqual(state.current.client.offset, newHomeClientOffset) || Boolean(result.combine);
3287
+ var isAnimationRequired = !isEqual$1(state.current.client.offset, newHomeClientOffset) || Boolean(result.combine);
3286
3288
 
3287
3289
  if (!isAnimationRequired) {
3288
3290
  dispatch(completeDrop({
@@ -3339,10 +3341,10 @@ function getScrollListener(_ref) {
3339
3341
 
3340
3342
  var scheduled = rafSchd(updateScroll);
3341
3343
  var binding = getWindowScrollBinding(scheduled);
3342
- var unbind = noop;
3344
+ var unbind = noop$2;
3343
3345
 
3344
3346
  function isActive() {
3345
- return unbind !== noop;
3347
+ return unbind !== noop$2;
3346
3348
  }
3347
3349
 
3348
3350
  function start() {
@@ -3354,7 +3356,7 @@ function getScrollListener(_ref) {
3354
3356
  !isActive() ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot stop scroll listener when not active') : invariant(false) : void 0;
3355
3357
  scheduled.cancel();
3356
3358
  unbind();
3357
- unbind = noop;
3359
+ unbind = noop$2;
3358
3360
  }
3359
3361
 
3360
3362
  return {
@@ -3574,7 +3576,7 @@ var getPublisher = (function (getResponders, announce) {
3574
3576
  };
3575
3577
  asyncMarshal.add(function () {
3576
3578
  withTimings('onDragStart', function () {
3577
- return execute(getResponders().onDragStart, data, announce, preset.onDragStart);
3579
+ return execute(getResponders().onDragStart, data, announce, preset$1.onDragStart);
3578
3580
  });
3579
3581
  });
3580
3582
  };
@@ -3612,7 +3614,7 @@ var getPublisher = (function (getResponders, announce) {
3612
3614
 
3613
3615
  asyncMarshal.add(function () {
3614
3616
  withTimings('onDragUpdate', function () {
3615
- return execute(getResponders().onDragUpdate, data, announce, preset.onDragUpdate);
3617
+ return execute(getResponders().onDragUpdate, data, announce, preset$1.onDragUpdate);
3616
3618
  });
3617
3619
  });
3618
3620
  };
@@ -3626,7 +3628,7 @@ var getPublisher = (function (getResponders, announce) {
3626
3628
  !dragging ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot fire onDragEnd when there is no matching onDragStart') : invariant(false) : void 0;
3627
3629
  dragging = null;
3628
3630
  withTimings('onDragEnd', function () {
3629
- return execute(getResponders().onDragEnd, result, announce, preset.onDragEnd);
3631
+ return execute(getResponders().onDragEnd, result, announce, preset$1.onDragEnd);
3630
3632
  });
3631
3633
  };
3632
3634
 
@@ -3868,7 +3870,7 @@ var pendingDrop = (function (store) {
3868
3870
  return;
3869
3871
  }
3870
3872
 
3871
- store.dispatch(drop({
3873
+ store.dispatch(drop$1({
3872
3874
  reason: postActionState.reason
3873
3875
  }));
3874
3876
  };
@@ -3885,7 +3887,7 @@ var createStore = (function (_ref) {
3885
3887
  getResponders = _ref.getResponders,
3886
3888
  announce = _ref.announce,
3887
3889
  autoScroller = _ref.autoScroller;
3888
- return createStore$1(reducer, composeEnhancers(applyMiddleware(style(styleMarshal), dimensionMarshalStopper(dimensionMarshal), lift$1(dimensionMarshal), drop$1, dropAnimationFinish, dropAnimationFlushOnScroll, pendingDrop, autoScroll(autoScroller), scrollListener, focus(focusMarshal), responders(getResponders, announce))));
3890
+ return createStore$1(reducer, composeEnhancers(applyMiddleware(style(styleMarshal), dimensionMarshalStopper(dimensionMarshal), lift(dimensionMarshal), drop, dropAnimationFinish, dropAnimationFlushOnScroll, pendingDrop, autoScroll(autoScroller), scrollListener, focus(focusMarshal), responders(getResponders, announce))));
3889
3891
  });
3890
3892
 
3891
3893
  var clean$1 = function clean() {
@@ -4298,6 +4300,7 @@ var config = {
4298
4300
  accelerateAt: 360
4299
4301
  }
4300
4302
  };
4303
+ var config$1 = config;
4301
4304
 
4302
4305
  var minScroll = 1;
4303
4306
 
@@ -4306,7 +4309,7 @@ var getValueFromDistance = (function (distanceToEdge, thresholds, configOverride
4306
4309
  return 0;
4307
4310
  }
4308
4311
 
4309
- var maxSpeed = (configOverride == null ? void 0 : configOverride.maxPixelScroll) || config.maxPixelScroll;
4312
+ var maxSpeed = (configOverride == null ? void 0 : configOverride.maxPixelScroll) || config$1.maxPixelScroll;
4310
4313
 
4311
4314
  if (distanceToEdge <= thresholds.maxScrollValueAt) {
4312
4315
  return maxSpeed;
@@ -4322,18 +4325,18 @@ var getValueFromDistance = (function (distanceToEdge, thresholds, configOverride
4322
4325
  current: distanceToEdge
4323
4326
  });
4324
4327
  var percentageFromStartScrollingFrom = 1 - percentageFromMaxScrollValueAt;
4325
- var scroll = maxSpeed * config.ease(percentageFromStartScrollingFrom);
4328
+ var scroll = maxSpeed * config$1.ease(percentageFromStartScrollingFrom);
4326
4329
  return Math.ceil(scroll);
4327
4330
  });
4328
4331
 
4329
- var defaultAccelerateAt = config.durationDampening.accelerateAt;
4330
- var defaultStopAt = config.durationDampening.stopDampeningAt;
4332
+ var defaultAccelerateAt = config$1.durationDampening.accelerateAt;
4333
+ var defaultStopAt = config$1.durationDampening.stopDampeningAt;
4331
4334
  var dampenValueByTime = (function (proposedScroll, dragStartTime, configOverride) {
4332
4335
  var _configOverride$durat, _configOverride$durat2;
4333
4336
 
4334
4337
  var accelerateAt = (configOverride == null ? void 0 : (_configOverride$durat = configOverride.durationDampening) == null ? void 0 : _configOverride$durat.accelerateAt) || defaultAccelerateAt;
4335
4338
  var stopAt = (configOverride == null ? void 0 : (_configOverride$durat2 = configOverride.durationDampening) == null ? void 0 : _configOverride$durat2.stopDampeningAt) || defaultStopAt;
4336
- var ease = (configOverride == null ? void 0 : configOverride.ease) || config.ease;
4339
+ var ease = (configOverride == null ? void 0 : configOverride.ease) || config$1.ease;
4337
4340
  var startOfRange = dragStartTime;
4338
4341
  var endOfRange = stopAt;
4339
4342
  var now = Date.now();
@@ -4540,8 +4543,8 @@ var bufferThresholds = (function (_ref) {
4540
4543
  });
4541
4544
 
4542
4545
  var getDistanceThresholds = (function (container, axis, configOverride) {
4543
- var startFromPercentage = (configOverride == null ? void 0 : configOverride.startFromPercentage) || config.startFromPercentage;
4544
- var maxScrollAtPercentage = (configOverride == null ? void 0 : configOverride.maxScrollAtPercentage) || config.maxScrollAtPercentage;
4546
+ var startFromPercentage = (configOverride == null ? void 0 : configOverride.startFromPercentage) || config$1.startFromPercentage;
4547
+ var maxScrollAtPercentage = (configOverride == null ? void 0 : configOverride.maxScrollAtPercentage) || config$1.maxScrollAtPercentage;
4545
4548
  var startScrollingFrom = container[axis.size] * startFromPercentage;
4546
4549
  var maxScrollValueAt = container[axis.size] * maxScrollAtPercentage;
4547
4550
  var thresholds = {
@@ -4551,10 +4554,10 @@ var getDistanceThresholds = (function (container, axis, configOverride) {
4551
4554
  return thresholds;
4552
4555
  });
4553
4556
 
4554
- var clean$2 = apply(function (value) {
4557
+ var clean = apply(function (value) {
4555
4558
  return value === 0 ? 0 : value;
4556
4559
  });
4557
- var getScroll = (function (_ref) {
4560
+ var getScroll$1 = (function (_ref) {
4558
4561
  var dragStartTime = _ref.dragStartTime,
4559
4562
  container = _ref.container,
4560
4563
  containerScroll = _ref.containerScroll,
@@ -4589,12 +4592,12 @@ var getScroll = (function (_ref) {
4589
4592
  shouldUseTimeDampening: shouldUseTimeDampening,
4590
4593
  thresholds: thresholdsHorizontal
4591
4594
  });
4592
- var required = clean$2({
4595
+ var required = clean({
4593
4596
  x: x,
4594
4597
  y: y
4595
4598
  });
4596
4599
 
4597
- if (isEqual(required, origin)) {
4600
+ if (isEqual$1(required, origin)) {
4598
4601
  return null;
4599
4602
  }
4600
4603
 
@@ -4641,7 +4644,7 @@ var getScroll = (function (_ref) {
4641
4644
  }
4642
4645
  }
4643
4646
 
4644
- return isEqual(scroll, origin) ? null : scroll;
4647
+ return isEqual$1(scroll, origin) ? null : scroll;
4645
4648
  });
4646
4649
 
4647
4650
  var smallestSigned = apply(function (value) {
@@ -4674,7 +4677,7 @@ var getOverlap = function () {
4674
4677
  y: getRemainder(targetScroll.y, max.y)
4675
4678
  };
4676
4679
 
4677
- if (isEqual(overlap, origin)) {
4680
+ if (isEqual$1(overlap, origin)) {
4678
4681
  return null;
4679
4682
  }
4680
4683
 
@@ -4773,7 +4776,7 @@ var getWindowScrollChange = (function (_ref) {
4773
4776
  x: viewport.scroll.current.x,
4774
4777
  y: viewport.scroll.current.y
4775
4778
  };
4776
- var scroll = getScroll({
4779
+ var scroll = getScroll$1({
4777
4780
  dragStartTime: dragStartTime,
4778
4781
  container: viewport.frame,
4779
4782
  containerScroll: viewport.scroll,
@@ -4801,7 +4804,7 @@ var getDroppableScrollChange = (function (_ref) {
4801
4804
  return null;
4802
4805
  }
4803
4806
 
4804
- var scroll = getScroll({
4807
+ var scroll = getScroll$1({
4805
4808
  dragStartTime: dragStartTime,
4806
4809
  container: frame.pageMarginBox,
4807
4810
  containerScroll: frame.scroll,
@@ -4814,7 +4817,7 @@ var getDroppableScrollChange = (function (_ref) {
4814
4817
  return scroll && canScrollDroppable(droppable, scroll) ? scroll : null;
4815
4818
  });
4816
4819
 
4817
- var scroll$1 = (function (_ref) {
4820
+ var scroll = (function (_ref) {
4818
4821
  var state = _ref.state,
4819
4822
  dragStartTime = _ref.dragStartTime,
4820
4823
  shouldUseTimeDampening = _ref.shouldUseTimeDampening,
@@ -4883,7 +4886,7 @@ var createFluidScroller = (function (_ref) {
4883
4886
  var _dragging = dragging,
4884
4887
  shouldUseTimeDampening = _dragging.shouldUseTimeDampening,
4885
4888
  dragStartTime = _dragging.dragStartTime;
4886
- scroll$1({
4889
+ scroll({
4887
4890
  state: state,
4888
4891
  scrollWindow: scheduleWindowScroll,
4889
4892
  scrollDroppable: scheduleDroppableScroll,
@@ -4903,7 +4906,7 @@ var createFluidScroller = (function (_ref) {
4903
4906
  wasScrollNeeded = true;
4904
4907
  };
4905
4908
 
4906
- scroll$1({
4909
+ scroll({
4907
4910
  state: state,
4908
4911
  dragStartTime: 0,
4909
4912
  shouldUseTimeDampening: false,
@@ -5060,9 +5063,9 @@ var createAutoScroller = (function (_ref) {
5060
5063
  return scroller;
5061
5064
  });
5062
5065
 
5063
- var prefix$1 = 'data-rbd';
5066
+ var prefix = 'data-rbd';
5064
5067
  var dragHandle = function () {
5065
- var base = prefix$1 + "-drag-handle";
5068
+ var base = prefix + "-drag-handle";
5066
5069
  return {
5067
5070
  base: base,
5068
5071
  draggableId: base + "-draggable-id",
@@ -5070,7 +5073,7 @@ var dragHandle = function () {
5070
5073
  };
5071
5074
  }();
5072
5075
  var draggable = function () {
5073
- var base = prefix$1 + "-draggable";
5076
+ var base = prefix + "-draggable";
5074
5077
  return {
5075
5078
  base: base,
5076
5079
  contextId: base + "-context-id",
@@ -5078,7 +5081,7 @@ var draggable = function () {
5078
5081
  };
5079
5082
  }();
5080
5083
  var droppable = function () {
5081
- var base = prefix$1 + "-droppable";
5084
+ var base = prefix + "-droppable";
5082
5085
  return {
5083
5086
  base: base,
5084
5087
  contextId: base + "-context-id",
@@ -5086,7 +5089,7 @@ var droppable = function () {
5086
5089
  };
5087
5090
  }();
5088
5091
  var scrollContainer = {
5089
- contextId: prefix$1 + "-scroll-container-context-id"
5092
+ contextId: prefix + "-scroll-container-context-id"
5090
5093
  };
5091
5094
 
5092
5095
  var makeGetSelector = function makeGetSelector(context) {
@@ -5158,7 +5161,8 @@ var getStyles$1 = (function (contextId) {
5158
5161
  };
5159
5162
  });
5160
5163
 
5161
- var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;
5164
+ var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect$1 : useEffect;
5165
+ var useLayoutEffect = useIsomorphicLayoutEffect;
5162
5166
 
5163
5167
  var getHead = function getHead() {
5164
5168
  var head = document.querySelector('head');
@@ -5193,14 +5197,14 @@ function useStyleMarshal(contextId, nonce) {
5193
5197
  !el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot set dynamic style element if it is not set') : invariant(false) : void 0;
5194
5198
  el.textContent = proposed;
5195
5199
  }, []);
5196
- useIsomorphicLayoutEffect(function () {
5200
+ useLayoutEffect(function () {
5197
5201
  !(!alwaysRef.current && !dynamicRef.current) ? process.env.NODE_ENV !== "production" ? invariant(false, 'style elements already mounted') : invariant(false) : void 0;
5198
5202
  var always = createStyleEl(nonce);
5199
5203
  var dynamic = createStyleEl(nonce);
5200
5204
  alwaysRef.current = always;
5201
5205
  dynamicRef.current = dynamic;
5202
- always.setAttribute(prefix$1 + "-always", contextId);
5203
- dynamic.setAttribute(prefix$1 + "-dynamic", contextId);
5206
+ always.setAttribute(prefix + "-always", contextId);
5207
+ dynamic.setAttribute(prefix + "-dynamic", contextId);
5204
5208
  getHead().appendChild(always);
5205
5209
  getHead().appendChild(dynamic);
5206
5210
  setAlwaysStyle(styles.always);
@@ -5343,7 +5347,7 @@ function useFocusMarshal(contextId) {
5343
5347
 
5344
5348
  recordRef.current = id;
5345
5349
  }, []);
5346
- useIsomorphicLayoutEffect(function () {
5350
+ useLayoutEffect(function () {
5347
5351
  isMountedRef.current = true;
5348
5352
  return function clearFrameOnUnmount() {
5349
5353
  isMountedRef.current = false;
@@ -5537,6 +5541,7 @@ var visuallyHidden = {
5537
5541
  clip: 'rect(0 0 0 0)',
5538
5542
  'clip-path': 'inset(100%)'
5539
5543
  };
5544
+ var visuallyHidden$1 = visuallyHidden;
5540
5545
 
5541
5546
  var getId = function getId(contextId) {
5542
5547
  return "rbd-announcement-" + contextId;
@@ -5553,7 +5558,7 @@ function useAnnouncer(contextId) {
5553
5558
  el.setAttribute('aria-live', 'assertive');
5554
5559
  el.setAttribute('aria-atomic', 'true');
5555
5560
 
5556
- _extends(el.style, visuallyHidden);
5561
+ _extends(el.style, visuallyHidden$1);
5557
5562
 
5558
5563
  getBodyElement().appendChild(el);
5559
5564
  return function cleanup() {
@@ -5583,12 +5588,12 @@ function useAnnouncer(contextId) {
5583
5588
  return announce;
5584
5589
  }
5585
5590
 
5586
- var count = 0;
5591
+ var count$1 = 0;
5587
5592
  var defaults = {
5588
5593
  separator: '::'
5589
5594
  };
5590
- function reset() {
5591
- count = 0;
5595
+ function reset$1() {
5596
+ count$1 = 0;
5592
5597
  }
5593
5598
  function useUniqueId(prefix, options) {
5594
5599
  if (options === void 0) {
@@ -5596,7 +5601,7 @@ function useUniqueId(prefix, options) {
5596
5601
  }
5597
5602
 
5598
5603
  return useMemo(function () {
5599
- return "" + prefix + options.separator + count++;
5604
+ return "" + prefix + options.separator + count$1++;
5600
5605
  }, [options.separator, prefix]);
5601
5606
  }
5602
5607
 
@@ -5815,6 +5820,8 @@ var supportedEventName = function () {
5815
5820
  return supported || base;
5816
5821
  }();
5817
5822
 
5823
+ var supportedPageVisibilityEventName = supportedEventName;
5824
+
5818
5825
  var primaryButton = 0;
5819
5826
  var sloppyClickThreshold = 5;
5820
5827
 
@@ -5939,14 +5946,14 @@ function getCaptureBindings(_ref) {
5939
5946
  event.preventDefault();
5940
5947
  }
5941
5948
  }, {
5942
- eventName: supportedEventName,
5949
+ eventName: supportedPageVisibilityEventName,
5943
5950
  fn: cancel
5944
5951
  }];
5945
5952
  }
5946
5953
 
5947
5954
  function useMouseSensor(api) {
5948
5955
  var phaseRef = useRef(idle$1);
5949
- var unbindEventsRef = useRef(noop);
5956
+ var unbindEventsRef = useRef(noop$2);
5950
5957
  var startCaptureBinding = useMemo(function () {
5951
5958
  return {
5952
5959
  eventName: 'mousedown',
@@ -6077,7 +6084,7 @@ function useMouseSensor(api) {
6077
6084
  };
6078
6085
  bindCapturingEvents();
6079
6086
  }, [bindCapturingEvents]);
6080
- useIsomorphicLayoutEffect(function mount() {
6087
+ useLayoutEffect(function mount() {
6081
6088
  listenForCapture();
6082
6089
  return function unmount() {
6083
6090
  unbindEventsRef.current();
@@ -6170,7 +6177,7 @@ function getDraggingBindings(actions, stop) {
6170
6177
  passive: true
6171
6178
  }
6172
6179
  }, {
6173
- eventName: supportedEventName,
6180
+ eventName: supportedPageVisibilityEventName,
6174
6181
  fn: cancel
6175
6182
  }];
6176
6183
  }
@@ -6229,7 +6236,7 @@ function useKeyboardSensor(api) {
6229
6236
  };
6230
6237
  unbindEventsRef.current = bindEvents(window, [startCaptureBinding], options);
6231
6238
  }, [startCaptureBinding]);
6232
- useIsomorphicLayoutEffect(function mount() {
6239
+ useLayoutEffect(function mount() {
6233
6240
  listenForCapture();
6234
6241
  return function unmount() {
6235
6242
  unbindEventsRef.current();
@@ -6237,7 +6244,7 @@ function useKeyboardSensor(api) {
6237
6244
  }, [listenForCapture]);
6238
6245
  }
6239
6246
 
6240
- var idle$2 = {
6247
+ var idle = {
6241
6248
  type: 'IDLE'
6242
6249
  };
6243
6250
  var timeForLongPress = 120;
@@ -6272,7 +6279,7 @@ function getWindowBindings(_ref) {
6272
6279
  cancel();
6273
6280
  }
6274
6281
  }, {
6275
- eventName: supportedEventName,
6282
+ eventName: supportedPageVisibilityEventName,
6276
6283
  fn: cancel
6277
6284
  }];
6278
6285
  }
@@ -6372,14 +6379,14 @@ function getHandleBindings(_ref2) {
6372
6379
  event.preventDefault();
6373
6380
  }
6374
6381
  }, {
6375
- eventName: supportedEventName,
6382
+ eventName: supportedPageVisibilityEventName,
6376
6383
  fn: cancel
6377
6384
  }];
6378
6385
  }
6379
6386
 
6380
6387
  function useTouchSensor(api) {
6381
- var phaseRef = useRef(idle$2);
6382
- var unbindEventsRef = useRef(noop);
6388
+ var phaseRef = useRef(idle);
6389
+ var unbindEventsRef = useRef(noop$2);
6383
6390
  var getPhase = useCallback(function getPhase() {
6384
6391
  return phaseRef.current;
6385
6392
  }, []);
@@ -6440,7 +6447,7 @@ function useTouchSensor(api) {
6440
6447
  clearTimeout(current.longPressTimerId);
6441
6448
  }
6442
6449
 
6443
- setPhase(idle$2);
6450
+ setPhase(idle);
6444
6451
  unbindEventsRef.current();
6445
6452
  listenForCapture();
6446
6453
  }, [listenForCapture, setPhase]);
@@ -6497,7 +6504,7 @@ function useTouchSensor(api) {
6497
6504
  });
6498
6505
  bindCapturingEvents(target);
6499
6506
  }, [bindCapturingEvents, getPhase, setPhase, startDragging]);
6500
- useIsomorphicLayoutEffect(function mount() {
6507
+ useLayoutEffect(function mount() {
6501
6508
  listenForCapture();
6502
6509
  return function unmount() {
6503
6510
  unbindEventsRef.current();
@@ -6505,11 +6512,11 @@ function useTouchSensor(api) {
6505
6512
 
6506
6513
  if (phase.type === 'PENDING') {
6507
6514
  clearTimeout(phase.longPressTimerId);
6508
- setPhase(idle$2);
6515
+ setPhase(idle);
6509
6516
  }
6510
6517
  };
6511
6518
  }, [getPhase, listenForCapture, setPhase]);
6512
- useIsomorphicLayoutEffect(function webkitHack() {
6519
+ useLayoutEffect(function webkitHack() {
6513
6520
  var unbind = bindEvents(window, [{
6514
6521
  eventName: 'touchmove',
6515
6522
  fn: function fn() {},
@@ -6610,7 +6617,7 @@ function closestPonyfill(el, selector) {
6610
6617
  return closestPonyfill(el.parentElement, selector);
6611
6618
  }
6612
6619
 
6613
- function closest$1(el, selector) {
6620
+ function closest(el, selector) {
6614
6621
  if (el.closest) {
6615
6622
  return el.closest(selector);
6616
6623
  }
@@ -6631,7 +6638,7 @@ function findClosestDragHandleFromEvent(contextId, event) {
6631
6638
  }
6632
6639
 
6633
6640
  var selector = getSelector(contextId);
6634
- var handle = closest$1(target, selector);
6641
+ var handle = closest(target, selector);
6635
6642
 
6636
6643
  if (!handle) {
6637
6644
  return null;
@@ -6761,7 +6768,7 @@ function tryStart(_ref3) {
6761
6768
  return null;
6762
6769
  }
6763
6770
 
6764
- var lock = lockAPI.claim(forceSensorStop || noop);
6771
+ var lock = lockAPI.claim(forceSensorStop || noop$2);
6765
6772
  var phase = 'PRE_DRAG';
6766
6773
 
6767
6774
  function getShouldRespectForcePress() {
@@ -6785,7 +6792,7 @@ function tryStart(_ref3) {
6785
6792
 
6786
6793
  var tryDispatchWhenDragging = tryDispatch.bind(null, 'DRAGGING');
6787
6794
 
6788
- function lift$1(args) {
6795
+ function lift(args) {
6789
6796
  function completed() {
6790
6797
  lockAPI.release();
6791
6798
  phase = 'COMPLETED';
@@ -6796,7 +6803,7 @@ function tryStart(_ref3) {
6796
6803
  !(phase === 'PRE_DRAG') ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot lift in phase " + phase) : invariant(false) : void 0;
6797
6804
  }
6798
6805
 
6799
- store.dispatch(lift(args.liftActionArgs));
6806
+ store.dispatch(lift$1(args.liftActionArgs));
6800
6807
  phase = 'DRAGGING';
6801
6808
 
6802
6809
  function finish(reason, options) {
@@ -6822,7 +6829,7 @@ function tryStart(_ref3) {
6822
6829
  }
6823
6830
 
6824
6831
  completed();
6825
- store.dispatch(drop({
6832
+ store.dispatch(drop$1({
6826
6833
  reason: reason
6827
6834
  }));
6828
6835
  }
@@ -6854,7 +6861,7 @@ function tryStart(_ref3) {
6854
6861
  });
6855
6862
  });
6856
6863
  });
6857
- var api = lift$1({
6864
+ var api = lift({
6858
6865
  liftActionArgs: {
6859
6866
  id: draggableId,
6860
6867
  clientSelection: clientSelection,
@@ -6887,13 +6894,13 @@ function tryStart(_ref3) {
6887
6894
  return tryDispatchWhenDragging(moveLeft);
6888
6895
  }
6889
6896
  };
6890
- return lift$1({
6897
+ return lift({
6891
6898
  liftActionArgs: {
6892
6899
  id: draggableId,
6893
6900
  clientSelection: getBorderBoxCenterPosition(el),
6894
6901
  movementMode: 'SNAP'
6895
6902
  },
6896
- cleanup: noop,
6903
+ cleanup: noop$2,
6897
6904
  actions: actions
6898
6905
  });
6899
6906
  }
@@ -6944,7 +6951,7 @@ function useSensorMarshal(_ref4) {
6944
6951
  lockAPI.tryAbandon();
6945
6952
  }
6946
6953
  }, [lockAPI]);
6947
- useIsomorphicLayoutEffect(function listenToStore() {
6954
+ useLayoutEffect(function listenToStore() {
6948
6955
  var previous = store.getState();
6949
6956
  var unsubscribe = store.subscribe(function () {
6950
6957
  var current = store.getState();
@@ -6953,7 +6960,7 @@ function useSensorMarshal(_ref4) {
6953
6960
  });
6954
6961
  return unsubscribe;
6955
6962
  }, [lockAPI, store, tryAbandonLock]);
6956
- useIsomorphicLayoutEffect(function () {
6963
+ useLayoutEffect(function () {
6957
6964
  return lockAPI.tryAbandon;
6958
6965
  }, [lockAPI.tryAbandon]);
6959
6966
  var canGetLock = useCallback(function (draggableId) {
@@ -7150,23 +7157,23 @@ function App(props) {
7150
7157
  }, props.children));
7151
7158
  }
7152
7159
 
7153
- var count$1 = 0;
7154
- function reset$1() {
7155
- count$1 = 0;
7160
+ var count = 0;
7161
+ function reset() {
7162
+ count = 0;
7156
7163
  }
7157
7164
  function useInstanceCount() {
7158
7165
  return useMemo(function () {
7159
- return "" + count$1++;
7166
+ return "" + count++;
7160
7167
  }, []);
7161
7168
  }
7162
7169
 
7163
7170
  function resetServerContext() {
7164
- reset$1();
7165
7171
  reset();
7172
+ reset$1();
7166
7173
  }
7167
7174
  function DragDropContext(props) {
7168
7175
  var contextId = useInstanceCount();
7169
- var dragHandleUsageInstructions = props.dragHandleUsageInstructions || preset.dragHandleUsageInstructions;
7176
+ var dragHandleUsageInstructions = props.dragHandleUsageInstructions || preset$1.dragHandleUsageInstructions;
7170
7177
  return React.createElement(ErrorBoundary, null, function (setCallbacks) {
7171
7178
  return React.createElement(App, {
7172
7179
  nonce: props.nonce,
@@ -7185,15 +7192,15 @@ function DragDropContext(props) {
7185
7192
  });
7186
7193
  }
7187
7194
 
7188
- var isEqual$1 = function isEqual(base) {
7195
+ var isEqual = function isEqual(base) {
7189
7196
  return function (value) {
7190
7197
  return base === value;
7191
7198
  };
7192
7199
  };
7193
7200
 
7194
- var isScroll = isEqual$1('scroll');
7195
- var isAuto = isEqual$1('auto');
7196
- var isVisible$1 = isEqual$1('visible');
7201
+ var isScroll = isEqual('scroll');
7202
+ var isAuto = isEqual('auto');
7203
+ var isVisible = isEqual('visible');
7197
7204
 
7198
7205
  var isEither = function isEither(overflow, fn) {
7199
7206
  return fn(overflow.overflowX) || fn(overflow.overflowY);
@@ -7236,7 +7243,7 @@ var isBodyScrollable = function isBodyScrollable() {
7236
7243
  overflowY: htmlStyle.overflowY
7237
7244
  };
7238
7245
 
7239
- if (isBoth(htmlOverflow, isVisible$1)) {
7246
+ if (isBoth(htmlOverflow, isVisible)) {
7240
7247
  return false;
7241
7248
  }
7242
7249
 
@@ -7264,12 +7271,14 @@ var getClosestScrollable = function getClosestScrollable(el) {
7264
7271
  return el;
7265
7272
  };
7266
7273
 
7274
+ var getClosestScrollable$1 = getClosestScrollable;
7275
+
7267
7276
  var checkForNestedScrollContainers = (function (scrollable) {
7268
7277
  if (!scrollable) {
7269
7278
  return;
7270
7279
  }
7271
7280
 
7272
- var anotherScrollParent = getClosestScrollable(scrollable.parentElement);
7281
+ var anotherScrollParent = getClosestScrollable$1(scrollable.parentElement);
7273
7282
 
7274
7283
  if (!anotherScrollParent) {
7275
7284
  return;
@@ -7278,7 +7287,7 @@ var checkForNestedScrollContainers = (function (scrollable) {
7278
7287
  process.env.NODE_ENV !== "production" ? warning("\n Droppable: unsupported nested scroll container detected.\n A Droppable can only have one scroll parent (which can be itself)\n Nested scroll containers are currently not supported.\n\n We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131\n ") : void 0;
7279
7288
  });
7280
7289
 
7281
- var getScroll$1 = (function (el) {
7290
+ var getScroll = (function (el) {
7282
7291
  return {
7283
7292
  x: el.scrollLeft,
7284
7293
  y: el.scrollTop
@@ -7300,7 +7309,7 @@ var getIsFixed = function getIsFixed(el) {
7300
7309
  };
7301
7310
 
7302
7311
  var getEnv = (function (start) {
7303
- var closestScrollable = getClosestScrollable(start);
7312
+ var closestScrollable = getClosestScrollable$1(start);
7304
7313
  var isFixedOnPage = getIsFixed(start);
7305
7314
  return {
7306
7315
  closestScrollable: closestScrollable,
@@ -7400,7 +7409,7 @@ var getClient = function getClient(targetRef, closestScrollable) {
7400
7409
  return client;
7401
7410
  };
7402
7411
 
7403
- var getDimension = (function (_ref) {
7412
+ var getDimension$1 = (function (_ref) {
7404
7413
  var ref = _ref.ref,
7405
7414
  descriptor = _ref.descriptor,
7406
7415
  env = _ref.env,
@@ -7426,7 +7435,7 @@ var getDimension = (function (_ref) {
7426
7435
  return {
7427
7436
  client: frameClient,
7428
7437
  page: withScroll(frameClient, windowScroll),
7429
- scroll: getScroll$1(closestScrollable),
7438
+ scroll: getScroll(closestScrollable),
7430
7439
  scrollSize: scrollSize,
7431
7440
  shouldClipSubject: shouldClipSubject
7432
7441
  };
@@ -7497,7 +7506,7 @@ function useDroppablePublisher(args) {
7497
7506
  return origin;
7498
7507
  }
7499
7508
 
7500
- return getScroll$1(dragging.env.closestScrollable);
7509
+ return getScroll(dragging.env.closestScrollable);
7501
7510
  }, []);
7502
7511
  var updateScroll = useCallback(function () {
7503
7512
  var scroll = getClosestScroll();
@@ -7532,7 +7541,7 @@ function useDroppablePublisher(args) {
7532
7541
  scrollOptions: options
7533
7542
  };
7534
7543
  whileDraggingRef.current = dragging;
7535
- var dimension = getDimension({
7544
+ var dimension = getDimension$1({
7536
7545
  ref: ref,
7537
7546
  descriptor: descriptor,
7538
7547
  env: env,
@@ -7559,7 +7568,7 @@ function useDroppablePublisher(args) {
7559
7568
  var dragging = whileDraggingRef.current;
7560
7569
  var closest = getClosestScrollableFromDrag(dragging);
7561
7570
  !(dragging && closest) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Can only recollect Droppable client for Droppables that have a scroll container') : invariant(false) : void 0;
7562
- return getScroll$1(closest);
7571
+ return getScroll(closest);
7563
7572
  }, []);
7564
7573
  var dragStopped = useCallback(function () {
7565
7574
  var dragging = whileDraggingRef.current;
@@ -7598,7 +7607,7 @@ function useDroppablePublisher(args) {
7598
7607
  callbacks: callbacks
7599
7608
  };
7600
7609
  }, [callbacks, descriptor, uniqueId]);
7601
- useIsomorphicLayoutEffect(function () {
7610
+ useLayoutEffect(function () {
7602
7611
  publishedDescriptorRef.current = entry.descriptor;
7603
7612
  registry.droppable.register(entry);
7604
7613
  return function () {
@@ -7610,14 +7619,14 @@ function useDroppablePublisher(args) {
7610
7619
  registry.droppable.unregister(entry);
7611
7620
  };
7612
7621
  }, [callbacks, descriptor, dragStopped, entry, marshal, registry.droppable]);
7613
- useIsomorphicLayoutEffect(function () {
7622
+ useLayoutEffect(function () {
7614
7623
  if (!whileDraggingRef.current) {
7615
7624
  return;
7616
7625
  }
7617
7626
 
7618
7627
  marshal.updateDroppableIsEnabled(publishedDescriptorRef.current.id, !args.isDropDisabled);
7619
7628
  }, [args.isDropDisabled, marshal]);
7620
- useIsomorphicLayoutEffect(function () {
7629
+ useLayoutEffect(function () {
7621
7630
  if (!whileDraggingRef.current) {
7622
7631
  return;
7623
7632
  }
@@ -7626,7 +7635,7 @@ function useDroppablePublisher(args) {
7626
7635
  }, [args.isCombineEnabled, marshal]);
7627
7636
  }
7628
7637
 
7629
- function noop$2() {}
7638
+ function noop() {}
7630
7639
 
7631
7640
  var empty = {
7632
7641
  width: 0,
@@ -7654,7 +7663,7 @@ var getSize = function getSize(_ref) {
7654
7663
  };
7655
7664
  };
7656
7665
 
7657
- var getStyle = function getStyle(_ref2) {
7666
+ var getStyle$1 = function getStyle(_ref2) {
7658
7667
  var isAnimatingOpenOnMount = _ref2.isAnimatingOpenOnMount,
7659
7668
  placeholder = _ref2.placeholder,
7660
7669
  animate = _ref2.animate;
@@ -7700,17 +7709,17 @@ function Placeholder(props) {
7700
7709
 
7701
7710
  useEffect(function () {
7702
7711
  if (!isAnimatingOpenOnMount) {
7703
- return noop$2;
7712
+ return noop;
7704
7713
  }
7705
7714
 
7706
7715
  if (animate !== 'open') {
7707
7716
  tryClearAnimateOpenTimer();
7708
7717
  setIsAnimatingOpenOnMount(false);
7709
- return noop$2;
7718
+ return noop;
7710
7719
  }
7711
7720
 
7712
7721
  if (animateOpenTimerRef.current) {
7713
- return noop$2;
7722
+ return noop;
7714
7723
  }
7715
7724
 
7716
7725
  animateOpenTimerRef.current = setTimeout(function () {
@@ -7730,7 +7739,7 @@ function Placeholder(props) {
7730
7739
  onClose();
7731
7740
  }
7732
7741
  }, [animate, onClose, onTransitionEnd]);
7733
- var style = getStyle({
7742
+ var style = getStyle$1({
7734
7743
  isAnimatingOpenOnMount: isAnimatingOpenOnMount,
7735
7744
  animate: props.animate,
7736
7745
  placeholder: props.placeholder
@@ -7797,7 +7806,7 @@ var virtual = [function hasClone(_ref5) {
7797
7806
  var getPlaceholderRef = _ref6.getPlaceholderRef;
7798
7807
  !!getPlaceholderRef() ? process.env.NODE_ENV !== "production" ? invariant(false, 'Expected virtual list to not have a placeholder') : invariant(false) : void 0;
7799
7808
  }];
7800
- function useValidation(args) {
7809
+ function useValidation$1(args) {
7801
7810
  useDevSetupWarning(function () {
7802
7811
  runChecks(args, shared);
7803
7812
 
@@ -7957,11 +7966,11 @@ function getSecondaryStyle(secondary) {
7957
7966
  };
7958
7967
  }
7959
7968
 
7960
- function getStyle$1(mapped) {
7969
+ function getStyle(mapped) {
7961
7970
  return mapped.type === 'DRAGGING' ? getDraggingStyle(mapped) : getSecondaryStyle(mapped);
7962
7971
  }
7963
7972
 
7964
- function getDimension$1(descriptor, el, windowScroll) {
7973
+ function getDimension(descriptor, el, windowScroll) {
7965
7974
  if (windowScroll === void 0) {
7966
7975
  windowScroll = origin;
7967
7976
  }
@@ -8004,28 +8013,28 @@ function useDraggablePublisher(args) {
8004
8013
  isEnabled: isEnabled
8005
8014
  };
8006
8015
  }, [canDragInteractiveElements, isEnabled, shouldRespectForcePress]);
8007
- var getDimension = useCallback(function (windowScroll) {
8016
+ var getDimension$1 = useCallback(function (windowScroll) {
8008
8017
  var el = getDraggableRef();
8009
8018
  !el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot get dimension when no ref is set') : invariant(false) : void 0;
8010
- return getDimension$1(descriptor, el, windowScroll);
8019
+ return getDimension(descriptor, el, windowScroll);
8011
8020
  }, [descriptor, getDraggableRef]);
8012
8021
  var entry = useMemo(function () {
8013
8022
  return {
8014
8023
  uniqueId: uniqueId,
8015
8024
  descriptor: descriptor,
8016
8025
  options: options,
8017
- getDimension: getDimension
8026
+ getDimension: getDimension$1
8018
8027
  };
8019
- }, [descriptor, getDimension, options, uniqueId]);
8028
+ }, [descriptor, getDimension$1, options, uniqueId]);
8020
8029
  var publishedRef = useRef(entry);
8021
8030
  var isFirstPublishRef = useRef(true);
8022
- useIsomorphicLayoutEffect(function () {
8031
+ useLayoutEffect(function () {
8023
8032
  registry.draggable.register(publishedRef.current);
8024
8033
  return function () {
8025
8034
  return registry.draggable.unregister(publishedRef.current);
8026
8035
  };
8027
8036
  }, [registry.draggable]);
8028
- useIsomorphicLayoutEffect(function () {
8037
+ useLayoutEffect(function () {
8029
8038
  if (isFirstPublishRef.current) {
8030
8039
  isFirstPublishRef.current = false;
8031
8040
  return;
@@ -8037,7 +8046,7 @@ function useDraggablePublisher(args) {
8037
8046
  }, [entry, registry.draggable]);
8038
8047
  }
8039
8048
 
8040
- function useValidation$1(props, contextId, getRef) {
8049
+ function useValidation(props, contextId, getRef) {
8041
8050
  useDevSetupWarning(function () {
8042
8051
  function prefix(id) {
8043
8052
  return "Draggable[id: " + id + "]: ";
@@ -8106,7 +8115,7 @@ function Draggable(props) {
8106
8115
  isClone = props.isClone,
8107
8116
  mapped = props.mapped,
8108
8117
  dropAnimationFinishedAction = props.dropAnimationFinished;
8109
- useValidation$1(props, contextId, getRef);
8118
+ useValidation(props, contextId, getRef);
8110
8119
  useClonePropValidation(isClone);
8111
8120
 
8112
8121
  if (!isClone) {
@@ -8150,7 +8159,7 @@ function Draggable(props) {
8150
8159
  dropAnimationFinishedAction();
8151
8160
  }, [dropAnimationFinishedAction, mapped]);
8152
8161
  var provided = useMemo(function () {
8153
- var style = getStyle$1(mapped);
8162
+ var style = getStyle(mapped);
8154
8163
  var onTransitionEnd = mapped.type === 'DRAGGING' && mapped.dropping ? onMoveEnd : null;
8155
8164
  var result = {
8156
8165
  innerRef: setRef,
@@ -8405,7 +8414,7 @@ function getSecondarySelector() {
8405
8414
  return selector;
8406
8415
  }
8407
8416
 
8408
- var makeMapStateToProps = function makeMapStateToProps() {
8417
+ var makeMapStateToProps$1 = function makeMapStateToProps() {
8409
8418
  var draggingSelector = getDraggableSelector();
8410
8419
  var secondarySelector = getSecondarySelector();
8411
8420
 
@@ -8415,14 +8424,15 @@ var makeMapStateToProps = function makeMapStateToProps() {
8415
8424
 
8416
8425
  return selector;
8417
8426
  };
8418
- var mapDispatchToProps = {
8427
+ var mapDispatchToProps$1 = {
8419
8428
  dropAnimationFinished: dropAnimationFinished
8420
8429
  };
8421
- var ConnectedDraggable = connect(makeMapStateToProps, mapDispatchToProps, null, {
8430
+ var ConnectedDraggable = connect(makeMapStateToProps$1, mapDispatchToProps$1, null, {
8422
8431
  context: StoreContext,
8423
8432
  pure: true,
8424
8433
  areStatePropsEqual: isStrictEqual
8425
8434
  })(Draggable);
8435
+ var ConnectedDraggable$1 = ConnectedDraggable;
8426
8436
 
8427
8437
  function PrivateDraggable(props) {
8428
8438
  var droppableContext = useRequiredContext(DroppableContext);
@@ -8432,7 +8442,7 @@ function PrivateDraggable(props) {
8432
8442
  return null;
8433
8443
  }
8434
8444
 
8435
- return React.createElement(ConnectedDraggable, props);
8445
+ return React.createElement(ConnectedDraggable$1, props);
8436
8446
  }
8437
8447
  function PublicDraggable(props) {
8438
8448
  var isEnabled = typeof props.isDragDisabled === 'boolean' ? !props.isDragDisabled : true;
@@ -8477,7 +8487,7 @@ function Droppable(props) {
8477
8487
  var setPlaceholderRef = useCallback(function (value) {
8478
8488
  placeholderRef.current = value;
8479
8489
  }, []);
8480
- useValidation({
8490
+ useValidation$1({
8481
8491
  props: props,
8482
8492
  getDroppableRef: getDroppableRef,
8483
8493
  getPlaceholderRef: getPlaceholderRef
@@ -8559,6 +8569,38 @@ function Droppable(props) {
8559
8569
  }, children(provided, snapshot), getClone());
8560
8570
  }
8561
8571
 
8572
+ function getBody() {
8573
+ !document.body ? process.env.NODE_ENV !== "production" ? invariant(false, 'document.body is not ready') : invariant(false) : void 0;
8574
+ return document.body;
8575
+ }
8576
+
8577
+ var defaultProps = {
8578
+ mode: 'standard',
8579
+ type: 'DEFAULT',
8580
+ direction: 'vertical',
8581
+ isDropDisabled: false,
8582
+ isCombineEnabled: false,
8583
+ ignoreContainerClipping: false,
8584
+ renderClone: null,
8585
+ getContainerForClone: getBody
8586
+ };
8587
+
8588
+ var attachDefaultPropsToOwnProps = function attachDefaultPropsToOwnProps(ownProps) {
8589
+ var mergedProps = _extends({}, ownProps);
8590
+
8591
+ var defaultPropKey;
8592
+
8593
+ for (defaultPropKey in defaultProps) {
8594
+ if (ownProps[defaultPropKey] === undefined) {
8595
+ var _extends2;
8596
+
8597
+ mergedProps = _extends({}, mergedProps, (_extends2 = {}, _extends2[defaultPropKey] = defaultProps[defaultPropKey], _extends2));
8598
+ }
8599
+ }
8600
+
8601
+ return mergedProps;
8602
+ };
8603
+
8562
8604
  var isMatchingType = function isMatchingType(type, critical) {
8563
8605
  return type === critical.droppable.type;
8564
8606
  };
@@ -8567,7 +8609,7 @@ var getDraggable = function getDraggable(critical, dimensions) {
8567
8609
  return dimensions.draggables[critical.draggable.id];
8568
8610
  };
8569
8611
 
8570
- var makeMapStateToProps$1 = function makeMapStateToProps() {
8612
+ var makeMapStateToProps = function makeMapStateToProps() {
8571
8613
  var idleWithAnimation = {
8572
8614
  placeholder: null,
8573
8615
  shouldAnimatePlaceholder: true,
@@ -8640,10 +8682,11 @@ var makeMapStateToProps$1 = function makeMapStateToProps() {
8640
8682
  });
8641
8683
 
8642
8684
  var selector = function selector(state, ownProps) {
8643
- var id = ownProps.droppableId;
8644
- var type = ownProps.type;
8645
- var isEnabled = !ownProps.isDropDisabled;
8646
- var renderClone = ownProps.renderClone;
8685
+ var ownPropsWithDefaultProps = attachDefaultPropsToOwnProps(ownProps);
8686
+ var id = ownPropsWithDefaultProps.droppableId;
8687
+ var type = ownPropsWithDefaultProps.type;
8688
+ var isEnabled = !ownPropsWithDefaultProps.isDropDisabled;
8689
+ var renderClone = ownPropsWithDefaultProps.renderClone;
8647
8690
 
8648
8691
  if (state.isDragging) {
8649
8692
  var critical = state.critical;
@@ -8696,30 +8739,16 @@ var makeMapStateToProps$1 = function makeMapStateToProps() {
8696
8739
 
8697
8740
  return selector;
8698
8741
  };
8699
- var mapDispatchToProps$1 = {
8742
+ var mapDispatchToProps = {
8700
8743
  updateViewportMaxScroll: updateViewportMaxScroll
8701
8744
  };
8702
-
8703
- function getBody() {
8704
- !document.body ? process.env.NODE_ENV !== "production" ? invariant(false, 'document.body is not ready') : invariant(false) : void 0;
8705
- return document.body;
8706
- }
8707
-
8708
- var defaultProps = {
8709
- mode: 'standard',
8710
- type: 'DEFAULT',
8711
- direction: 'vertical',
8712
- isDropDisabled: false,
8713
- isCombineEnabled: false,
8714
- ignoreContainerClipping: false,
8715
- renderClone: null,
8716
- getContainerForClone: getBody
8717
- };
8718
- var ConnectedDroppable = connect(makeMapStateToProps$1, mapDispatchToProps$1, null, {
8745
+ var ConnectedDroppable = connect(makeMapStateToProps, mapDispatchToProps, function (stateProps, dispatchProps, ownProps) {
8746
+ return _extends({}, attachDefaultPropsToOwnProps(ownProps), {}, stateProps, {}, dispatchProps);
8747
+ }, {
8719
8748
  context: StoreContext,
8720
8749
  pure: true,
8721
8750
  areStatePropsEqual: isStrictEqual
8722
8751
  })(Droppable);
8723
- ConnectedDroppable.defaultProps = defaultProps;
8752
+ var ConnectedDroppable$1 = ConnectedDroppable;
8724
8753
 
8725
- export { DragDropContext, PublicDraggable as Draggable, ConnectedDroppable as Droppable, resetServerContext, useKeyboardSensor, useMouseSensor, useTouchSensor };
8754
+ export { DragDropContext, PublicDraggable as Draggable, ConnectedDroppable$1 as Droppable, resetServerContext, useKeyboardSensor, useMouseSensor, useTouchSensor };