@rootnative/inertia 0.0.10 → 0.0.11

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 (83) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.md +2 -2
  3. package/dist/{chunk-6FCATUMY.mjs → chunk-2Q6JMDYZ.mjs} +1 -1
  4. package/dist/chunk-2UREDR4Z.js +8 -0
  5. package/dist/{chunk-3ZNHPT5Z.js → chunk-3PB27UIE.js} +2 -2
  6. package/dist/{chunk-JENYDTXH.mjs → chunk-5EYIZG72.mjs} +10 -3
  7. package/dist/{chunk-Z23AMUSW.mjs → chunk-7RMSLKQQ.mjs} +1 -1
  8. package/dist/{chunk-7BH3CAO5.mjs → chunk-DT2KVAAO.mjs} +1 -1
  9. package/dist/{chunk-F4HMCXAX.mjs → chunk-FKJLPYGY.mjs} +2 -2
  10. package/dist/{chunk-2UGWAB6N.js → chunk-HBURWGCZ.js} +43 -36
  11. package/dist/chunk-JAJHKJC5.js +8 -0
  12. package/dist/chunk-JBMTTICC.js +8 -0
  13. package/dist/{chunk-QXKPIENP.mjs → chunk-JGQ6YRDN.mjs} +1 -1
  14. package/dist/{chunk-DRA2K53O.mjs → chunk-LHW4VNWD.mjs} +1 -1
  15. package/dist/{chunk-4EZ5DBL3.js → chunk-NTG6PSGZ.js} +8 -8
  16. package/dist/{chunk-KXU6VH2Y.js → chunk-QDMSFRQR.js} +4 -4
  17. package/dist/{chunk-HEAWMZEM.mjs → chunk-QIRKPDXA.mjs} +13 -2
  18. package/dist/{chunk-N33GSDNQ.js → chunk-QX5JHRZ2.js} +12 -1
  19. package/dist/{chunk-VKXSL3ZL.js → chunk-R7YD6L3D.js} +2 -2
  20. package/dist/{chunk-CUHOCONB.mjs → chunk-RO4XFTQ6.mjs} +1 -1
  21. package/dist/{chunk-OLOSU2BD.mjs → chunk-UGYBFAVY.mjs} +1 -1
  22. package/dist/{chunk-46766TBM.js → chunk-XLKI2MSD.js} +2 -2
  23. package/dist/gestureLayer/index.d.mts +2 -2
  24. package/dist/gestureLayer/index.d.ts +2 -2
  25. package/dist/gestureLayer/index.js +11 -11
  26. package/dist/gestureLayer/index.mjs +3 -3
  27. package/dist/index.d.mts +49 -32
  28. package/dist/index.d.ts +49 -32
  29. package/dist/index.js +62 -62
  30. package/dist/index.mjs +19 -19
  31. package/dist/motion/FlatList.d.mts +2 -1
  32. package/dist/motion/FlatList.d.ts +2 -1
  33. package/dist/motion/FlatList.js +5 -5
  34. package/dist/motion/FlatList.mjs +4 -4
  35. package/dist/motion/Image.d.mts +2 -1
  36. package/dist/motion/Image.d.ts +2 -1
  37. package/dist/motion/Image.js +5 -5
  38. package/dist/motion/Image.mjs +4 -4
  39. package/dist/motion/Pressable.d.mts +2 -1
  40. package/dist/motion/Pressable.d.ts +2 -1
  41. package/dist/motion/Pressable.js +5 -5
  42. package/dist/motion/Pressable.mjs +4 -4
  43. package/dist/motion/ScrollView.d.mts +2 -1
  44. package/dist/motion/ScrollView.d.ts +2 -1
  45. package/dist/motion/ScrollView.js +5 -5
  46. package/dist/motion/ScrollView.mjs +4 -4
  47. package/dist/motion/Text.d.mts +2 -1
  48. package/dist/motion/Text.d.ts +2 -1
  49. package/dist/motion/Text.js +5 -5
  50. package/dist/motion/Text.mjs +4 -4
  51. package/dist/motion/View.d.mts +2 -1
  52. package/dist/motion/View.d.ts +2 -1
  53. package/dist/motion/View.js +5 -5
  54. package/dist/motion/View.mjs +4 -4
  55. package/dist/touch/index.d.mts +5 -4
  56. package/dist/touch/index.d.ts +5 -4
  57. package/dist/touch/index.js +3 -3
  58. package/dist/touch/index.mjs +1 -1
  59. package/dist/{types-08mG8fNk.d.mts → types-C5Zbs9MC.d.mts} +12 -1
  60. package/dist/{types-08mG8fNk.d.ts → types-C5Zbs9MC.d.ts} +12 -1
  61. package/dist/{useGesture-D1lHeQQ6.d.ts → useGesture-Be0ZhCWj.d.ts} +1 -1
  62. package/dist/{useGesture-DjszaHWz.d.mts → useGesture-Ve8EGjTr.d.mts} +1 -1
  63. package/dist/useTranslateStyle-BDrOD97O.d.mts +58 -0
  64. package/dist/useTranslateStyle-BDrOD97O.d.ts +58 -0
  65. package/jest-preset.js +31 -2
  66. package/llms.txt +2 -1
  67. package/package.json +13 -12
  68. package/src/index.ts +3 -0
  69. package/src/internal/boxShadow.ts +24 -2
  70. package/src/touch/useTouchDrag.ts +5 -3
  71. package/src/transitions/resolveSequence.ts +42 -2
  72. package/src/types.ts +14 -1
  73. package/src/values/index.ts +3 -1
  74. package/src/values/useColorCascade.ts +3 -3
  75. package/src/values/useColorTransition.ts +17 -2
  76. package/src/values/useInterpolatedStyle.ts +8 -1
  77. package/src/values/useShadow.ts +18 -2
  78. package/src/values/useTranslateStyle.ts +18 -2
  79. package/dist/applyBounds-BYGiHrYO.d.mts +0 -18
  80. package/dist/applyBounds-BYGiHrYO.d.ts +0 -18
  81. package/dist/chunk-PLKXCJIB.js +0 -8
  82. package/dist/chunk-UBHQJFUW.js +0 -8
  83. package/dist/chunk-XKNEQDAT.js +0 -8
package/dist/index.mjs CHANGED
@@ -1,23 +1,23 @@
1
1
  export { applyBounds, useTranslateStyle } from './chunk-OH46TGEA.mjs';
2
- export { useGesture } from './chunk-F4HMCXAX.mjs';
3
- import { MotionView } from './chunk-QXKPIENP.mjs';
4
- export { MotionView } from './chunk-QXKPIENP.mjs';
5
- import { MotionText } from './chunk-OLOSU2BD.mjs';
6
- export { MotionText } from './chunk-OLOSU2BD.mjs';
7
- import { MotionImage } from './chunk-7BH3CAO5.mjs';
8
- export { MotionImage } from './chunk-7BH3CAO5.mjs';
9
- import { MotionPressable } from './chunk-CUHOCONB.mjs';
10
- export { MotionPressable } from './chunk-CUHOCONB.mjs';
11
- import { MotionScrollView } from './chunk-DRA2K53O.mjs';
12
- export { MotionScrollView } from './chunk-DRA2K53O.mjs';
13
- import { MotionFlatList } from './chunk-Z23AMUSW.mjs';
14
- export { MotionFlatList } from './chunk-Z23AMUSW.mjs';
15
- import { pairBoxShadowLayers, resolveBoxShadowInput } from './chunk-JENYDTXH.mjs';
16
- export { Presence, Stagger, TRANSPARENT, createMotionComponent, usePresence, useStaggerDelay } from './chunk-JENYDTXH.mjs';
17
- import { useShouldReduceMotion, resolveNamedTransition, useNamedTransitions, lookupNamedTransition } from './chunk-6FCATUMY.mjs';
18
- export { MotionConfig, resolveNamedTransition, useMotionConfig, useNamedTransitions, useShouldReduceMotion } from './chunk-6FCATUMY.mjs';
19
- import { stableSig, resolveTransition, springToReanimated, warnOnce, warnNonWorkletOnce } from './chunk-HEAWMZEM.mjs';
20
- export { applyDelay, buildReleaseAnimation, cubicBezier, ensureWorkletEasing, isTopLevelTransition, resolveAnimatableValue, resolveTransition, stableSig } from './chunk-HEAWMZEM.mjs';
2
+ export { useGesture } from './chunk-FKJLPYGY.mjs';
3
+ import { MotionView } from './chunk-JGQ6YRDN.mjs';
4
+ export { MotionView } from './chunk-JGQ6YRDN.mjs';
5
+ import { MotionText } from './chunk-UGYBFAVY.mjs';
6
+ export { MotionText } from './chunk-UGYBFAVY.mjs';
7
+ import { MotionImage } from './chunk-DT2KVAAO.mjs';
8
+ export { MotionImage } from './chunk-DT2KVAAO.mjs';
9
+ import { MotionPressable } from './chunk-RO4XFTQ6.mjs';
10
+ export { MotionPressable } from './chunk-RO4XFTQ6.mjs';
11
+ import { MotionScrollView } from './chunk-LHW4VNWD.mjs';
12
+ export { MotionScrollView } from './chunk-LHW4VNWD.mjs';
13
+ import { MotionFlatList } from './chunk-7RMSLKQQ.mjs';
14
+ export { MotionFlatList } from './chunk-7RMSLKQQ.mjs';
15
+ import { pairBoxShadowLayers, resolveBoxShadowInput } from './chunk-5EYIZG72.mjs';
16
+ export { Presence, Stagger, TRANSPARENT, createMotionComponent, usePresence, useStaggerDelay } from './chunk-5EYIZG72.mjs';
17
+ import { useShouldReduceMotion, resolveNamedTransition, useNamedTransitions, lookupNamedTransition } from './chunk-2Q6JMDYZ.mjs';
18
+ export { MotionConfig, resolveNamedTransition, useMotionConfig, useNamedTransitions, useShouldReduceMotion } from './chunk-2Q6JMDYZ.mjs';
19
+ import { stableSig, resolveTransition, springToReanimated, warnOnce, warnNonWorkletOnce } from './chunk-QIRKPDXA.mjs';
20
+ export { applyDelay, buildReleaseAnimation, cubicBezier, ensureWorkletEasing, isTopLevelTransition, resolveAnimatableValue, resolveTransition, stableSig } from './chunk-QIRKPDXA.mjs';
21
21
  import { useEffect, useRef, useCallback, useMemo } from 'react';
22
22
  import { useSharedValue, cancelAnimation, withSpring, useAnimatedReaction, useAnimatedStyle, interpolateColor, interpolate, useDerivedValue, useAnimatedScrollHandler, Extrapolation } from 'react-native-reanimated';
23
23
  import { isWorkletFunction } from 'react-native-worklets';
@@ -1,6 +1,7 @@
1
1
  import { FlatListProps, FlatList } from 'react-native';
2
- import { V as VariantsMap, a as MotionProps } from '../types-08mG8fNk.mjs';
2
+ import { V as VariantsMap, a as MotionProps } from '../types-C5Zbs9MC.mjs';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable, virtualized `FlatList`.
@@ -1,6 +1,7 @@
1
1
  import { FlatListProps, FlatList } from 'react-native';
2
- import { V as VariantsMap, a as MotionProps } from '../types-08mG8fNk.js';
2
+ import { V as VariantsMap, a as MotionProps } from '../types-C5Zbs9MC.js';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable, virtualized `FlatList`.
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk46766TBM_js = require('../chunk-46766TBM.js');
4
- require('../chunk-2UGWAB6N.js');
5
- require('../chunk-KXU6VH2Y.js');
6
- require('../chunk-N33GSDNQ.js');
3
+ var chunkXLKI2MSD_js = require('../chunk-XLKI2MSD.js');
4
+ require('../chunk-HBURWGCZ.js');
5
+ require('../chunk-QDMSFRQR.js');
6
+ require('../chunk-QX5JHRZ2.js');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "MotionFlatList", {
11
11
  enumerable: true,
12
- get: function () { return chunk46766TBM_js.MotionFlatList; }
12
+ get: function () { return chunkXLKI2MSD_js.MotionFlatList; }
13
13
  });
@@ -1,4 +1,4 @@
1
- export { MotionFlatList } from '../chunk-Z23AMUSW.mjs';
2
- import '../chunk-JENYDTXH.mjs';
3
- import '../chunk-6FCATUMY.mjs';
4
- import '../chunk-HEAWMZEM.mjs';
1
+ export { MotionFlatList } from '../chunk-7RMSLKQQ.mjs';
2
+ import '../chunk-5EYIZG72.mjs';
3
+ import '../chunk-2Q6JMDYZ.mjs';
4
+ import '../chunk-QIRKPDXA.mjs';
@@ -1,6 +1,7 @@
1
1
  import { Image } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.mjs';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.mjs';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `Image`. Inherits `Image`'s prop surface, with `animate` /
@@ -1,6 +1,7 @@
1
1
  import { Image } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.js';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.js';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `Image`. Inherits `Image`'s prop surface, with `animate` /
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkXKNEQDAT_js = require('../chunk-XKNEQDAT.js');
4
- require('../chunk-2UGWAB6N.js');
5
- require('../chunk-KXU6VH2Y.js');
6
- require('../chunk-N33GSDNQ.js');
3
+ var chunkJAJHKJC5_js = require('../chunk-JAJHKJC5.js');
4
+ require('../chunk-HBURWGCZ.js');
5
+ require('../chunk-QDMSFRQR.js');
6
+ require('../chunk-QX5JHRZ2.js');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "MotionImage", {
11
11
  enumerable: true,
12
- get: function () { return chunkXKNEQDAT_js.MotionImage; }
12
+ get: function () { return chunkJAJHKJC5_js.MotionImage; }
13
13
  });
@@ -1,4 +1,4 @@
1
- export { MotionImage } from '../chunk-7BH3CAO5.mjs';
2
- import '../chunk-JENYDTXH.mjs';
3
- import '../chunk-6FCATUMY.mjs';
4
- import '../chunk-HEAWMZEM.mjs';
1
+ export { MotionImage } from '../chunk-DT2KVAAO.mjs';
2
+ import '../chunk-5EYIZG72.mjs';
3
+ import '../chunk-2Q6JMDYZ.mjs';
4
+ import '../chunk-QIRKPDXA.mjs';
@@ -1,6 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import * as react_native from 'react-native';
3
- import { M as MotionComponent } from '../types-08mG8fNk.mjs';
3
+ import { M as MotionComponent } from '../types-C5Zbs9MC.mjs';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `Pressable`. The `gesture` prop's `pressed` sub-state hooks into
@@ -1,6 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import * as react_native from 'react-native';
3
- import { M as MotionComponent } from '../types-08mG8fNk.js';
3
+ import { M as MotionComponent } from '../types-C5Zbs9MC.js';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `Pressable`. The `gesture` prop's `pressed` sub-state hooks into
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkVKXSL3ZL_js = require('../chunk-VKXSL3ZL.js');
4
- require('../chunk-2UGWAB6N.js');
5
- require('../chunk-KXU6VH2Y.js');
6
- require('../chunk-N33GSDNQ.js');
3
+ var chunkR7YD6L3D_js = require('../chunk-R7YD6L3D.js');
4
+ require('../chunk-HBURWGCZ.js');
5
+ require('../chunk-QDMSFRQR.js');
6
+ require('../chunk-QX5JHRZ2.js');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "MotionPressable", {
11
11
  enumerable: true,
12
- get: function () { return chunkVKXSL3ZL_js.MotionPressable; }
12
+ get: function () { return chunkR7YD6L3D_js.MotionPressable; }
13
13
  });
@@ -1,4 +1,4 @@
1
- export { MotionPressable } from '../chunk-CUHOCONB.mjs';
2
- import '../chunk-JENYDTXH.mjs';
3
- import '../chunk-6FCATUMY.mjs';
4
- import '../chunk-HEAWMZEM.mjs';
1
+ export { MotionPressable } from '../chunk-RO4XFTQ6.mjs';
2
+ import '../chunk-5EYIZG72.mjs';
3
+ import '../chunk-2Q6JMDYZ.mjs';
4
+ import '../chunk-QIRKPDXA.mjs';
@@ -1,6 +1,7 @@
1
1
  import { ScrollView } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.mjs';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.mjs';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `ScrollView`. Animations apply to the scroll container itself —
@@ -1,6 +1,7 @@
1
1
  import { ScrollView } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.js';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.js';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `ScrollView`. Animations apply to the scroll container itself —
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk3ZNHPT5Z_js = require('../chunk-3ZNHPT5Z.js');
4
- require('../chunk-2UGWAB6N.js');
5
- require('../chunk-KXU6VH2Y.js');
6
- require('../chunk-N33GSDNQ.js');
3
+ var chunk3PB27UIE_js = require('../chunk-3PB27UIE.js');
4
+ require('../chunk-HBURWGCZ.js');
5
+ require('../chunk-QDMSFRQR.js');
6
+ require('../chunk-QX5JHRZ2.js');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "MotionScrollView", {
11
11
  enumerable: true,
12
- get: function () { return chunk3ZNHPT5Z_js.MotionScrollView; }
12
+ get: function () { return chunk3PB27UIE_js.MotionScrollView; }
13
13
  });
@@ -1,4 +1,4 @@
1
- export { MotionScrollView } from '../chunk-DRA2K53O.mjs';
2
- import '../chunk-JENYDTXH.mjs';
3
- import '../chunk-6FCATUMY.mjs';
4
- import '../chunk-HEAWMZEM.mjs';
1
+ export { MotionScrollView } from '../chunk-LHW4VNWD.mjs';
2
+ import '../chunk-5EYIZG72.mjs';
3
+ import '../chunk-2Q6JMDYZ.mjs';
4
+ import '../chunk-QIRKPDXA.mjs';
@@ -1,6 +1,7 @@
1
1
  import { Text } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.mjs';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.mjs';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `Text`. Inherits `Text`'s prop surface, with `animate` /
@@ -1,6 +1,7 @@
1
1
  import { Text } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.js';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.js';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `Text`. Inherits `Text`'s prop surface, with `animate` /
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkUBHQJFUW_js = require('../chunk-UBHQJFUW.js');
4
- require('../chunk-2UGWAB6N.js');
5
- require('../chunk-KXU6VH2Y.js');
6
- require('../chunk-N33GSDNQ.js');
3
+ var chunkJBMTTICC_js = require('../chunk-JBMTTICC.js');
4
+ require('../chunk-HBURWGCZ.js');
5
+ require('../chunk-QDMSFRQR.js');
6
+ require('../chunk-QX5JHRZ2.js');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "MotionText", {
11
11
  enumerable: true,
12
- get: function () { return chunkUBHQJFUW_js.MotionText; }
12
+ get: function () { return chunkJBMTTICC_js.MotionText; }
13
13
  });
@@ -1,4 +1,4 @@
1
- export { MotionText } from '../chunk-OLOSU2BD.mjs';
2
- import '../chunk-JENYDTXH.mjs';
3
- import '../chunk-6FCATUMY.mjs';
4
- import '../chunk-HEAWMZEM.mjs';
1
+ export { MotionText } from '../chunk-UGYBFAVY.mjs';
2
+ import '../chunk-5EYIZG72.mjs';
3
+ import '../chunk-2Q6JMDYZ.mjs';
4
+ import '../chunk-QIRKPDXA.mjs';
@@ -1,6 +1,7 @@
1
1
  import { View } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.mjs';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.mjs';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `View`. Inherits `View`'s prop surface, with `animate` /
@@ -1,6 +1,7 @@
1
1
  import { View } from 'react-native';
2
- import { M as MotionComponent } from '../types-08mG8fNk.js';
2
+ import { M as MotionComponent } from '../types-C5Zbs9MC.js';
3
3
  import 'react';
4
+ import 'react-native-reanimated';
4
5
 
5
6
  /**
6
7
  * Animatable `View`. Inherits `View`'s prop surface, with `animate` /
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkPLKXCJIB_js = require('../chunk-PLKXCJIB.js');
4
- require('../chunk-2UGWAB6N.js');
5
- require('../chunk-KXU6VH2Y.js');
6
- require('../chunk-N33GSDNQ.js');
3
+ var chunk2UREDR4Z_js = require('../chunk-2UREDR4Z.js');
4
+ require('../chunk-HBURWGCZ.js');
5
+ require('../chunk-QDMSFRQR.js');
6
+ require('../chunk-QX5JHRZ2.js');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "MotionView", {
11
11
  enumerable: true,
12
- get: function () { return chunkPLKXCJIB_js.MotionView; }
12
+ get: function () { return chunk2UREDR4Z_js.MotionView; }
13
13
  });
@@ -1,4 +1,4 @@
1
- export { MotionView } from '../chunk-QXKPIENP.mjs';
2
- import '../chunk-JENYDTXH.mjs';
3
- import '../chunk-6FCATUMY.mjs';
4
- import '../chunk-HEAWMZEM.mjs';
1
+ export { MotionView } from '../chunk-JGQ6YRDN.mjs';
2
+ import '../chunk-5EYIZG72.mjs';
3
+ import '../chunk-2Q6JMDYZ.mjs';
4
+ import '../chunk-QIRKPDXA.mjs';
@@ -1,7 +1,8 @@
1
- export { a as applyBounds } from '../applyBounds-BYGiHrYO.mjs';
1
+ import { T as TranslateStyle } from '../useTranslateStyle-BDrOD97O.mjs';
2
+ export { a as applyBounds } from '../useTranslateStyle-BDrOD97O.mjs';
2
3
  import { PanResponderInstance } from 'react-native';
3
- import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
4
- import { T as TransitionConfig } from '../types-08mG8fNk.mjs';
4
+ import { SharedValue } from 'react-native-reanimated';
5
+ import { T as TransitionConfig } from '../types-C5Zbs9MC.mjs';
5
6
  import 'react';
6
7
 
7
8
  /**
@@ -15,7 +16,7 @@ interface UseTouchDragResult {
15
16
  /** Spread onto a `View` / `Pressable` to install the pan responder. */
16
17
  panHandlers: PanResponderInstance['panHandlers'];
17
18
  /** Stable animated `transform` style. */
18
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
19
+ animatedStyle: TranslateStyle;
19
20
  /** Live x translation, persistent across gestures. */
20
21
  dragX: SharedValue<number>;
21
22
  /** Live y translation, persistent across gestures. */
@@ -1,7 +1,8 @@
1
- export { a as applyBounds } from '../applyBounds-BYGiHrYO.js';
1
+ import { T as TranslateStyle } from '../useTranslateStyle-BDrOD97O.js';
2
+ export { a as applyBounds } from '../useTranslateStyle-BDrOD97O.js';
2
3
  import { PanResponderInstance } from 'react-native';
3
- import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
4
- import { T as TransitionConfig } from '../types-08mG8fNk.js';
4
+ import { SharedValue } from 'react-native-reanimated';
5
+ import { T as TransitionConfig } from '../types-C5Zbs9MC.js';
5
6
  import 'react';
6
7
 
7
8
  /**
@@ -15,7 +16,7 @@ interface UseTouchDragResult {
15
16
  /** Spread onto a `View` / `Pressable` to install the pan responder. */
16
17
  panHandlers: PanResponderInstance['panHandlers'];
17
18
  /** Stable animated `transform` style. */
18
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
19
+ animatedStyle: TranslateStyle;
19
20
  /** Live x translation, persistent across gestures. */
20
21
  dragX: SharedValue<number>;
21
22
  /** Live y translation, persistent across gestures. */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKFHZMFAX_js = require('../chunk-KFHZMFAX.js');
4
- var chunkN33GSDNQ_js = require('../chunk-N33GSDNQ.js');
4
+ var chunkQX5JHRZ2_js = require('../chunk-QX5JHRZ2.js');
5
5
  var react = require('react');
6
6
  var reactNative = require('react-native');
7
7
  var reactNativeReanimated = require('react-native-reanimated');
@@ -40,14 +40,14 @@ function useTouchDrag(options = {}) {
40
40
  if (result) {
41
41
  if (result.x && lockX) {
42
42
  const toX = "to" in result.x ? result.x.to : x;
43
- dragX.value = chunkN33GSDNQ_js.buildReleaseAnimation(
43
+ dragX.value = chunkQX5JHRZ2_js.buildReleaseAnimation(
44
44
  result.x,
45
45
  toX
46
46
  );
47
47
  }
48
48
  if (result.y && lockY) {
49
49
  const toY = "to" in result.y ? result.y.to : y;
50
- dragY.value = chunkN33GSDNQ_js.buildReleaseAnimation(
50
+ dragY.value = chunkQX5JHRZ2_js.buildReleaseAnimation(
51
51
  result.y,
52
52
  toY
53
53
  );
@@ -1,6 +1,6 @@
1
1
  import { applyBounds, useTranslateStyle } from '../chunk-OH46TGEA.mjs';
2
2
  export { applyBounds } from '../chunk-OH46TGEA.mjs';
3
- import { buildReleaseAnimation } from '../chunk-HEAWMZEM.mjs';
3
+ import { buildReleaseAnimation } from '../chunk-QIRKPDXA.mjs';
4
4
  import { useRef, useMemo } from 'react';
5
5
  import { PanResponder } from 'react-native';
6
6
  import { useSharedValue } from 'react-native-reanimated';
@@ -1,5 +1,6 @@
1
1
  import { ComponentType, ComponentProps, Ref, ReactElement } from 'react';
2
2
  import { StyleProp, BoxShadowValue } from 'react-native';
3
+ import { AnimatedProps } from 'react-native-reanimated';
3
4
 
4
5
  /**
5
6
  * A single animation step's destination, optionally overriding the transition
@@ -442,9 +443,19 @@ interface MotionProps<C, V extends VariantsMap<C> = VariantsMap<C>> {
442
443
  * Props of a Motion primitive for a given underlying component `C` and a
443
444
  * concrete variants map `V`: the component's own props (minus `style`, which
444
445
  * we replace with an animated style) intersected with the Motion props.
446
+ *
447
+ * `style` is taken from `AnimatedProps<…>`, not from `C` directly, because a
448
+ * Motion primitive renders `Animated.createAnimatedComponent(C)` — so the
449
+ * styles it accepts are the ones that animated component accepts. Reanimated
450
+ * 4.5 brands what `useAnimatedStyle` returns, and `ComponentProps<C>['style']`
451
+ * rejects a branded value, which would have made the sanctioned escape hatch
452
+ * (Principle 2: own your `useAnimatedStyle` over Inertia-driven shared values,
453
+ * then pass it to a `Motion.*` primitive) require a cast at every call site.
445
454
  */
446
455
  type MotionComponentProps<C extends ComponentType<any>, V extends VariantsMap<ComponentProps<C>> = VariantsMap<ComponentProps<C>>> = Omit<ComponentProps<C>, 'style'> & MotionProps<ComponentProps<C>, V> & {
447
- style?: ComponentProps<C>['style'];
456
+ style?: AnimatedProps<ComponentProps<C>> extends {
457
+ style?: infer S;
458
+ } ? S : ComponentProps<C>['style'];
448
459
  ref?: Ref<unknown>;
449
460
  };
450
461
  /**
@@ -1,5 +1,6 @@
1
1
  import { ComponentType, ComponentProps, Ref, ReactElement } from 'react';
2
2
  import { StyleProp, BoxShadowValue } from 'react-native';
3
+ import { AnimatedProps } from 'react-native-reanimated';
3
4
 
4
5
  /**
5
6
  * A single animation step's destination, optionally overriding the transition
@@ -442,9 +443,19 @@ interface MotionProps<C, V extends VariantsMap<C> = VariantsMap<C>> {
442
443
  * Props of a Motion primitive for a given underlying component `C` and a
443
444
  * concrete variants map `V`: the component's own props (minus `style`, which
444
445
  * we replace with an animated style) intersected with the Motion props.
446
+ *
447
+ * `style` is taken from `AnimatedProps<…>`, not from `C` directly, because a
448
+ * Motion primitive renders `Animated.createAnimatedComponent(C)` — so the
449
+ * styles it accepts are the ones that animated component accepts. Reanimated
450
+ * 4.5 brands what `useAnimatedStyle` returns, and `ComponentProps<C>['style']`
451
+ * rejects a branded value, which would have made the sanctioned escape hatch
452
+ * (Principle 2: own your `useAnimatedStyle` over Inertia-driven shared values,
453
+ * then pass it to a `Motion.*` primitive) require a cast at every call site.
445
454
  */
446
455
  type MotionComponentProps<C extends ComponentType<any>, V extends VariantsMap<ComponentProps<C>> = VariantsMap<ComponentProps<C>>> = Omit<ComponentProps<C>, 'style'> & MotionProps<ComponentProps<C>, V> & {
447
- style?: ComponentProps<C>['style'];
456
+ style?: AnimatedProps<ComponentProps<C>> extends {
457
+ style?: infer S;
458
+ } ? S : ComponentProps<C>['style'];
448
459
  ref?: Ref<unknown>;
449
460
  };
450
461
  /**
@@ -1,5 +1,5 @@
1
1
  import { SharedValue } from 'react-native-reanimated';
2
- import { b as TransitionInput, G as GestureLayerTransitions } from './types-08mG8fNk.js';
2
+ import { b as TransitionInput, G as GestureLayerTransitions } from './types-C5Zbs9MC.js';
3
3
 
4
4
  /**
5
5
  * Handler bag returned by `useGesture`. Spread on a `Pressable` to drive the
@@ -1,5 +1,5 @@
1
1
  import { SharedValue } from 'react-native-reanimated';
2
- import { b as TransitionInput, G as GestureLayerTransitions } from './types-08mG8fNk.mjs';
2
+ import { b as TransitionInput, G as GestureLayerTransitions } from './types-C5Zbs9MC.mjs';
3
3
 
4
4
  /**
5
5
  * Handler bag returned by `useGesture`. Spread on a `Pressable` to drive the
@@ -0,0 +1,58 @@
1
+ import { ViewStyle } from 'react-native';
2
+ import { SharedValue } from 'react-native-reanimated';
3
+
4
+ /**
5
+ * Clamp `value` to `[min, max]`. When `elastic > 0` the overshoot past a
6
+ * bound is scaled by `elastic` instead of hard-clamped, giving a rubber-band
7
+ * feel. `min` / `max` may be `undefined` to leave that side unbounded.
8
+ *
9
+ * Worklet, so it runs both inside a gesture-handler pan handler on the UI
10
+ * thread (`useDrag`) and from a JS-thread `PanResponder` callback
11
+ * (`useTouchDrag`).
12
+ *
13
+ * ```ts
14
+ * applyBounds(120, -100, 100, 0) // 100
15
+ * applyBounds(120, -100, 100, 0.5) // 110
16
+ * applyBounds(50, undefined, 100, 0) // 50
17
+ * ```
18
+ */
19
+ declare function applyBounds(value: number, min: number | undefined, max: number | undefined, elastic: number): number;
20
+
21
+ /**
22
+ * What {@link useTranslateStyle} returns: a plain style object that owns
23
+ * `transform`.
24
+ *
25
+ * Deliberately **not** `ReturnType<typeof useAnimatedStyle>`. Reanimated 4.5
26
+ * brands that value (`AnimatedStyleHandle`), and a branded type is rejected
27
+ * inside a `StyleProp<ViewStyle>` array — so every call site would need a cast,
28
+ * which is the exact defect `InterpolatedStyle` was introduced to remove in
29
+ * `0.0.9`. The brand is compile-time only, so the runtime value is unchanged:
30
+ * it is still the animated style Reanimated produced.
31
+ */
32
+ type TranslateStyle = {
33
+ transform: NonNullable<ViewStyle['transform']>;
34
+ };
35
+ /**
36
+ * Animated style that translates by two shared values:
37
+ * `transform: [{ translateX: x }, { translateY: y }]`.
38
+ *
39
+ * This is the style fragment every drag-style hook returns (`useTouchDrag`,
40
+ * and `useDrag` / `usePan` / `useSwipe` in `@rootnative/inertia-gestures`).
41
+ * Use it directly when a custom gesture owns its own translation values.
42
+ *
43
+ * The style owns the whole `transform` key. Do not stack a second transform
44
+ * style beside it — `transform` is one key in React Native, so the later
45
+ * style replaces this one instead of merging. Nest another animated view, or
46
+ * build one style from `x` / `y` with `useInterpolatedStyle`, to add a
47
+ * transform.
48
+ *
49
+ * ```tsx
50
+ * const x = useMotionValue(0)
51
+ * const y = useMotionValue(0)
52
+ * const style = useTranslateStyle(x, y)
53
+ * return <Motion.View style={style} />
54
+ * ```
55
+ */
56
+ declare function useTranslateStyle(x: SharedValue<number>, y: SharedValue<number>): TranslateStyle;
57
+
58
+ export { type TranslateStyle as T, applyBounds as a, useTranslateStyle as u };
@@ -0,0 +1,58 @@
1
+ import { ViewStyle } from 'react-native';
2
+ import { SharedValue } from 'react-native-reanimated';
3
+
4
+ /**
5
+ * Clamp `value` to `[min, max]`. When `elastic > 0` the overshoot past a
6
+ * bound is scaled by `elastic` instead of hard-clamped, giving a rubber-band
7
+ * feel. `min` / `max` may be `undefined` to leave that side unbounded.
8
+ *
9
+ * Worklet, so it runs both inside a gesture-handler pan handler on the UI
10
+ * thread (`useDrag`) and from a JS-thread `PanResponder` callback
11
+ * (`useTouchDrag`).
12
+ *
13
+ * ```ts
14
+ * applyBounds(120, -100, 100, 0) // 100
15
+ * applyBounds(120, -100, 100, 0.5) // 110
16
+ * applyBounds(50, undefined, 100, 0) // 50
17
+ * ```
18
+ */
19
+ declare function applyBounds(value: number, min: number | undefined, max: number | undefined, elastic: number): number;
20
+
21
+ /**
22
+ * What {@link useTranslateStyle} returns: a plain style object that owns
23
+ * `transform`.
24
+ *
25
+ * Deliberately **not** `ReturnType<typeof useAnimatedStyle>`. Reanimated 4.5
26
+ * brands that value (`AnimatedStyleHandle`), and a branded type is rejected
27
+ * inside a `StyleProp<ViewStyle>` array — so every call site would need a cast,
28
+ * which is the exact defect `InterpolatedStyle` was introduced to remove in
29
+ * `0.0.9`. The brand is compile-time only, so the runtime value is unchanged:
30
+ * it is still the animated style Reanimated produced.
31
+ */
32
+ type TranslateStyle = {
33
+ transform: NonNullable<ViewStyle['transform']>;
34
+ };
35
+ /**
36
+ * Animated style that translates by two shared values:
37
+ * `transform: [{ translateX: x }, { translateY: y }]`.
38
+ *
39
+ * This is the style fragment every drag-style hook returns (`useTouchDrag`,
40
+ * and `useDrag` / `usePan` / `useSwipe` in `@rootnative/inertia-gestures`).
41
+ * Use it directly when a custom gesture owns its own translation values.
42
+ *
43
+ * The style owns the whole `transform` key. Do not stack a second transform
44
+ * style beside it — `transform` is one key in React Native, so the later
45
+ * style replaces this one instead of merging. Nest another animated view, or
46
+ * build one style from `x` / `y` with `useInterpolatedStyle`, to add a
47
+ * transform.
48
+ *
49
+ * ```tsx
50
+ * const x = useMotionValue(0)
51
+ * const y = useMotionValue(0)
52
+ * const style = useTranslateStyle(x, y)
53
+ * return <Motion.View style={style} />
54
+ * ```
55
+ */
56
+ declare function useTranslateStyle(x: SharedValue<number>, y: SharedValue<number>): TranslateStyle;
57
+
58
+ export { type TranslateStyle as T, applyBounds as a, useTranslateStyle as u };