@micromag/core 0.4.86 → 0.4.88

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.
Files changed (2) hide show
  1. package/es/hooks.js +18 -28
  2. package/package.json +2 -2
package/es/hooks.js CHANGED
@@ -259,7 +259,7 @@ const defaultDragOptions = {
259
259
  filterTaps: true
260
260
  };
261
261
  function useDragProgress(t0) {
262
- const $ = c(41);
262
+ const $ = c(36);
263
263
  const {
264
264
  progress: wantedProgress,
265
265
  onTap: t1,
@@ -337,7 +337,8 @@ function useDragProgress(t0) {
337
337
  const {
338
338
  active,
339
339
  tap,
340
- first
340
+ first,
341
+ last
341
342
  } = gestureState;
342
343
  if (disabled) {
343
344
  draggingRef.current = false;
@@ -373,7 +374,7 @@ function useDragProgress(t0) {
373
374
  }
374
375
  },
375
376
  onStart: first ? onTransitionStart : undefined,
376
- onRest: !active ? onTransitionComplete : undefined,
377
+ onRest: last ? onTransitionComplete : undefined,
377
378
  ...springParams
378
379
  });
379
380
  if (onProgress !== null) {
@@ -459,38 +460,27 @@ function useDragProgress(t0) {
459
460
  t21 = $[29];
460
461
  }
461
462
  useEffect(t20, t21);
462
- let t22;
463
- if ($[30] !== dragging || $[31] !== progress || $[32] !== transitioned || $[33] !== wantedProgress) {
464
- t22 = wantedProgress !== progress.get() || progress.isAnimating || dragging || !transitioned;
465
- $[30] = dragging;
466
- $[31] = progress;
467
- $[32] = transitioned;
468
- $[33] = wantedProgress;
469
- $[34] = t22;
470
- } else {
471
- t22 = $[34];
472
- }
473
- const transitioning = t22;
474
- const t23 = wantedProgress !== lastWantedProgress ? wantedProgress < lastWantedProgress ? -1 : 1 : direction;
475
- let t24;
476
- if ($[35] !== bind || $[36] !== dragging || $[37] !== progress || $[38] !== t23 || $[39] !== transitioning) {
477
- t24 = {
463
+ const transitioning = progress.isAnimating || dragging || !transitioned;
464
+ const t22 = wantedProgress !== lastWantedProgress ? wantedProgress < lastWantedProgress ? -1 : 1 : direction;
465
+ let t23;
466
+ if ($[30] !== bind || $[31] !== dragging || $[32] !== progress || $[33] !== t22 || $[34] !== transitioning) {
467
+ t23 = {
478
468
  transitioning,
479
469
  bind,
480
470
  dragging,
481
471
  progress,
482
- direction: t23
472
+ direction: t22
483
473
  };
484
- $[35] = bind;
485
- $[36] = dragging;
486
- $[37] = progress;
487
- $[38] = t23;
488
- $[39] = transitioning;
489
- $[40] = t24;
474
+ $[30] = bind;
475
+ $[31] = dragging;
476
+ $[32] = progress;
477
+ $[33] = t22;
478
+ $[34] = transitioning;
479
+ $[35] = t23;
490
480
  } else {
491
- t24 = $[40];
481
+ t23 = $[35];
492
482
  }
493
- return t24;
483
+ return t23;
494
484
  }
495
485
 
496
486
  function useForm(t0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.4.86",
3
+ "version": "0.4.88",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -157,6 +157,6 @@
157
157
  "access": "public",
158
158
  "registry": "https://registry.npmjs.org/"
159
159
  },
160
- "gitHead": "24785d81e840b81c58dc101ba7305d088e61f0e0",
160
+ "gitHead": "cf331286bb6037d61e664cd5c961955c136719c6",
161
161
  "types": "es/index.d.ts"
162
162
  }