@rootnative/inertia-gestures 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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ This package ships in lockstep with `@rootnative/inertia` — version numbers tr
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.0.11] - 2026-09-09
10
+
11
+ ### Changed
12
+
13
+ - **Breaking: the peer ranges are narrowed to the Expo SDK 57 band.** `react` is now `>=19.2.3 <20.0.0`, `react-native` is `>=0.83.0 <0.87.0`, and `react-native-reanimated` is `>=4.5.0 <4.6.0`. This adapter tracks the band that `@rootnative/inertia` declares, so the two cannot disagree and no consumer can install a pair that resolves to different runtimes. The reason the band is this narrow is in the core changelog: each peer range resolves on its own, so a range wide enough for both SDK 54 and SDK 57 also admits `react-native 0.81` with Reanimated `4.6`, which cannot install.
14
+
15
+ Migration: move the app to Expo SDK 57 (React `19.2.3`, React Native `0.86.3`, Reanimated `4.5.1`, Worklets `0.10.1`). A project on SDK 54 stays on `0.0.10`. `react-native-gesture-handler` keeps its own floor, because its version relationship is with the Expo SDK and not with this adapter.
16
+
9
17
  ## [0.0.10] - 2026-09-06
10
18
 
11
19
  ### Fixed
@@ -89,7 +97,8 @@ Initial alpha publish alongside `@rootnative/inertia@0.0.0-alpha.0`. Optional ad
89
97
  - `useDrag({ onRelease })` — release worklet returns per-axis Inertia transitions (snap-to-tick spring, decay with bounds, etc.). Velocity stays on the UI thread; no JS round-trip.
90
98
  - `useSwipe`, `usePan` hooks composable with any `Motion.*` primitive via `<GestureDetector>`.
91
99
 
92
- [unreleased]: https://github.com/rootnative/inertia/compare/core+gestures+gradients+svg@0.0.10...HEAD
100
+ [unreleased]: https://github.com/rootnative/inertia/compare/core+gestures+gradients+svg@0.0.11...HEAD
101
+ [0.0.11]: https://github.com/rootnative/inertia/releases/tag/core+gestures+gradients+svg@0.0.11
93
102
  [0.0.10]: https://github.com/rootnative/inertia/releases/tag/core+gestures+gradients+svg@0.0.10
94
103
  [0.0.9]: https://github.com/rootnative/inertia/releases/tag/core+gestures+gradients+svg@0.0.9
95
104
  [0.0.8]: https://github.com/rootnative/inertia/releases/tag/core+gestures+gradients+svg@0.0.8
package/README.md CHANGED
@@ -18,7 +18,7 @@ pnpm add @rootnative/inertia-gestures react-native-gesture-handler
18
18
 
19
19
  Then follow the [`react-native-gesture-handler` install guide](https://docs.swmansion.com/react-native-gesture-handler/docs/installation) — it needs `<GestureHandlerRootView>` near the root of your app.
20
20
 
21
- **Peer dependencies:** `@rootnative/inertia` (workspace or installed), `react >=19.0.0`, `react-native >=0.81.0`, `react-native-reanimated >=4.0.0`, `react-native-gesture-handler >=2.0.0`.
21
+ **Peer dependencies:** `@rootnative/inertia` (workspace or installed), `react >=19.2.3`, `react-native >=0.83.0 <0.87.0`, `react-native-reanimated >=4.5.0 <4.6.0`, `react-native-gesture-handler >=2.0.0`.
22
22
 
23
23
  ## What ships
24
24
 
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PanGesture } from 'react-native-gesture-handler';
2
- import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
3
- import { SpringTransition, TimingTransition, DecayTransition, NoAnimationTransition, TransitionName } from '@rootnative/inertia';
2
+ import { SharedValue } from 'react-native-reanimated';
3
+ import { SpringTransition, TimingTransition, DecayTransition, NoAnimationTransition, TranslateStyle, TransitionName } from '@rootnative/inertia';
4
4
 
5
5
  /**
6
6
  * Public types for `@rootnative/inertia-gestures`.
@@ -124,7 +124,7 @@ interface UseDragResult {
124
124
  * following the finger. Nest another animated view, or build one style from
125
125
  * `dragX` / `dragY` with `useInterpolatedStyle`, to add a transform.
126
126
  */
127
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
127
+ animatedStyle: TranslateStyle;
128
128
  /** Current x translation in pixels. UI-thread shared value. */
129
129
  dragX: SharedValue<number>;
130
130
  /** Current y translation in pixels. UI-thread shared value. */
@@ -247,7 +247,7 @@ interface UseSwipeResult {
247
247
  * own, nest another animated view, or build one style from `swipeX` /
248
248
  * `swipeY` yourself with `useInterpolatedStyle`.
249
249
  */
250
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
250
+ animatedStyle: TranslateStyle;
251
251
  /** Live x translation. */
252
252
  swipeX: SharedValue<number>;
253
253
  /** Live y translation. */
@@ -335,7 +335,7 @@ interface UsePanResult {
335
335
  * with it. Nest another animated view, or build one style from `panX` /
336
336
  * `panY` with `useInterpolatedStyle`, to add a transform of your own.
337
337
  */
338
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
338
+ animatedStyle: TranslateStyle;
339
339
  /** Live x translation, persistent across gestures. */
340
340
  panX: SharedValue<number>;
341
341
  /** Live y translation, persistent across gestures. */
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PanGesture } from 'react-native-gesture-handler';
2
- import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
3
- import { SpringTransition, TimingTransition, DecayTransition, NoAnimationTransition, TransitionName } from '@rootnative/inertia';
2
+ import { SharedValue } from 'react-native-reanimated';
3
+ import { SpringTransition, TimingTransition, DecayTransition, NoAnimationTransition, TranslateStyle, TransitionName } from '@rootnative/inertia';
4
4
 
5
5
  /**
6
6
  * Public types for `@rootnative/inertia-gestures`.
@@ -124,7 +124,7 @@ interface UseDragResult {
124
124
  * following the finger. Nest another animated view, or build one style from
125
125
  * `dragX` / `dragY` with `useInterpolatedStyle`, to add a transform.
126
126
  */
127
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
127
+ animatedStyle: TranslateStyle;
128
128
  /** Current x translation in pixels. UI-thread shared value. */
129
129
  dragX: SharedValue<number>;
130
130
  /** Current y translation in pixels. UI-thread shared value. */
@@ -247,7 +247,7 @@ interface UseSwipeResult {
247
247
  * own, nest another animated view, or build one style from `swipeX` /
248
248
  * `swipeY` yourself with `useInterpolatedStyle`.
249
249
  */
250
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
250
+ animatedStyle: TranslateStyle;
251
251
  /** Live x translation. */
252
252
  swipeX: SharedValue<number>;
253
253
  /** Live y translation. */
@@ -335,7 +335,7 @@ interface UsePanResult {
335
335
  * with it. Nest another animated view, or build one style from `panX` /
336
336
  * `panY` with `useInterpolatedStyle`, to add a transform of your own.
337
337
  */
338
- animatedStyle: ReturnType<typeof useAnimatedStyle>;
338
+ animatedStyle: TranslateStyle;
339
339
  /** Live x translation, persistent across gestures. */
340
340
  panX: SharedValue<number>;
341
341
  /** Live y translation, persistent across gestures. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rootnative/inertia-gestures",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Gesture-handler-driven drag / pan / swipe adapters for @rootnative/inertia.",
5
5
  "license": "MIT",
6
6
  "author": "RootNative",
@@ -50,26 +50,28 @@
50
50
  "!**/*.test.*"
51
51
  ],
52
52
  "peerDependencies": {
53
- "@rootnative/inertia": ">=0.0.10 <0.1.0",
54
- "react": ">=19.0.0",
55
- "react-native": ">=0.81.0",
53
+ "@rootnative/inertia": ">=0.0.11 <0.1.0",
54
+ "react": ">=19.2.3 <20.0.0",
55
+ "react-native": ">=0.83.0 <0.87.0",
56
56
  "react-native-gesture-handler": ">=2.0.0",
57
- "react-native-reanimated": ">=4.0.0"
57
+ "react-native-reanimated": ">=4.5.0 <4.6.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@react-native/babel-preset": "^0.81.5",
60
+ "@react-native/babel-preset": "^0.86.3",
61
+ "@react-native/jest-preset": "^0.86.3",
61
62
  "@testing-library/react-native": "^13.3.3",
62
63
  "@types/jest": "^29.5.14",
63
- "@types/react": "^19.1.0",
64
+ "@types/react": "^19.2.0",
64
65
  "jest": "^29.7.0",
65
- "react": "19.1.0",
66
- "react-native": "0.81.5",
67
- "react-native-gesture-handler": "~2.28.0",
68
- "react-native-reanimated": "~4.1.1",
69
- "react-test-renderer": "19.1.0",
66
+ "react": "19.2.3",
67
+ "react-native": "0.86.3",
68
+ "react-native-gesture-handler": "~2.32.0",
69
+ "react-native-reanimated": "4.5.1",
70
+ "react-native-worklets": "0.10.1",
71
+ "react-test-renderer": "19.2.3",
70
72
  "tsup": "^8.3.5",
71
73
  "typescript": "^5.7.3",
72
- "@rootnative/inertia": "0.0.10"
74
+ "@rootnative/inertia": "0.0.11"
73
75
  },
74
76
  "publishConfig": {
75
77
  "access": "public"
package/src/useDrag.ts CHANGED
@@ -5,11 +5,11 @@ import {
5
5
  useSharedValue,
6
6
  type SharedValue,
7
7
  } from 'react-native-reanimated'
8
- import type { useAnimatedStyle } from 'react-native-reanimated'
9
8
  import {
10
9
  applyBounds,
11
10
  buildReleaseAnimation,
12
11
  useTranslateStyle,
12
+ type TranslateStyle,
13
13
  } from '@rootnative/inertia'
14
14
  import { useLatestCallback } from './useLatestCallback'
15
15
  import type { DragConstraints, DragOptions } from './types'
@@ -27,7 +27,7 @@ export interface UseDragResult {
27
27
  * following the finger. Nest another animated view, or build one style from
28
28
  * `dragX` / `dragY` with `useInterpolatedStyle`, to add a transform.
29
29
  */
30
- animatedStyle: ReturnType<typeof useAnimatedStyle>
30
+ animatedStyle: TranslateStyle
31
31
  /** Current x translation in pixels. UI-thread shared value. */
32
32
  dragX: SharedValue<number>
33
33
  /** Current y translation in pixels. UI-thread shared value. */
package/src/usePan.ts CHANGED
@@ -5,8 +5,7 @@ import {
5
5
  withDecay,
6
6
  type SharedValue,
7
7
  } from 'react-native-reanimated'
8
- import type { useAnimatedStyle } from 'react-native-reanimated'
9
- import { useTranslateStyle } from '@rootnative/inertia'
8
+ import { useTranslateStyle, type TranslateStyle } from '@rootnative/inertia'
10
9
  import type { DragConstraints } from './types'
11
10
 
12
11
  export interface PanOptions {
@@ -41,7 +40,7 @@ export interface UsePanResult {
41
40
  * with it. Nest another animated view, or build one style from `panX` /
42
41
  * `panY` with `useInterpolatedStyle`, to add a transform of your own.
43
42
  */
44
- animatedStyle: ReturnType<typeof useAnimatedStyle>
43
+ animatedStyle: TranslateStyle
45
44
  /** Live x translation, persistent across gestures. */
46
45
  panX: SharedValue<number>
47
46
  /** Live y translation, persistent across gestures. */
package/src/useSwipe.ts CHANGED
@@ -5,7 +5,6 @@ import {
5
5
  useSharedValue,
6
6
  type SharedValue,
7
7
  } from 'react-native-reanimated'
8
- import type { useAnimatedStyle } from 'react-native-reanimated'
9
8
  import {
10
9
  buildReleaseAnimation,
11
10
  resolveNamedTransition,
@@ -13,6 +12,7 @@ import {
13
12
  useTranslateStyle,
14
13
  type TransitionConfig,
15
14
  type TransitionName,
15
+ type TranslateStyle,
16
16
  } from '@rootnative/inertia'
17
17
  import { useLatestCallback } from './useLatestCallback'
18
18
  import type { ReleaseInfo, ReleaseResult, SnapBackTransition } from './types'
@@ -120,7 +120,7 @@ export interface UseSwipeResult {
120
120
  * own, nest another animated view, or build one style from `swipeX` /
121
121
  * `swipeY` yourself with `useInterpolatedStyle`.
122
122
  */
123
- animatedStyle: ReturnType<typeof useAnimatedStyle>
123
+ animatedStyle: TranslateStyle
124
124
  /** Live x translation. */
125
125
  swipeX: SharedValue<number>
126
126
  /** Live y translation. */