@rootnative/inertia 0.0.4 → 0.0.5
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/CHANGELOG.md +52 -1
- package/README.md +5 -1
- package/dist/{chunk-NAOXQJ7U.mjs → chunk-27MKBTSG.mjs} +1 -1
- package/dist/{chunk-CENTULW6.js → chunk-27U6766G.js} +2 -2
- package/dist/{chunk-D5KAHWMC.js → chunk-4NAMD62I.js} +7 -7
- package/dist/chunk-67GHRCF6.js +8 -0
- package/dist/{chunk-4ASOELLA.mjs → chunk-COEJVWRZ.mjs} +1 -1
- package/dist/chunk-GPOMFIIU.js +8 -0
- package/dist/{chunk-YKGY22SB.mjs → chunk-GTJ6VAH5.mjs} +1 -1
- package/dist/chunk-K63LXGKS.js +8 -0
- package/dist/{chunk-RF7J5FRM.mjs → chunk-OAUWLPQH.mjs} +1 -1
- package/dist/{chunk-WVRCKOPO.js → chunk-OBRGJAST.js} +3 -3
- package/dist/{chunk-K3CLP74S.mjs → chunk-OW5XTGVN.mjs} +2 -2
- package/dist/{chunk-7A6WTXNK.js → chunk-PM6CVGXJ.js} +1 -0
- package/dist/{chunk-XMEVPEMH.js → chunk-QQVDZKSD.js} +2 -2
- package/dist/{chunk-TU2XFPAK.mjs → chunk-REYL77RE.mjs} +1 -0
- package/dist/{chunk-55W7BNO2.mjs → chunk-RIVVBABB.mjs} +130 -59
- package/dist/{chunk-MYE5NMXW.js → chunk-VQ5D35UA.js} +154 -83
- package/dist/{chunk-J5Q46OPW.mjs → chunk-XSK5MNUH.mjs} +1 -1
- package/dist/{chunk-QKC3APP4.mjs → chunk-Z3HCJ43H.mjs} +1 -1
- package/dist/gestureLayer/index.d.mts +2 -2
- package/dist/gestureLayer/index.d.ts +2 -2
- package/dist/gestureLayer/index.js +10 -10
- package/dist/gestureLayer/index.mjs +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +48 -48
- package/dist/index.mjs +17 -17
- package/dist/motion/Image.d.mts +1 -1
- package/dist/motion/Image.d.ts +1 -1
- package/dist/motion/Image.js +5 -5
- package/dist/motion/Image.mjs +4 -4
- package/dist/motion/Pressable.d.mts +1 -1
- package/dist/motion/Pressable.d.ts +1 -1
- package/dist/motion/Pressable.js +5 -5
- package/dist/motion/Pressable.mjs +4 -4
- package/dist/motion/ScrollView.d.mts +1 -1
- package/dist/motion/ScrollView.d.ts +1 -1
- package/dist/motion/ScrollView.js +5 -5
- package/dist/motion/ScrollView.mjs +4 -4
- package/dist/motion/Text.d.mts +1 -1
- package/dist/motion/Text.d.ts +1 -1
- package/dist/motion/Text.js +5 -5
- package/dist/motion/Text.mjs +4 -4
- package/dist/motion/View.d.mts +1 -1
- package/dist/motion/View.d.ts +1 -1
- package/dist/motion/View.js +5 -5
- package/dist/motion/View.mjs +4 -4
- package/dist/touch/index.d.mts +1 -1
- package/dist/touch/index.d.ts +1 -1
- package/dist/touch/index.js +3 -3
- package/dist/touch/index.mjs +1 -1
- package/dist/{types-37pN82yh.d.mts → types-BQgLJeQG.d.mts} +39 -3
- package/dist/{types-37pN82yh.d.ts → types-BQgLJeQG.d.ts} +39 -3
- package/dist/{useGesture-Cl4uzZIr.d.ts → useGesture-B0_CzOUz.d.ts} +1 -1
- package/dist/{useGesture-_IKkS8Dv.d.mts → useGesture-DfaTx-3t.d.mts} +1 -1
- package/package.json +1 -1
- package/src/motion/createMotionComponent.tsx +145 -61
- package/src/transitions/resolveSequence.ts +12 -0
- package/src/types.ts +106 -3
- package/dist/chunk-5SRD2WCO.js +0 -8
- package/dist/chunk-TVFNJ25Z.js +0 -8
- package/dist/chunk-VLDIFL3F.js +0 -8
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
3
|
+
var chunk4NAMD62I_js = require('./chunk-4NAMD62I.js');
|
|
4
|
+
var chunkK63LXGKS_js = require('./chunk-K63LXGKS.js');
|
|
5
|
+
var chunk67GHRCF6_js = require('./chunk-67GHRCF6.js');
|
|
6
|
+
var chunkGPOMFIIU_js = require('./chunk-GPOMFIIU.js');
|
|
7
|
+
var chunk27U6766G_js = require('./chunk-27U6766G.js');
|
|
8
|
+
var chunkQQVDZKSD_js = require('./chunk-QQVDZKSD.js');
|
|
9
|
+
var chunkVQ5D35UA_js = require('./chunk-VQ5D35UA.js');
|
|
10
|
+
var chunkOBRGJAST_js = require('./chunk-OBRGJAST.js');
|
|
11
|
+
var chunkPM6CVGXJ_js = require('./chunk-PM6CVGXJ.js');
|
|
12
12
|
var react = require('react');
|
|
13
13
|
var reactNativeReanimated = require('react-native-reanimated');
|
|
14
14
|
var reactNativeWorklets = require('react-native-worklets');
|
|
15
15
|
|
|
16
16
|
// src/motion/index.ts
|
|
17
17
|
var Motion = {
|
|
18
|
-
View:
|
|
19
|
-
Text:
|
|
20
|
-
Image:
|
|
21
|
-
Pressable:
|
|
22
|
-
ScrollView:
|
|
18
|
+
View: chunkK63LXGKS_js.MotionView,
|
|
19
|
+
Text: chunk67GHRCF6_js.MotionText,
|
|
20
|
+
Image: chunkGPOMFIIU_js.MotionImage,
|
|
21
|
+
Pressable: chunk27U6766G_js.MotionPressable,
|
|
22
|
+
ScrollView: chunkQQVDZKSD_js.MotionScrollView
|
|
23
23
|
};
|
|
24
24
|
function useAnimation(target, transition) {
|
|
25
25
|
const output = reactNativeReanimated.useSharedValue(target);
|
|
26
|
-
const shouldReduceMotion =
|
|
27
|
-
const resolved =
|
|
28
|
-
const cfgSig =
|
|
26
|
+
const shouldReduceMotion = chunkOBRGJAST_js.useShouldReduceMotion();
|
|
27
|
+
const resolved = chunkOBRGJAST_js.resolveNamedTransition(transition, chunkOBRGJAST_js.useNamedTransitions());
|
|
28
|
+
const cfgSig = chunkPM6CVGXJ_js.stableSig(resolved);
|
|
29
29
|
react.useEffect(() => {
|
|
30
30
|
const cfg = shouldReduceMotion ? { type: "no-animation" } : resolved ?? { type: "spring" };
|
|
31
|
-
output.value =
|
|
31
|
+
output.value = chunkPM6CVGXJ_js.resolveTransition(cfg, target);
|
|
32
32
|
}, [target, cfgSig, shouldReduceMotion]);
|
|
33
33
|
react.useEffect(
|
|
34
34
|
() => () => reactNativeReanimated.cancelAnimation(output),
|
|
@@ -39,22 +39,22 @@ function useAnimation(target, transition) {
|
|
|
39
39
|
return output;
|
|
40
40
|
}
|
|
41
41
|
function useAnimator() {
|
|
42
|
-
const registry =
|
|
43
|
-
const shouldReduceMotion =
|
|
42
|
+
const registry = chunkOBRGJAST_js.useNamedTransitions();
|
|
43
|
+
const shouldReduceMotion = chunkOBRGJAST_js.useShouldReduceMotion();
|
|
44
44
|
const registryRef = react.useRef(registry);
|
|
45
45
|
registryRef.current = registry;
|
|
46
46
|
const reduceMotionRef = react.useRef(shouldReduceMotion);
|
|
47
47
|
reduceMotionRef.current = shouldReduceMotion;
|
|
48
48
|
return react.useCallback((value, to, transition) => {
|
|
49
|
-
const resolved =
|
|
49
|
+
const resolved = chunkOBRGJAST_js.resolveNamedTransition(transition, registryRef.current);
|
|
50
50
|
const cfg = reduceMotionRef.current ? { type: "no-animation" } : resolved ?? { type: "spring" };
|
|
51
|
-
value.value =
|
|
51
|
+
value.value = chunkPM6CVGXJ_js.resolveTransition(cfg, to);
|
|
52
52
|
}, []);
|
|
53
53
|
}
|
|
54
54
|
function useSpring(target, config) {
|
|
55
|
-
const spring = resolveSpringInput(config,
|
|
55
|
+
const spring = resolveSpringInput(config, chunkOBRGJAST_js.useNamedTransitions());
|
|
56
56
|
const reanimConfig = react.useMemo(
|
|
57
|
-
() =>
|
|
57
|
+
() => chunkPM6CVGXJ_js.springToReanimated(spring ?? {}),
|
|
58
58
|
// Keyed on the resolved primitive fields rather than the `config` object
|
|
59
59
|
// identity: callers routinely pass a fresh object literal each render, so
|
|
60
60
|
// depending on `config` itself would rebuild the Reanimated config on
|
|
@@ -99,7 +99,7 @@ function useSpring(target, config) {
|
|
|
99
99
|
}
|
|
100
100
|
function resolveSpringInput(config, registry) {
|
|
101
101
|
if (typeof config !== "string") return config;
|
|
102
|
-
const cfg =
|
|
102
|
+
const cfg = chunkOBRGJAST_js.lookupNamedTransition(config, registry);
|
|
103
103
|
if (cfg.type === void 0 || cfg.type === "spring") return cfg;
|
|
104
104
|
if (__DEV__) {
|
|
105
105
|
console.warn(
|
|
@@ -296,7 +296,7 @@ function useTransform(arg1, inputRange, outputRange, options) {
|
|
|
296
296
|
if (reactNativeWorklets.isWorkletFunction(userFn)) {
|
|
297
297
|
producer = userFn;
|
|
298
298
|
} else {
|
|
299
|
-
|
|
299
|
+
chunkPM6CVGXJ_js.warnNonWorkletOnce(
|
|
300
300
|
"useTransform-transformer",
|
|
301
301
|
"[inertia] useTransform: the transformer is not a worklet, so the shared values it reads can't be tracked as dependencies \u2014 the derived value will only refresh on React re-renders, and native builds reject plain functions on the UI thread. Add the 'worklet' directive as the first statement of the transformer."
|
|
302
302
|
);
|
|
@@ -362,9 +362,9 @@ function useShadow({
|
|
|
362
362
|
const hasElevation = from.elevation !== void 0 || to.elevation !== void 0;
|
|
363
363
|
const hasColor = from.shadowColor !== void 0 || to.shadowColor !== void 0;
|
|
364
364
|
const hasOffset = from.shadowOffset !== void 0 || to.shadowOffset !== void 0;
|
|
365
|
-
const boxShadowPairs = from.boxShadow !== void 0 || to.boxShadow !== void 0 ?
|
|
366
|
-
|
|
367
|
-
|
|
365
|
+
const boxShadowPairs = from.boxShadow !== void 0 || to.boxShadow !== void 0 ? chunkVQ5D35UA_js.pairBoxShadowLayers(
|
|
366
|
+
chunkVQ5D35UA_js.resolveBoxShadowInput(from.boxShadow),
|
|
367
|
+
chunkVQ5D35UA_js.resolveBoxShadowInput(to.boxShadow)
|
|
368
368
|
) : [];
|
|
369
369
|
const opacityFrom = from.shadowOpacity ?? 0;
|
|
370
370
|
const opacityTo = to.shadowOpacity ?? 0;
|
|
@@ -463,79 +463,79 @@ function useVariants(variants, initial) {
|
|
|
463
463
|
|
|
464
464
|
Object.defineProperty(exports, "useGesture", {
|
|
465
465
|
enumerable: true,
|
|
466
|
-
get: function () { return
|
|
466
|
+
get: function () { return chunk4NAMD62I_js.useGesture; }
|
|
467
467
|
});
|
|
468
468
|
Object.defineProperty(exports, "MotionView", {
|
|
469
469
|
enumerable: true,
|
|
470
|
-
get: function () { return
|
|
470
|
+
get: function () { return chunkK63LXGKS_js.MotionView; }
|
|
471
471
|
});
|
|
472
472
|
Object.defineProperty(exports, "MotionText", {
|
|
473
473
|
enumerable: true,
|
|
474
|
-
get: function () { return
|
|
474
|
+
get: function () { return chunk67GHRCF6_js.MotionText; }
|
|
475
475
|
});
|
|
476
476
|
Object.defineProperty(exports, "MotionImage", {
|
|
477
477
|
enumerable: true,
|
|
478
|
-
get: function () { return
|
|
478
|
+
get: function () { return chunkGPOMFIIU_js.MotionImage; }
|
|
479
479
|
});
|
|
480
480
|
Object.defineProperty(exports, "MotionPressable", {
|
|
481
481
|
enumerable: true,
|
|
482
|
-
get: function () { return
|
|
482
|
+
get: function () { return chunk27U6766G_js.MotionPressable; }
|
|
483
483
|
});
|
|
484
484
|
Object.defineProperty(exports, "MotionScrollView", {
|
|
485
485
|
enumerable: true,
|
|
486
|
-
get: function () { return
|
|
486
|
+
get: function () { return chunkQQVDZKSD_js.MotionScrollView; }
|
|
487
487
|
});
|
|
488
488
|
Object.defineProperty(exports, "Presence", {
|
|
489
489
|
enumerable: true,
|
|
490
|
-
get: function () { return
|
|
490
|
+
get: function () { return chunkVQ5D35UA_js.Presence; }
|
|
491
491
|
});
|
|
492
492
|
Object.defineProperty(exports, "createMotionComponent", {
|
|
493
493
|
enumerable: true,
|
|
494
|
-
get: function () { return
|
|
494
|
+
get: function () { return chunkVQ5D35UA_js.createMotionComponent; }
|
|
495
495
|
});
|
|
496
496
|
Object.defineProperty(exports, "usePresence", {
|
|
497
497
|
enumerable: true,
|
|
498
|
-
get: function () { return
|
|
498
|
+
get: function () { return chunkVQ5D35UA_js.usePresence; }
|
|
499
499
|
});
|
|
500
500
|
Object.defineProperty(exports, "MotionConfig", {
|
|
501
501
|
enumerable: true,
|
|
502
|
-
get: function () { return
|
|
502
|
+
get: function () { return chunkOBRGJAST_js.MotionConfig; }
|
|
503
503
|
});
|
|
504
504
|
Object.defineProperty(exports, "resolveNamedTransition", {
|
|
505
505
|
enumerable: true,
|
|
506
|
-
get: function () { return
|
|
506
|
+
get: function () { return chunkOBRGJAST_js.resolveNamedTransition; }
|
|
507
507
|
});
|
|
508
508
|
Object.defineProperty(exports, "useMotionConfig", {
|
|
509
509
|
enumerable: true,
|
|
510
|
-
get: function () { return
|
|
510
|
+
get: function () { return chunkOBRGJAST_js.useMotionConfig; }
|
|
511
511
|
});
|
|
512
512
|
Object.defineProperty(exports, "useNamedTransitions", {
|
|
513
513
|
enumerable: true,
|
|
514
|
-
get: function () { return
|
|
514
|
+
get: function () { return chunkOBRGJAST_js.useNamedTransitions; }
|
|
515
515
|
});
|
|
516
516
|
Object.defineProperty(exports, "useShouldReduceMotion", {
|
|
517
517
|
enumerable: true,
|
|
518
|
-
get: function () { return
|
|
518
|
+
get: function () { return chunkOBRGJAST_js.useShouldReduceMotion; }
|
|
519
519
|
});
|
|
520
520
|
Object.defineProperty(exports, "buildReleaseAnimation", {
|
|
521
521
|
enumerable: true,
|
|
522
|
-
get: function () { return
|
|
522
|
+
get: function () { return chunkPM6CVGXJ_js.buildReleaseAnimation; }
|
|
523
523
|
});
|
|
524
524
|
Object.defineProperty(exports, "cubicBezier", {
|
|
525
525
|
enumerable: true,
|
|
526
|
-
get: function () { return
|
|
526
|
+
get: function () { return chunkPM6CVGXJ_js.cubicBezier; }
|
|
527
527
|
});
|
|
528
528
|
Object.defineProperty(exports, "ensureWorkletEasing", {
|
|
529
529
|
enumerable: true,
|
|
530
|
-
get: function () { return
|
|
530
|
+
get: function () { return chunkPM6CVGXJ_js.ensureWorkletEasing; }
|
|
531
531
|
});
|
|
532
532
|
Object.defineProperty(exports, "resolveAnimatableValue", {
|
|
533
533
|
enumerable: true,
|
|
534
|
-
get: function () { return
|
|
534
|
+
get: function () { return chunkPM6CVGXJ_js.resolveAnimatableValue; }
|
|
535
535
|
});
|
|
536
536
|
Object.defineProperty(exports, "resolveTransition", {
|
|
537
537
|
enumerable: true,
|
|
538
|
-
get: function () { return
|
|
538
|
+
get: function () { return chunkPM6CVGXJ_js.resolveTransition; }
|
|
539
539
|
});
|
|
540
540
|
exports.Motion = Motion;
|
|
541
541
|
exports.useAnimation = useAnimation;
|
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { useGesture } from './chunk-
|
|
2
|
-
import { MotionView } from './chunk-
|
|
3
|
-
export { MotionView } from './chunk-
|
|
4
|
-
import { MotionText } from './chunk-
|
|
5
|
-
export { MotionText } from './chunk-
|
|
6
|
-
import { MotionImage } from './chunk-
|
|
7
|
-
export { MotionImage } from './chunk-
|
|
8
|
-
import { MotionPressable } from './chunk-
|
|
9
|
-
export { MotionPressable } from './chunk-
|
|
10
|
-
import { MotionScrollView } from './chunk-
|
|
11
|
-
export { MotionScrollView } from './chunk-
|
|
12
|
-
import { pairBoxShadowLayers, resolveBoxShadowInput } from './chunk-
|
|
13
|
-
export { Presence, createMotionComponent, usePresence } from './chunk-
|
|
14
|
-
import { useShouldReduceMotion, resolveNamedTransition, useNamedTransitions, lookupNamedTransition } from './chunk-
|
|
15
|
-
export { MotionConfig, resolveNamedTransition, useMotionConfig, useNamedTransitions, useShouldReduceMotion } from './chunk-
|
|
16
|
-
import { stableSig, resolveTransition, springToReanimated, warnNonWorkletOnce } from './chunk-
|
|
17
|
-
export { buildReleaseAnimation, cubicBezier, ensureWorkletEasing, resolveAnimatableValue, resolveTransition } from './chunk-
|
|
1
|
+
export { useGesture } from './chunk-OW5XTGVN.mjs';
|
|
2
|
+
import { MotionView } from './chunk-GTJ6VAH5.mjs';
|
|
3
|
+
export { MotionView } from './chunk-GTJ6VAH5.mjs';
|
|
4
|
+
import { MotionText } from './chunk-COEJVWRZ.mjs';
|
|
5
|
+
export { MotionText } from './chunk-COEJVWRZ.mjs';
|
|
6
|
+
import { MotionImage } from './chunk-XSK5MNUH.mjs';
|
|
7
|
+
export { MotionImage } from './chunk-XSK5MNUH.mjs';
|
|
8
|
+
import { MotionPressable } from './chunk-OAUWLPQH.mjs';
|
|
9
|
+
export { MotionPressable } from './chunk-OAUWLPQH.mjs';
|
|
10
|
+
import { MotionScrollView } from './chunk-27MKBTSG.mjs';
|
|
11
|
+
export { MotionScrollView } from './chunk-27MKBTSG.mjs';
|
|
12
|
+
import { pairBoxShadowLayers, resolveBoxShadowInput } from './chunk-RIVVBABB.mjs';
|
|
13
|
+
export { Presence, createMotionComponent, usePresence } from './chunk-RIVVBABB.mjs';
|
|
14
|
+
import { useShouldReduceMotion, resolveNamedTransition, useNamedTransitions, lookupNamedTransition } from './chunk-Z3HCJ43H.mjs';
|
|
15
|
+
export { MotionConfig, resolveNamedTransition, useMotionConfig, useNamedTransitions, useShouldReduceMotion } from './chunk-Z3HCJ43H.mjs';
|
|
16
|
+
import { stableSig, resolveTransition, springToReanimated, warnNonWorkletOnce } from './chunk-REYL77RE.mjs';
|
|
17
|
+
export { buildReleaseAnimation, cubicBezier, ensureWorkletEasing, resolveAnimatableValue, resolveTransition } from './chunk-REYL77RE.mjs';
|
|
18
18
|
import { useEffect, useRef, useCallback, useMemo } from 'react';
|
|
19
19
|
import { useSharedValue, cancelAnimation, withSpring, useAnimatedReaction, useAnimatedStyle, interpolateColor, interpolate, useDerivedValue, Extrapolation, useAnimatedScrollHandler } from 'react-native-reanimated';
|
|
20
20
|
import { isWorkletFunction } from 'react-native-worklets';
|
package/dist/motion/Image.d.mts
CHANGED
package/dist/motion/Image.d.ts
CHANGED
package/dist/motion/Image.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkGPOMFIIU_js = require('../chunk-GPOMFIIU.js');
|
|
4
|
+
require('../chunk-VQ5D35UA.js');
|
|
5
|
+
require('../chunk-OBRGJAST.js');
|
|
6
|
+
require('../chunk-PM6CVGXJ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MotionImage", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkGPOMFIIU_js.MotionImage; }
|
|
13
13
|
});
|
package/dist/motion/Image.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MotionImage } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { MotionImage } from '../chunk-XSK5MNUH.mjs';
|
|
2
|
+
import '../chunk-RIVVBABB.mjs';
|
|
3
|
+
import '../chunk-Z3HCJ43H.mjs';
|
|
4
|
+
import '../chunk-REYL77RE.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_native from 'react-native';
|
|
3
|
-
import { M as MotionComponent } from '../types-
|
|
3
|
+
import { M as MotionComponent } from '../types-BQgLJeQG.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Animatable `Pressable`. The `gesture` prop's `pressed` sub-state hooks into
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_native from 'react-native';
|
|
3
|
-
import { M as MotionComponent } from '../types-
|
|
3
|
+
import { M as MotionComponent } from '../types-BQgLJeQG.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Animatable `Pressable`. The `gesture` prop's `pressed` sub-state hooks into
|
package/dist/motion/Pressable.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunk27U6766G_js = require('../chunk-27U6766G.js');
|
|
4
|
+
require('../chunk-VQ5D35UA.js');
|
|
5
|
+
require('../chunk-OBRGJAST.js');
|
|
6
|
+
require('../chunk-PM6CVGXJ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MotionPressable", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk27U6766G_js.MotionPressable; }
|
|
13
13
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MotionPressable } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { MotionPressable } from '../chunk-OAUWLPQH.mjs';
|
|
2
|
+
import '../chunk-RIVVBABB.mjs';
|
|
3
|
+
import '../chunk-Z3HCJ43H.mjs';
|
|
4
|
+
import '../chunk-REYL77RE.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkQQVDZKSD_js = require('../chunk-QQVDZKSD.js');
|
|
4
|
+
require('../chunk-VQ5D35UA.js');
|
|
5
|
+
require('../chunk-OBRGJAST.js');
|
|
6
|
+
require('../chunk-PM6CVGXJ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MotionScrollView", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkQQVDZKSD_js.MotionScrollView; }
|
|
13
13
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MotionScrollView } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { MotionScrollView } from '../chunk-27MKBTSG.mjs';
|
|
2
|
+
import '../chunk-RIVVBABB.mjs';
|
|
3
|
+
import '../chunk-Z3HCJ43H.mjs';
|
|
4
|
+
import '../chunk-REYL77RE.mjs';
|
package/dist/motion/Text.d.mts
CHANGED
package/dist/motion/Text.d.ts
CHANGED
package/dist/motion/Text.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunk67GHRCF6_js = require('../chunk-67GHRCF6.js');
|
|
4
|
+
require('../chunk-VQ5D35UA.js');
|
|
5
|
+
require('../chunk-OBRGJAST.js');
|
|
6
|
+
require('../chunk-PM6CVGXJ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MotionText", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk67GHRCF6_js.MotionText; }
|
|
13
13
|
});
|
package/dist/motion/Text.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MotionText } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { MotionText } from '../chunk-COEJVWRZ.mjs';
|
|
2
|
+
import '../chunk-RIVVBABB.mjs';
|
|
3
|
+
import '../chunk-Z3HCJ43H.mjs';
|
|
4
|
+
import '../chunk-REYL77RE.mjs';
|
package/dist/motion/View.d.mts
CHANGED
package/dist/motion/View.d.ts
CHANGED
package/dist/motion/View.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkK63LXGKS_js = require('../chunk-K63LXGKS.js');
|
|
4
|
+
require('../chunk-VQ5D35UA.js');
|
|
5
|
+
require('../chunk-OBRGJAST.js');
|
|
6
|
+
require('../chunk-PM6CVGXJ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MotionView", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkK63LXGKS_js.MotionView; }
|
|
13
13
|
});
|
package/dist/motion/View.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MotionView } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { MotionView } from '../chunk-GTJ6VAH5.mjs';
|
|
2
|
+
import '../chunk-RIVVBABB.mjs';
|
|
3
|
+
import '../chunk-Z3HCJ43H.mjs';
|
|
4
|
+
import '../chunk-REYL77RE.mjs';
|
package/dist/touch/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PanResponderInstance } from 'react-native';
|
|
2
2
|
import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
|
|
3
|
-
import { T as TransitionConfig } from '../types-
|
|
3
|
+
import { T as TransitionConfig } from '../types-BQgLJeQG.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/touch/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PanResponderInstance } from 'react-native';
|
|
2
2
|
import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
|
|
3
|
-
import { T as TransitionConfig } from '../types-
|
|
3
|
+
import { T as TransitionConfig } from '../types-BQgLJeQG.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/touch/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPM6CVGXJ_js = require('../chunk-PM6CVGXJ.js');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var reactNative = require('react-native');
|
|
6
6
|
var reactNativeReanimated = require('react-native-reanimated');
|
|
@@ -48,14 +48,14 @@ function useTouchDrag(options = {}) {
|
|
|
48
48
|
if (result) {
|
|
49
49
|
if (result.x && lockX) {
|
|
50
50
|
const toX = "to" in result.x ? result.x.to : x;
|
|
51
|
-
dragX.value =
|
|
51
|
+
dragX.value = chunkPM6CVGXJ_js.buildReleaseAnimation(
|
|
52
52
|
result.x,
|
|
53
53
|
toX
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
if (result.y && lockY) {
|
|
57
57
|
const toY = "to" in result.y ? result.y.to : y;
|
|
58
|
-
dragY.value =
|
|
58
|
+
dragY.value = chunkPM6CVGXJ_js.buildReleaseAnimation(
|
|
59
59
|
result.y,
|
|
60
60
|
toY
|
|
61
61
|
);
|
package/dist/touch/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildReleaseAnimation } from '../chunk-
|
|
1
|
+
import { buildReleaseAnimation } from '../chunk-REYL77RE.mjs';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { PanResponder } from 'react-native';
|
|
4
4
|
import { useSharedValue, useAnimatedStyle } from 'react-native-reanimated';
|
|
@@ -184,6 +184,20 @@ type BoxShadowInput = string | ReadonlyArray<BoxShadowValue>;
|
|
|
184
184
|
type AnimatableStructuredExtras<S> = 'boxShadow' extends keyof S ? {
|
|
185
185
|
boxShadow?: BoxShadowInput;
|
|
186
186
|
} : {};
|
|
187
|
+
/**
|
|
188
|
+
* The `transform: [...]` array form, passed through as the underlying style
|
|
189
|
+
* types it. Inertia reads transform entries out of the array (see
|
|
190
|
+
* `styleValueFor` in `createMotionComponent`) rather than treating the array as
|
|
191
|
+
* an animatable scalar, so it is exempted from the `AnimatableValue` mapping —
|
|
192
|
+
* wrapping it there would offer a nonsensical `transform: [[...], [...]]`
|
|
193
|
+
* keyframe form.
|
|
194
|
+
*
|
|
195
|
+
* Conditional on `S` for the same reason as `boxShadow`: only appears where the
|
|
196
|
+
* underlying style actually has it.
|
|
197
|
+
*/
|
|
198
|
+
type AnimatableTransformArray<S> = 'transform' extends keyof S ? {
|
|
199
|
+
transform?: S['transform'];
|
|
200
|
+
} : {};
|
|
187
201
|
/**
|
|
188
202
|
* The animation state shape inferred from the underlying component's style
|
|
189
203
|
* prop. We narrow to the value side of `style` so consumers see ViewStyle on
|
|
@@ -196,11 +210,33 @@ type AnimatableStructuredExtras<S> = 'boxShadow' extends keyof S ? {
|
|
|
196
210
|
* accepts any key. Excluding functions first keeps inference tight.
|
|
197
211
|
*/
|
|
198
212
|
type _StyleValue<T> = Exclude<T, (...args: any[]) => any>;
|
|
213
|
+
/**
|
|
214
|
+
* The style keys Inertia's runtime actually drives — the type-level mirror of
|
|
215
|
+
* `ALL_KEYS` in `createMotionComponent`, minus the `shadowOffset*` synthetics
|
|
216
|
+
* (consumers write the nested `shadowOffset` object, not the axes) and minus
|
|
217
|
+
* `boxShadow` (handled by `AnimatableStructuredExtras`, whose value shape
|
|
218
|
+
* deliberately departs from `AnimatableValue`).
|
|
219
|
+
*
|
|
220
|
+
* **This list and `ALL_KEYS` must stay in sync.** They are separate because one
|
|
221
|
+
* is a type and the other is a runtime array, and TypeScript can't derive the
|
|
222
|
+
* former from a value living in a module that imports this one. The direction
|
|
223
|
+
* that matters: a key here but not in `ALL_KEYS` typechecks and then silently
|
|
224
|
+
* does nothing at runtime — which is precisely the defect this type was
|
|
225
|
+
* introduced to kill. `animate-keys.test-d.tsx` pins the two together.
|
|
226
|
+
*
|
|
227
|
+
* Before 0.0.5 this type mapped over the component's *entire* style surface, so
|
|
228
|
+
* `animate={{ paddingTop: 40 }}` compiled cleanly and was then dropped on the
|
|
229
|
+
* floor — no error, no warning. That contradicted the library's own headline
|
|
230
|
+
* differentiator (wrong props should error, not go unnoticed), so the mapping is
|
|
231
|
+
* now an intersection: a key must be both animatable by Inertia *and* present on
|
|
232
|
+
* the underlying component's style prop.
|
|
233
|
+
*/
|
|
234
|
+
type AnimatableStyleKey = 'translateX' | 'translateY' | 'scaleX' | 'scaleY' | 'opacity' | 'width' | 'height' | 'borderRadius' | 'shadowOpacity' | 'shadowRadius' | 'elevation' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderWidth' | 'borderTopWidth' | 'borderRightWidth' | 'borderBottomWidth' | 'borderLeftWidth' | 'top' | 'right' | 'bottom' | 'left' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingHorizontal' | 'paddingVertical' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginHorizontal' | 'marginVertical' | 'flex' | 'flexGrow' | 'flexShrink' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'zIndex' | 'gap' | 'rowGap' | 'columnGap' | 'backgroundColor' | 'borderColor' | 'color' | 'tintColor' | 'shadowColor' | 'shadowOffset';
|
|
199
235
|
type AnimateStyle<C> = C extends {
|
|
200
236
|
style?: infer Raw;
|
|
201
|
-
} ? _StyleValue<Raw> extends StyleProp<infer S> ?
|
|
202
|
-
[K in keyof S]?: AnimatableValue<S[K]>;
|
|
203
|
-
}
|
|
237
|
+
} ? _StyleValue<Raw> extends StyleProp<infer S> ? {
|
|
238
|
+
[K in keyof S as K extends AnimatableStyleKey ? K : never]?: K extends 'boxShadow' | 'transform' ? never : AnimatableValue<S[K]>;
|
|
239
|
+
} & AnimatableTransformExtras & AnimatableStructuredExtras<S> & AnimatableTransformArray<S> : never : never;
|
|
204
240
|
interface AnimationCallbackInfo<S> {
|
|
205
241
|
/**
|
|
206
242
|
* The animatable key that just settled — typically a `keyof S` (e.g.
|