react-native-swipeable-actions 1.0.0-rc.0 → 1.1.0

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
@@ -5,6 +5,87 @@ the entry for the matching version.
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## 1.1.0 - 2026-11-13
9
+
10
+ Install it with `npx expo install react-native-swipeable-actions@^1`. The release
11
+ changes native code, so rebuild the iOS and Android apps after you upgrade. It has
12
+ no breaking changes.
13
+
14
+ ### Added
15
+
16
+ - `gestureInsets` prop and the `GestureInsets` type. A touch that starts inside an
17
+ edge band does not start a swipe and goes to the children. Use it for a horizontal
18
+ pager inside a swipe-to-go-back screen.
19
+
20
+ ## 1.0.0 - 2026-10-20
21
+
22
+ First stable v1 release. Install it with
23
+ `npx expo install react-native-swipeable-actions@^1`. Rebuild the iOS and Android
24
+ apps after you upgrade. Read the [v1 migration guide](docs/migration-v1.md).
25
+ The package code is the same as in 1.0.0-rc.0. The lists below are the changes
26
+ since 0.1.12.
27
+
28
+ ### BREAKING CHANGES
29
+
30
+ - The package requires the New Architecture (Fabric) on iOS and Android. The
31
+ legacy architecture (Paper) is not supported. The iOS view does not compile on it.
32
+ - The minimum peer versions are now Expo SDK 54 (`expo >=54.0.0`), React Native
33
+ 0.81 (`react-native >=0.81.0`) and React 19.1 (`react >=19.1.0`).
34
+ - Removed `actions`, `actionsWidth` and `actionsPosition`. Pass explicit pairs:
35
+ `rightActions` + `rightActionsWidth` and/or `leftActions` + `leftActionsWidth`
36
+ ([#15](https://github.com/chocky335/react-native-swipeable-actions/issues/15)).
37
+ - Removed `SWIPE_DEFAULTS.ACTIONS_POSITION`. There is no default side.
38
+ - Removed `actionsWidth` and `actionsPosition` from the raw `SwipeableView` props.
39
+ - `SwipeableProps` is now a union type of valid side configurations, not an
40
+ interface. Use `SwipeableProps & { ... }` for wrapper props.
41
+ - Every row uses one native engine. Rows migrated from the single-sided API take
42
+ its behavior:
43
+ - A drag toward a disabled side stays closed and does not start a swipe. The
44
+ old wrong-direction rubber band is gone.
45
+ - `onSwipeStateChange` follows the active side. Do not depend on the old
46
+ callback cadence.
47
+ - `close(false)` and `cancel()` also clear the cached open state for the key.
48
+ - Cache restoration and width updates are not swipes. Do not use the swipe
49
+ callbacks to detect them.
50
+ - `open()` with no side opens the right side if it is enabled, else the left side.
51
+
52
+ ### Added
53
+
54
+ - Independent left and right actions on one row, each with its own width.
55
+ - `open(side)` and `Swipeable.open(key, side)`.
56
+ - `onLeftSwipeEnd` and `onRightSwipeEnd`. They run after `onSwipeEnd`.
57
+ - Opt-in `appearance="ios26"` iOS action motion, and the `hapticFeedback`
58
+ prop for the iOS threshold haptic. Reduce Motion removes the motion scaling
59
+ ([#19](https://github.com/chocky335/react-native-swipeable-actions/issues/19)).
60
+ - Type exports `SwipeSide`, `SwipeAppearance`, `SwipeableCommonProps`,
61
+ `SwipeStartEvent`, and the aliases `TwoSidedSwipeableProps` and
62
+ `SwipeableComponentProps`.
63
+
64
+ ### Fixed
65
+
66
+ - Action alignment on the physical edge in RTL layouts.
67
+ - A recycled or rebound row no longer receives commands, callbacks or open state
68
+ from its previous key.
69
+ - A drag that crosses the closed position no longer opens the opposite side.
70
+ - On Android, content replaced during a drag no longer keeps the drag offset.
71
+ - `Swipeable.closeAll()` now also closes rows that are not mounted (scrolled off
72
+ or on a covered screen), like `Swipeable.close(key)`.
73
+ - `expo-modules-core` is no longer a peer dependency. A fresh `npm install`
74
+ could pull a newer expo-modules-core than the app's Expo SDK uses. The app now
75
+ gets the version its `expo` package brings.
76
+ - The shipped Jest mock (`jestSetup.js`) no longer calls `onSwipeStart` when a row
77
+ mounts. Tests that relied on that call must fire the native event themselves,
78
+ as the README shows.
79
+ - On Android, a swipe with no touch events for 5 seconds is now cancelled
80
+ without an `onSwipeEnd`, and the rest of that touch is ignored.
81
+ - A cancelled swipe now reports the position where the row settles to
82
+ `onProgress` and `onSwipeStateChange`, so a progress UI does not stay mid-drag.
83
+ - An `autoClose` row that a cancelled drag returns to open now waits
84
+ `autoCloseTimeout` again and closes. Before, it stayed open.
85
+ - On iOS, a pan that has not passed `dragOffsetFromEdge` no longer stops a
86
+ pending auto-close or a settling animation. That work and a props change also
87
+ no longer swallow the pan, so the pan can still start a swipe, like on Android.
88
+
8
89
  ## 1.0.0-rc.0 - 2026-10-17
9
90
 
10
91
  First release candidate for 1.0.0. Install it with
package/README.md CHANGED
@@ -194,6 +194,35 @@ const key = useId();
194
194
  The example app has a small reusable wrapper,
195
195
  [`SwipeToGoBack`](https://github.com/chocky335/react-native-swipeable-actions/blob/main/example/components/SwipeToGoBack.tsx).
196
196
 
197
+ ### A horizontal pager inside the screen
198
+
199
+ A horizontal pager or carousel inside the screen needs the same drag as the swipe.
200
+ On Android the row can take a drag in the swipe direction before the pager claims it.
201
+ The screen then moves and the page does not turn. Set `gestureInsets` to the area
202
+ that the pager covers. A touch that starts there goes to the pager. A touch anywhere
203
+ else still swipes the screen.
204
+
205
+ ```tsx
206
+ <Swipeable
207
+ recyclingKey={key}
208
+ leftActions={<View />}
209
+ leftActionsWidth={width}
210
+ gestureInsets={{ bottom: pagerHeight }}
211
+ >
212
+ {/* A horizontal pager fills the bottom `pagerHeight` of this screen. */}
213
+ <ChatScreen />
214
+ </Swipeable>
215
+ ```
216
+
217
+ - Each inset is a distance in layout units (dp on Android, pt on iOS) from that edge
218
+ of the row: `top`, `bottom`, `left`, `right`. An edge that you leave out has no band.
219
+ - The row reads the insets when a touch goes down. That touch keeps its answer until
220
+ the finger lifts: the row does not track it, intercept it or cancel the touches of
221
+ its children. If you change the insets during a touch, the next touch uses them.
222
+ - The insets apply while the row is closed and at rest. An open or moving row ignores
223
+ them, so a swipe from any point can always close it.
224
+ - `open()`, `close()` and `cancel()` do not depend on the insets.
225
+
197
226
  ## Commands
198
227
 
199
228
  ```tsx
@@ -292,6 +321,7 @@ start/end actions, map them to left/right yourself.
292
321
  | `friction` | `number` | `1` | Drag damping (0-1). Lower values add resistance. |
293
322
  | `dragOffsetFromEdge` | `number` | `0` | Horizontal distance before the swipe starts. |
294
323
  | `gestureEnabled` | `boolean` | `true` | Turns the gesture off. Commands still work. |
324
+ | `gestureInsets` | `{ top?, bottom?, left?, right?: number }` | - | Edge bands where a touch does not start a swipe and goes to the children. See [a horizontal pager inside the screen](#a-horizontal-pager-inside-the-screen). |
295
325
  | `autoClose` | `boolean` | `false` | Snap back after a completed swipe. |
296
326
  | `autoCloseTimeout` | `number` | `0` | Delay in ms before the auto-close. |
297
327
  | `appearance` | `'default' \| 'ios26'` | `'default'` | iOS action motion preset. |
@@ -332,6 +362,7 @@ import type {
332
362
  SwipeableStatic, // Static methods
333
363
  SwipeSide, // 'left' | 'right'
334
364
  SwipeAppearance, // 'default' | 'ios26'
365
+ GestureInsets, // { top?, bottom?, left?, right? } in layout units
335
366
  } from "react-native-swipeable-actions";
336
367
  ```
337
368
 
@@ -47,6 +47,9 @@ class SwipeableModule : Module() {
47
47
  Prop("gestureEnabled") { view: SwipeableView, enabled: Boolean ->
48
48
  view.gestureEnabled = enabled
49
49
  }
50
+ Prop("gestureInsets") { view: SwipeableView, insets: Map<String, Double>? ->
51
+ view.setGestureInsets(insets)
52
+ }
50
53
  Prop("dragOffsetFromEdge") { view: SwipeableView, offset: Float ->
51
54
  view.dragOffsetFromEdge = offset
52
55
  }
@@ -257,6 +257,41 @@ class SwipeableView(context: Context, appContext: AppContext) : ExpoView(context
257
257
  var dragOffsetFromEdge: Float = 0f
258
258
  set(value) { field = maxOf(0f, value) }
259
259
 
260
+ private var gestureInsetTopPx = 0f
261
+ private var gestureInsetBottomPx = 0f
262
+ private var gestureInsetLeftPx = 0f
263
+ private var gestureInsetRightPx = 0f
264
+ private var isInsetTouch = false
265
+
266
+ // No configurationChanged(): the bands are read at ACTION_DOWN, so a change waits for the next touch.
267
+ fun setGestureInsets(insets: Map<String, Double>?) {
268
+ gestureInsetTopPx = gestureInsetPx(insets?.get("top"))
269
+ gestureInsetBottomPx = gestureInsetPx(insets?.get("bottom"))
270
+ gestureInsetLeftPx = gestureInsetPx(insets?.get("left"))
271
+ gestureInsetRightPx = gestureInsetPx(insets?.get("right"))
272
+ }
273
+
274
+ private fun gestureInsetPx(dp: Double?): Float =
275
+ if (dp != null && dp.isFinite() && dp > 0.0) dp.toFloat() * density else 0f
276
+
277
+ /**
278
+ * True for a whole touch sequence that went down inside an inset band. The row
279
+ * leaves that sequence to its children. An open or moving row ignores the bands,
280
+ * so a swipe from any point can close it.
281
+ */
282
+ private fun passesInsetTouch(event: MotionEvent): Boolean {
283
+ if (event.actionMasked == MotionEvent.ACTION_DOWN) {
284
+ val closedAtRest = !isOpen && !isAnimating && !isDragging && currentTranslation == 0f
285
+ isInsetTouch = closedAtRest && (
286
+ gestureInsetTopPx > 0f && event.y < gestureInsetTopPx ||
287
+ gestureInsetBottomPx > 0f && event.y >= height - gestureInsetBottomPx ||
288
+ gestureInsetLeftPx > 0f && event.x < gestureInsetLeftPx ||
289
+ gestureInsetRightPx > 0f && event.x >= width - gestureInsetRightPx
290
+ )
291
+ }
292
+ return isInsetTouch
293
+ }
294
+
260
295
  var autoClose: Boolean = false
261
296
 
262
297
  var autoCloseTimeout: Float = 0f // milliseconds
@@ -516,7 +551,10 @@ class SwipeableView(context: Context, appContext: AppContext) : ExpoView(context
516
551
  */
517
552
  override fun dispatchTouchEvent(event: MotionEvent): Boolean {
518
553
  // Every native touch entry point shares the same cancellation boundary.
519
- if (suppressCancelledTouch(event)) return true
554
+ val cancelled = suppressCancelledTouch(event)
555
+ // A cancel must not cut the children off from a touch the row never took.
556
+ if (passesInsetTouch(event)) return super.dispatchTouchEvent(event)
557
+ if (cancelled) return true
520
558
  if (!gestureEnabled || !hasEnabledSide()) {
521
559
  return super.dispatchTouchEvent(event)
522
560
  }
@@ -604,7 +642,8 @@ class SwipeableView(context: Context, appContext: AppContext) : ExpoView(context
604
642
  }
605
643
 
606
644
  override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
607
- if (suppressCancelledTouch(event)) return false
645
+ val cancelled = suppressCancelledTouch(event)
646
+ if (passesInsetTouch(event) || cancelled) return false
608
647
  if (!gestureEnabled || !hasEnabledSide()) return false
609
648
 
610
649
  when (event.actionMasked) {
@@ -643,7 +682,9 @@ class SwipeableView(context: Context, appContext: AppContext) : ExpoView(context
643
682
  }
644
683
 
645
684
  override fun onTouchEvent(event: MotionEvent): Boolean {
646
- if (suppressCancelledTouch(event)) return true
685
+ val cancelled = suppressCancelledTouch(event)
686
+ if (passesInsetTouch(event)) return false
687
+ if (cancelled) return true
647
688
  if (!gestureEnabled || !hasEnabledSide()) return false
648
689
 
649
690
  velocityTracker?.addMovement(event)
@@ -1 +1 @@
1
- {"version":3,"file":"Swipeable.d.ts","sourceRoot":"","sources":["../src/Swipeable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAQnB,MAAM,OAAO,CAAA;AAYd,OAAO,KAAK,EAIV,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EAIhB,MAAM,mBAAmB,CAAA;AAmQ1B,KAAK,mBAAmB,GAAG,yBAAyB,CAClD,uBAAuB,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAC1D,GACC,eAAe,CAAA;AAEjB,QAAA,MAAM,eAAe,EAAgB,mBAAmB,CAAA;AA+BxD,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"Swipeable.d.ts","sourceRoot":"","sources":["../src/Swipeable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAQnB,MAAM,OAAO,CAAA;AAYd,OAAO,KAAK,EAIV,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EAIhB,MAAM,mBAAmB,CAAA;AAqQ1B,KAAK,mBAAmB,GAAG,yBAAyB,CAClD,uBAAuB,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAC1D,GACC,eAAe,CAAA;AAEjB,QAAA,MAAM,eAAe,EAAgB,mBAAmB,CAAA;AA+BxD,eAAe,eAAe,CAAA"}
@@ -19,7 +19,7 @@ function normalizeRecyclingKey(key) {
19
19
  }
20
20
  return undefined;
21
21
  }
22
- const Swipeable = (0, react_1.forwardRef)(function Swipeable({ children, leftActions, leftActionsWidth, rightActions, rightActionsWidth, onLeftSwipeEnd, onRightSwipeEnd, appearance = 'default', hapticFeedback, friction = constants_1.SWIPE_DEFAULTS.FRICTION, threshold = constants_1.SWIPE_DEFAULTS.THRESHOLD, gestureEnabled = constants_1.SWIPE_DEFAULTS.GESTURE_ENABLED, dragOffsetFromEdge = constants_1.SWIPE_DEFAULTS.DRAG_OFFSET_FROM_EDGE, style, testID, onSwipeStart, onSwipeStateChange, onSwipeEnd, onProgress, autoClose = false, autoCloseTimeout = 0, recyclingKey }, ref) {
22
+ const Swipeable = (0, react_1.forwardRef)(function Swipeable({ children, leftActions, leftActionsWidth, rightActions, rightActionsWidth, onLeftSwipeEnd, onRightSwipeEnd, appearance = 'default', hapticFeedback, friction = constants_1.SWIPE_DEFAULTS.FRICTION, threshold = constants_1.SWIPE_DEFAULTS.THRESHOLD, gestureEnabled = constants_1.SWIPE_DEFAULTS.GESTURE_ENABLED, gestureInsets, dragOffsetFromEdge = constants_1.SWIPE_DEFAULTS.DRAG_OFFSET_FROM_EDGE, style, testID, onSwipeStart, onSwipeStateChange, onSwipeEnd, onProgress, autoClose = false, autoCloseTimeout = 0, recyclingKey }, ref) {
23
23
  const nativeRef = (0, react_1.useRef)(null);
24
24
  const resolved = (0, react_1.useMemo)(() => (0, resolveSwipeableActions_1.resolveSwipeableActions)({
25
25
  leftActions,
@@ -144,7 +144,7 @@ const Swipeable = (0, react_1.forwardRef)(function Swipeable({ children, leftAct
144
144
  }, [normalizedKey, onLeftSwipeEnd, onRightSwipeEnd, onSwipeEnd]);
145
145
  return (<SwipeableView_1.SwipeableView ref={nativeRef} style={[styles.container, style]} leftActionsWidth={resolved.left.width} rightActionsWidth={resolved.right.width} onActionsNeeded={handleActionsNeeded} {...(react_native_1.Platform.OS === 'ios'
146
146
  ? { appearance, hapticFeedback: hapticFeedback ?? appearance === 'ios26' }
147
- : {})} friction={friction} threshold={threshold} gestureEnabled={gestureEnabled} dragOffsetFromEdge={dragOffsetFromEdge} autoClose={autoClose} autoCloseTimeout={autoCloseTimeout} {...(normalizedKey ? { recyclingKey: normalizedKey } : {})} {...(testID ? { testID } : {})} onSwipeStart={handleSwipeStart} onGestureCancelled={handleGestureCancelled} onSwipeProgress={handleSwipeProgress} onSwipeStateChange={handleSwipeStateChange} onSwipeEnd={handleSwipeEnd}>
147
+ : {})} friction={friction} threshold={threshold} gestureEnabled={gestureEnabled} {...(gestureInsets ? { gestureInsets } : {})} dragOffsetFromEdge={dragOffsetFromEdge} autoClose={autoClose} autoCloseTimeout={autoCloseTimeout} {...(normalizedKey ? { recyclingKey: normalizedKey } : {})} {...(testID ? { testID } : {})} onSwipeStart={handleSwipeStart} onGestureCancelled={handleGestureCancelled} onSwipeProgress={handleSwipeProgress} onSwipeStateChange={handleSwipeStateChange} onSwipeEnd={handleSwipeEnd}>
148
148
  <SwipeableActions_1.SwipeableActions key='left-slot' actionsPosition='left' {...(testID ? { testID: `${testID}-left-actions` } : {})}>
149
149
  <react_1.Fragment key={normalizedKey ?? ''}>
150
150
  {sides.left && resolved.left.width > 0 ? resolved.left.node : null}
@@ -1 +1 @@
1
- {"version":3,"file":"Swipeable.js","sourceRoot":"","sources":["../src/Swipeable.tsx"],"names":[],"mappings":";;AAAA,iCAWc;AACd,+CAAyD;AACzD,2CAA4C;AAC5C,2DAO4B;AAC5B,uEAAmE;AAYnE,yDAAqD;AACrD,mDAA+C;AAE/C,SAAS,qBAAqB,CAAC,GAAgC;IAC7D,IAAI,GAAG,IAAI,IAAI;QAAE,OAAO,SAAS,CAAA;IACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAA;IACvC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI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AAG,CAAC,YAAoB,EAAE,EAAE;IAChD,IAAI,OAAO,IAAI,CAAC,CAAC,YAAY,IAAI,OAAO,YAAY,KAAK,QAAQ,CAAC,EAAE,CAAC;QACnE,OAAO,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAA;QAC1E,OAAM;IACR,CAAC;IACD,IAAA,+BAAW,EAAC,YAAY,CAAC,CAAA;AAC3B,CAAC,CAAA;AAED,eAAe,CAAC,QAAQ,GAAG,CAAC,QAAkB,EAAE,EAAE;IAChD,IAAA,4BAAQ,EAAC,QAAQ,CAAC,CAAA;AACpB,CAAC,CAAA;AAED,kBAAe,eAAe,CAAA"}
@@ -2,6 +2,16 @@ import type { ReactNode, Ref } from 'react';
2
2
  import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
3
3
  export type SwipeSide = 'left' | 'right';
4
4
  export type SwipeAppearance = 'default' | 'ios26';
5
+ /**
6
+ * Bands along the edges of the row, in layout units (dp on Android, pt on iOS).
7
+ * A touch that starts inside a band does not start a swipe.
8
+ */
9
+ export interface GestureInsets {
10
+ top?: number;
11
+ bottom?: number;
12
+ left?: number;
13
+ right?: number;
14
+ }
5
15
  /** Internal native identity; the consumer's onSwipeStart remains zero-argument. */
6
16
  export interface SwipeStartEvent {
7
17
  nativeEvent: {
@@ -45,6 +55,7 @@ export interface SwipeableViewProps extends ViewProps {
45
55
  friction?: number;
46
56
  threshold?: number;
47
57
  gestureEnabled?: boolean;
58
+ gestureInsets?: GestureInsets;
48
59
  dragOffsetFromEdge?: number;
49
60
  recyclingKey?: string;
50
61
  onSwipeProgress?: (event: SwipeProgressEvent) => void;
@@ -68,6 +79,11 @@ export interface SwipeableCommonProps {
68
79
  friction?: number;
69
80
  threshold?: number;
70
81
  gestureEnabled?: boolean;
82
+ /**
83
+ * Edge bands where a touch does not start a swipe. The children handle that touch,
84
+ * for example a horizontal pager. Applies while the row is closed and at rest.
85
+ */
86
+ gestureInsets?: GestureInsets;
71
87
  dragOffsetFromEdge?: number;
72
88
  style?: StyleProp<ViewStyle>;
73
89
  testID?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Swipeable.types.d.ts","sourceRoot":"","sources":["../src/Swipeable.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEnE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AACxC,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,CAAA;AAEjD,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAE,CAAA;CACzD;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACxD;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;QAChB,YAAY,EAAE,MAAM,CAAA;QACpB,IAAI,CAAC,EAAE,SAAS,CAAA;QAChB,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,EAAE,SAAS,CAAA;QAChB,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,MAAM,EAAE,MAAM,OAAO,CAAC,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,gBAAgB,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,WAAW,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,CAAC;IAAC,gBAAgB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAExE,KAAK,yBAAyB,GAC1B;IAAE,YAAY,EAAE,SAAS,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,YAAY,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAE1E,sFAAsF;AACtF,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,wBAAwB,GACxB,yBAAyB,GACzB,CAAC;IAAE,WAAW,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,YAAY,EAAE,SAAS,CAAA;CAAE,CAAC,CAAA;AAE5D,uFAAuF;AACvF,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAA;AACnD,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAA"}
package/build/index.d.ts CHANGED
@@ -2,6 +2,6 @@ export { SWIPE_DEFAULTS, SWIPE_PROGRESS } from './constants';
2
2
  export type { NativeModuleError, SwipeableErrorHandler } from './nativeModuleUtils';
3
3
  export { setGlobalErrorHandler } from './nativeModuleUtils';
4
4
  export { default as Swipeable } from './Swipeable';
5
- export type { ActionsNeededEvent, NativeSwipeableRef, SwipeAppearance, SwipeSide, SwipeableCommonProps, SwipeableComponentProps, TwoSidedSwipeableProps, SwipeableMethods, SwipeableProps, SwipeableStatic, SwipeableViewProps, SwipeProgressEvent, SwipeStartEvent, SwipeStateEvent } from './Swipeable.types';
5
+ export type { ActionsNeededEvent, GestureInsets, NativeSwipeableRef, SwipeAppearance, SwipeSide, SwipeableCommonProps, SwipeableComponentProps, TwoSidedSwipeableProps, SwipeableMethods, SwipeableProps, SwipeableStatic, SwipeableViewProps, SwipeProgressEvent, SwipeStartEvent, SwipeStateEvent } from './Swipeable.types';
6
6
  export { SwipeableView } from './SwipeableView';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,yCAA4D;AAAnD,2GAAA,cAAc,OAAA;AAAE,2GAAA,cAAc,OAAA;AAEvC,2BAA2B;AAC3B,yDAA2D;AAAlD,0HAAA,qBAAqB,OAAA;AAC9B,yCAAkD;AAAzC,uHAAA,OAAO,OAAa;AAiB7B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,yCAA4D;AAAnD,2GAAA,cAAc,OAAA;AAAE,2GAAA,cAAc,OAAA;AAEvC,2BAA2B;AAC3B,yDAA2D;AAAlD,0HAAA,qBAAqB,OAAA;AAC9B,yCAAkD;AAAzC,uHAAA,OAAO,OAAa;AAkB7B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
@@ -10,8 +10,8 @@ Do not mix v1 JavaScript with an older native binary.
10
10
  architecture (Paper) is not supported. If your app still uses it, stay on 0.x.
11
11
  - v1 requires Expo SDK 54 or newer, React Native 0.81 or newer and React 19.1 or
12
12
  newer. Upgrade the app first, then install v1.
13
- - Install it with `npx expo install react-native-swipeable-actions@next` while
14
- 1.0 is a release candidate, then rebuild the iOS and Android apps.
13
+ - Install it with `npx expo install react-native-swipeable-actions@^1`, then rebuild
14
+ the iOS and Android apps.
15
15
 
16
16
  ## At a glance
17
17
 
package/docs/support.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Support and tested configurations
2
2
 
3
- This page states what 1.0 was tested on. A configuration that is not listed here
3
+ This page states what 1.x is tested on. A configuration that is not listed here
4
4
  can work, but nobody has checked it.
5
5
 
6
6
  ## Requirements
@@ -42,18 +42,18 @@ The package declares these ranges. They are minimums, not a tested matrix.
42
42
  | iOS deployment target | 13.4 |
43
43
  | Android `minSdkVersion` | 23 |
44
44
 
45
- ## Tested for 1.0
45
+ ## Tested for 1.x
46
46
 
47
- Every configuration below ran the release candidate. The E2E suite has 62 cases
48
- (25 single-sided, 19 two-sided, 14 RTL, 3 swipe to go back, 1 performance) plus the
47
+ Each 1.x release must pass a full CI run on every configuration below. The E2E suite has 63 cases
48
+ (25 single-sided, 19 two-sided, 14 RTL, 4 swipe to go back, 1 performance) plus the
49
49
  Maestro flows.
50
50
 
51
51
  | Area | Configuration | What ran |
52
52
  | --- | --- | --- |
53
53
  | App stack | Expo SDK 54.0, React Native 0.81.5, React 19.1.0 | Example app and a clean app that installs the packed tarball |
54
54
  | Architecture | New Architecture (Fabric), Hermes | All runs below |
55
- | Android | API 34 x86_64 emulator (Pixel 6 profile) | 62 E2E cases, Robolectric unit tests |
56
- | iOS | iOS 26.4 simulator (iPhone 17 Pro), Xcode 26.6 | 62 E2E cases, Maestro flows, Swift unit tests |
55
+ | Android | API 34 x86_64 emulator (Pixel 6 profile) | 63 E2E cases, Robolectric unit tests |
56
+ | iOS | iOS 26.4 simulator (iPhone 17 Pro), Xcode 26.6 | 63 E2E cases, Maestro flows, Swift unit tests |
57
57
  | Packaging | `npm pack` tarball in a clean Expo app | Install, type check, autolinking, release builds on both platforms |
58
58
 
59
59
  The Swift unit tests run with `swift test` on macOS in the `test-ios` CI job. They
@@ -72,7 +72,7 @@ the UIKit view on the simulator.
72
72
  ## Not tested
73
73
 
74
74
  - iOS versions below the simulator runtime above, and Android API levels other than 34.
75
- - Physical Android devices for 1.0. Earlier 0.x benchmarks used a Pixel 8 Pro.
75
+ - Physical Android devices for 1.x. Earlier 0.x benchmarks used a Pixel 8 Pro.
76
76
  - Automated tests of how haptics feel and how Reduce Motion behaves on a device.
77
77
  The maintainer checks them by hand on a physical iPhone. The check runs when no
78
78
  earlier check is recorded, and after a change to the iOS code, the haptics,
@@ -72,6 +72,52 @@ enum SwipeSide: String, CaseIterable {
72
72
  var sign: CGFloat { self == .left ? 1 : -1 }
73
73
  }
74
74
 
75
+ /// Bands along the row edges, in points, where a touch does not start a swipe.
76
+ struct SwipeGestureInsets: Equatable {
77
+ var top: CGFloat = 0
78
+ var bottom: CGFloat = 0
79
+ var left: CGFloat = 0
80
+ var right: CGFloat = 0
81
+
82
+ init(_ values: [String: Double]? = nil) {
83
+ top = Self.band(values?["top"])
84
+ bottom = Self.band(values?["bottom"])
85
+ left = Self.band(values?["left"])
86
+ right = Self.band(values?["right"])
87
+ }
88
+
89
+ private static func band(_ value: Double?) -> CGFloat {
90
+ guard let value = value, value.isFinite, value > 0 else { return 0 }
91
+ return CGFloat(value)
92
+ }
93
+
94
+ /// An open or moving row ignores the bands, so a swipe from any point can close it.
95
+ func blocksTouch(at point: CGPoint, in size: CGSize, isClosedAtRest: Bool) -> Bool {
96
+ guard isClosedAtRest else { return false }
97
+ return top > 0 && point.y < top
98
+ || bottom > 0 && point.y >= size.height - bottom
99
+ || left > 0 && point.x < left
100
+ || right > 0 && point.x >= size.width - right
101
+ }
102
+ }
103
+
104
+ /// The first finger of a touch sequence decides for every later finger, as Android does at ACTION_DOWN.
105
+ struct SwipeInsetTouchLatch<Touch: AnyObject> {
106
+ private struct WeakTouch {
107
+ weak var value: Touch?
108
+ }
109
+
110
+ private var touches: [WeakTouch] = []
111
+ private var blocksSequence = false
112
+
113
+ mutating func receives(_ touch: Touch, blockedIfFirst: Bool, isActive: (Touch) -> Bool) -> Bool {
114
+ touches.removeAll { $0.value.map(isActive) != true }
115
+ if touches.isEmpty { blocksSequence = blockedIfFirst }
116
+ touches.append(WeakTouch(value: touch))
117
+ return !blocksSequence
118
+ }
119
+ }
120
+
75
121
  /// Gesture-owned completion survives width reconciliation, but not commands or rebinding.
76
122
  enum SwipeAutoCloseState: Equatable {
77
123
  case waiting(side: SwipeSide, deadline: TimeInterval)
@@ -69,6 +69,10 @@ public class SwipeableModule: Module {
69
69
  view.gestureEnabled = enabled
70
70
  }
71
71
 
72
+ Prop("gestureInsets") { (view: SwipeableView, insets: [String: Double]?) in
73
+ view.gestureInsets = SwipeGestureInsets(insets)
74
+ }
75
+
72
76
  Prop("dragOffsetFromEdge") { (view: SwipeableView, offset: CGFloat) in
73
77
  view.dragOffsetFromEdge = offset
74
78
  }
@@ -325,6 +325,12 @@ public class SwipeableView: ExpoView {
325
325
  scheduleReconciliation()
326
326
  }
327
327
  }
328
+ // Read only when a touch begins: no reconciliation, so a change waits for the next touch.
329
+ var gestureInsets = SwipeGestureInsets() {
330
+ didSet { if gestureInsets != oldValue { syncInsetTouchObserver() } }
331
+ }
332
+ private var insetTouchLatch = SwipeInsetTouchLatch<UITouch>()
333
+
328
334
  /// Explicit cancellation consumes the rest of the pan and any pending reopen,
329
335
  /// but leaves the binding identity intact for later commands in the same JS turn.
330
336
  func cancelGesture() {
@@ -684,6 +690,24 @@ public class SwipeableView: ExpoView {
684
690
  return gesture
685
691
  }()
686
692
 
693
+ // UIKit skips a disabled pan's delegate, so this one feeds the inset latch and never takes a touch.
694
+ private var insetTouchObserver: UIGestureRecognizer?
695
+
696
+ /// Only a row that sets gestureInsets carries the observer.
697
+ private func syncInsetTouchObserver() {
698
+ guard gestureInsets != SwipeGestureInsets() else {
699
+ insetTouchObserver.map(removeGestureRecognizer)
700
+ return
701
+ }
702
+ let observer = insetTouchObserver ?? UIGestureRecognizer(target: nil, action: nil)
703
+ observer.delegate = self
704
+ insetTouchObserver = observer
705
+ if observer.view !== self {
706
+ observer.view?.removeGestureRecognizer(observer)
707
+ addGestureRecognizer(observer)
708
+ }
709
+ }
710
+
687
711
  // MARK: - Init and attachment
688
712
 
689
713
  public required init(appContext: AppContext? = nil) {
@@ -768,6 +792,7 @@ public class SwipeableView: ExpoView {
768
792
  panGesture.view?.removeGestureRecognizer(panGesture)
769
793
  addGestureRecognizer(panGesture)
770
794
  }
795
+ syncInsetTouchObserver()
771
796
  commitProps()
772
797
  scheduleVisualRestore()
773
798
  // A detached timer/animation must not restart and fabricate an end-open event.
@@ -1465,6 +1490,21 @@ extension SwipeableView: UIGestureRecognizerDelegate {
1465
1490
  return shouldBegin
1466
1491
  }
1467
1492
 
1493
+ public func gestureRecognizer(
1494
+ _ gestureRecognizer: UIGestureRecognizer,
1495
+ shouldReceive touch: UITouch
1496
+ ) -> Bool {
1497
+ guard gestureRecognizer === panGesture || gestureRecognizer === insetTouchObserver else { return true }
1498
+ let blocked = gestureInsets.blocksTouch(
1499
+ at: touch.location(in: self), in: bounds.size,
1500
+ isClosedAtRest: !isOpen && !isAnimating && !isDragging && currentTranslation == 0
1501
+ )
1502
+ let receives = insetTouchLatch.receives(touch, blockedIfFirst: blocked) {
1503
+ $0.phase != .ended && $0.phase != .cancelled
1504
+ }
1505
+ return gestureRecognizer === panGesture && receives
1506
+ }
1507
+
1468
1508
  public func gestureRecognizer(
1469
1509
  _ gestureRecognizer: UIGestureRecognizer,
1470
1510
  shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-swipeable-actions",
3
- "version": "1.0.0-rc.0",
4
- "description": "High-performance native swipeable row component for React Native using Expo Modules",
3
+ "version": "1.1.0",
4
+ "description": "Native swipeable rows with swipe actions for React Native (iOS/Android). No Reanimated.",
5
5
  "main": "src/index.ts",
6
6
  "types": "build/index.d.ts",
7
7
  "files": [
@@ -49,11 +49,20 @@
49
49
  "keywords": [
50
50
  "react-native",
51
51
  "expo",
52
+ "expo-module",
53
+ "ios",
54
+ "android",
55
+ "swipe",
52
56
  "swipeable",
57
+ "swipeable-row",
58
+ "swipeable-list",
59
+ "swipe-actions",
60
+ "swipe-to-delete",
61
+ "list-item",
53
62
  "gesture",
54
63
  "native",
55
- "ios",
56
- "android"
64
+ "new-architecture",
65
+ "typescript"
57
66
  ],
58
67
  "repository": {
59
68
  "type": "git",
@@ -63,7 +72,7 @@
63
72
  "bugs": {
64
73
  "url": "https://github.com/chocky335/react-native-swipeable-actions/issues"
65
74
  },
66
- "author": "chocky335",
75
+ "author": "chocky335 (https://github.com/chocky335)",
67
76
  "license": "MIT",
68
77
  "peerDependencies": {
69
78
  "expo": ">=54.0.0",
package/src/Swipeable.tsx CHANGED
@@ -60,6 +60,7 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableComponentProps>(function
60
60
  friction = SWIPE_DEFAULTS.FRICTION,
61
61
  threshold = SWIPE_DEFAULTS.THRESHOLD,
62
62
  gestureEnabled = SWIPE_DEFAULTS.GESTURE_ENABLED,
63
+ gestureInsets,
63
64
  dragOffsetFromEdge = SWIPE_DEFAULTS.DRAG_OFFSET_FROM_EDGE,
64
65
  style,
65
66
  testID,
@@ -240,6 +241,7 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableComponentProps>(function
240
241
  friction={friction}
241
242
  threshold={threshold}
242
243
  gestureEnabled={gestureEnabled}
244
+ {...(gestureInsets ? { gestureInsets } : {})}
243
245
  dragOffsetFromEdge={dragOffsetFromEdge}
244
246
  autoClose={autoClose}
245
247
  autoCloseTimeout={autoCloseTimeout}
@@ -4,6 +4,17 @@ import type { StyleProp, ViewProps, ViewStyle } from 'react-native'
4
4
  export type SwipeSide = 'left' | 'right'
5
5
  export type SwipeAppearance = 'default' | 'ios26'
6
6
 
7
+ /**
8
+ * Bands along the edges of the row, in layout units (dp on Android, pt on iOS).
9
+ * A touch that starts inside a band does not start a swipe.
10
+ */
11
+ export interface GestureInsets {
12
+ top?: number
13
+ bottom?: number
14
+ left?: number
15
+ right?: number
16
+ }
17
+
7
18
  /** Internal native identity; the consumer's onSwipeStart remains zero-argument. */
8
19
  export interface SwipeStartEvent {
9
20
  nativeEvent: { recyclingKey?: string; side?: SwipeSide }
@@ -46,6 +57,7 @@ export interface SwipeableViewProps extends ViewProps {
46
57
  friction?: number
47
58
  threshold?: number
48
59
  gestureEnabled?: boolean
60
+ gestureInsets?: GestureInsets
49
61
  dragOffsetFromEdge?: number
50
62
  recyclingKey?: string
51
63
  onSwipeProgress?: (event: SwipeProgressEvent) => void
@@ -70,6 +82,11 @@ export interface SwipeableCommonProps {
70
82
  friction?: number
71
83
  threshold?: number
72
84
  gestureEnabled?: boolean
85
+ /**
86
+ * Edge bands where a touch does not start a swipe. The children handle that touch,
87
+ * for example a horizontal pager. Applies while the row is closed and at rest.
88
+ */
89
+ gestureInsets?: GestureInsets
73
90
  dragOffsetFromEdge?: number
74
91
  style?: StyleProp<ViewStyle>
75
92
  testID?: string
package/src/index.ts CHANGED
@@ -5,6 +5,7 @@ export { setGlobalErrorHandler } from './nativeModuleUtils'
5
5
  export { default as Swipeable } from './Swipeable'
6
6
  export type {
7
7
  ActionsNeededEvent,
8
+ GestureInsets,
8
9
  NativeSwipeableRef,
9
10
  SwipeAppearance,
10
11
  SwipeSide,