@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.
- package/es/hooks.js +18 -28
- 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(
|
|
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:
|
|
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
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
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:
|
|
472
|
+
direction: t22
|
|
483
473
|
};
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
474
|
+
$[30] = bind;
|
|
475
|
+
$[31] = dragging;
|
|
476
|
+
$[32] = progress;
|
|
477
|
+
$[33] = t22;
|
|
478
|
+
$[34] = transitioning;
|
|
479
|
+
$[35] = t23;
|
|
490
480
|
} else {
|
|
491
|
-
|
|
481
|
+
t23 = $[35];
|
|
492
482
|
}
|
|
493
|
-
return
|
|
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.
|
|
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": "
|
|
160
|
+
"gitHead": "cf331286bb6037d61e664cd5c961955c136719c6",
|
|
161
161
|
"types": "es/index.d.ts"
|
|
162
162
|
}
|