@dxos/react-ui 0.3.11-main.c01834e → 0.3.11-main.c8e9429

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.
@@ -1255,24 +1255,24 @@ var useSwipeToDismiss = (ref, {
1255
1255
  /* side = 'inline-start' */
1256
1256
  }) => {
1257
1257
  const $root = ref.current;
1258
- const [motionState, setMotionState] = useState3(MotionState.IDLE);
1258
+ const [motionState, setMotionState] = useState3(0);
1259
1259
  const [gestureStartX, setGestureStartX] = useState3(0);
1260
1260
  const setIdle = useCallback2(() => {
1261
- setMotionState(MotionState.IDLE);
1261
+ setMotionState(0);
1262
1262
  $root?.style.removeProperty("inset-inline-start");
1263
1263
  $root?.style.setProperty("transition-duration", "200ms");
1264
1264
  }, [
1265
1265
  $root
1266
1266
  ]);
1267
1267
  const setFollowing = useCallback2(() => {
1268
- setMotionState(MotionState.FOLLOWING);
1268
+ setMotionState(2);
1269
1269
  $root?.style.setProperty("transition-duration", "0ms");
1270
1270
  }, [
1271
1271
  $root
1272
1272
  ]);
1273
1273
  const handlePointerDown = useCallback2(({ screenX }) => {
1274
- if (motionState === MotionState.IDLE) {
1275
- setMotionState(MotionState.DEBOUNCING);
1274
+ if (motionState === 0) {
1275
+ setMotionState(1);
1276
1276
  setGestureStartX(screenX);
1277
1277
  }
1278
1278
  }, [
@@ -1282,7 +1282,7 @@ var useSwipeToDismiss = (ref, {
1282
1282
  if ($root) {
1283
1283
  const delta = Math.min(screenX - gestureStartX, 0);
1284
1284
  switch (motionState) {
1285
- case MotionState.FOLLOWING:
1285
+ case 2:
1286
1286
  if (Math.abs(delta) > dismissThreshold) {
1287
1287
  setIdle();
1288
1288
  onDismiss?.();
@@ -1290,7 +1290,7 @@ var useSwipeToDismiss = (ref, {
1290
1290
  $root.style.setProperty("inset-inline-start", `${offset + delta}px`);
1291
1291
  }
1292
1292
  break;
1293
- case MotionState.DEBOUNCING:
1293
+ case 1:
1294
1294
  if (Math.abs(delta) > debounceThreshold) {
1295
1295
  setFollowing();
1296
1296
  }