Skip to content

Commit 8bf6b9c

Browse files
committed
Merge branch 'main' into @mbert/fix-sticky-scroll
2 parents 18978a3 + 13d0070 commit 8bf6b9c

73 files changed

Lines changed: 729 additions & 313 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
- This project contains 3 versions of API. The newest is located in `packages/react-native-gesture-handler/src/v3` directory. Most of the logic is shared, but make sure that your changes do not break older APIs.
2222
- When writing code, you can use `usesNativeOrVirtualDetector` function to either include only, or exclude new API v3. It is available on all platforms.
2323

24+
## API versions — defaults for new code
25+
26+
- **Always use the v3 API by default** for any new code, examples, reproductions, or test screens. `Gesture.*` builders (v2) and `*GestureHandler` components (v1) are legacy. Even when a bug is reported against a legacy API, build the reproduction with v3 first to check whether it affects v3 too — switch to the legacy API only if the issue does not reproduce on v3, or the user explicitly asks for a legacy reproduction.
27+
- v3 usage: hook-based gestures (`usePanGesture`, `useTapGesture`, `useLongPressGesture`, …) attached via `GestureDetector`, all imported from `react-native-gesture-handler` (the main entry re-exports `src/v3`).
28+
2429
## Build checks
2530

2631
- To check Android build go to `apps/basic-example` and run `yarn android` command.

packages/docs-gesture-handler/docs/components/reanimated_swipeable.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,30 +215,30 @@ childrenContainerStyle?: StyleProp<ViewStyle>;
215215

216216
Style object for the children container ([`Animated.View`](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary/#animated-component)).
217217

218-
### simultaneousWithExternalGesture
218+
### simultaneousWith
219219

220220
```ts
221-
simultaneousWithExternalGesture?: AnyGesture | AnyGesture[];
221+
simultaneousWith?: AnyGesture | AnyGesture[];
222222
```
223223

224-
Gestures to be recognized simultaneously with the `Swipeable` (see [gesture composition section](/docs/fundamentals/gesture-composition#simultaneouswith)).
224+
Gestures to be recognized simultaneously with the `Swipeable` (see [`simultaneousWith`](/docs/composition/simultaneous-with)).
225225

226-
### requireExternalGestureToFail
226+
### requireToFail
227227

228228
```ts
229-
requireExternalGestureToFail?: AnyGesture | AnyGesture[];
229+
requireToFail?: AnyGesture | AnyGesture[];
230230
```
231231

232-
Gestures that `Swipeable` has to wait for before activating (see [gesture composition section](/docs/fundamentals/gesture-composition#simultaneouswith)).
232+
Gestures that `Swipeable` has to wait for before activating (see [`requireToFail`](/docs/composition/require-to-fail)).
233233

234234

235-
### blocksExternalGesture
235+
### block
236236

237237
```ts
238-
blocksExternalGesture?: AnyGesture | AnyGesture[];
238+
block?: AnyGesture | AnyGesture[];
239239
```
240240

241-
Gestures that `Swipeable` will prevent from activating (see [gesture composition section](/docs/fundamentals/gesture-composition#simultaneouswith)).
241+
Gestures that `Swipeable` will prevent from activating (see [`block`](/docs/composition/block)).
242242

243243
<Badges platforms={['ios', 'web']}>
244244
### enableTrackpadTwoFingerGesture

packages/docs-gesture-handler/docs/components/wrapped-components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ Those components also receive an additional prop named `onGestureUpdate_CAN_CAUS
8787
onGestureUpdate_CAN_CAUSE_INFINITE_RERENDER?: (gesture: NativeGesture) => void;
8888
```
8989

90-
This callback is invoked when the wrapped component's underlying `Native` gesture instance or configuration changes, providing access to the underlying gesture. This can be helpful when setting up [relations](/docs/fundamentals/gesture-composition) with other gestures. You can check example usage in our [`ScrollView`](https://github.com/software-mansion/react-native-gesture-handler/blob/main/packages/react-native-gesture-handler/src/v3/components/GestureComponents.tsx#L78) component.
90+
This callback is invoked when the wrapped component's underlying `Native` gesture instance or configuration changes, providing access to the underlying gesture. This can be helpful when setting up [relations](/docs/composition/overview) with other gestures. You can check example usage in our [`ScrollView`](https://github.com/software-mansion/react-native-gesture-handler/blob/main/packages/react-native-gesture-handler/src/v3/components/GestureComponents.tsx#L78) component.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "Gesture composition & interactions",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index"
6+
}
7+
}

packages/docs-gesture-handler/docs/fundamentals/_examples/hooks/Competing.tsx renamed to packages/docs-gesture-handler/docs/composition/_examples/hooks/Competing.tsx

File renamed without changes.

packages/docs-gesture-handler/docs/fundamentals/_examples/hooks/Exclusive.tsx renamed to packages/docs-gesture-handler/docs/composition/_examples/hooks/Exclusive.tsx

File renamed without changes.

packages/docs-gesture-handler/docs/fundamentals/_examples/hooks/Simultaneous.tsx renamed to packages/docs-gesture-handler/docs/composition/_examples/hooks/Simultaneous.tsx

File renamed without changes.

packages/docs-gesture-handler/docs/fundamentals/_examples/props/Block.tsx renamed to packages/docs-gesture-handler/docs/composition/_examples/props/Block.tsx

File renamed without changes.

packages/docs-gesture-handler/docs/fundamentals/_examples/props/RequireToFail.tsx renamed to packages/docs-gesture-handler/docs/composition/_examples/props/RequireToFail.tsx

File renamed without changes.

packages/docs-gesture-handler/docs/fundamentals/_examples/props/SimultaneousWith.tsx renamed to packages/docs-gesture-handler/docs/composition/_examples/props/SimultaneousWith.tsx

File renamed without changes.

0 commit comments

Comments
 (0)