Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .changeset/major-animals-sin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/orange-squids-grin.md

This file was deleted.

29 changes: 0 additions & 29 deletions .changeset/single-tap-events.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/soft-cameras-invite.md

This file was deleted.

56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# react-native-gesture-image-viewer

## 2.3.0

### Minor Changes

- [#158](https://github.com/saseungmin/react-native-gesture-image-viewer/pull/158) [`7999145`](https://github.com/saseungmin/react-native-gesture-image-viewer/commit/79991459c353814bdeb9a7a06205f74b8faf35a1) Thanks [@saseungmin](https://github.com/saseungmin)! - feat: add cross-platform single tap support for `GestureViewer`

This release adds `onSingleTap` to `GestureViewer` so you can handle confirmed single taps without overlaying an extra pressable on top of the viewer.

```tsx
<GestureViewer
data={images}
renderItem={renderImage}
onSingleTap={() => setShowControls((prev) => !prev)}
/>
```

It also adds a `tap` event to `useGestureViewerEvent`, currently emitting confirmed single taps with `{ kind: 'single', x, y, index }`.

```tsx
useGestureViewerEvent("tap", (event) => {
if (event.kind === "single") {
console.log(`Tapped item ${event.index} at (${event.x}, ${event.y})`);
}
});
```

This improves common viewer UI patterns such as toggling headers, toolbars, counters, or captions on tap while preserving swipe, pinch, dismiss, and double-tap zoom behavior.

Related discussion: https://github.com/saseungmin/react-native-gesture-image-viewer/discussions/157

- [#161](https://github.com/saseungmin/react-native-gesture-image-viewer/pull/161) [`5e8ad1f`](https://github.com/saseungmin/react-native-gesture-image-viewer/commit/5e8ad1f069e22fee60633a118171d45b9b78dcb0) Thanks [@saseungmin](https://github.com/saseungmin)! - feat: add configurable dismiss swipe directions

- `GestureViewer` now supports `dismiss.direction` with `down`, `up`, and `both`.
- The default remains `down` for backward compatibility, and backdrop fading now follows the configured dismiss direction.

Example:

```tsx
<GestureViewer
data={images}
renderItem={renderImage}
dismiss={{
direction: "both",
}}
/>
```

### Patch Changes

- [#160](https://github.com/saseungmin/react-native-gesture-image-viewer/pull/160) [`8f3ce64`](https://github.com/saseungmin/react-native-gesture-image-viewer/commit/8f3ce64761e66d753af8a2688bf6e021aa787675) Thanks [@saseungmin](https://github.com/saseungmin)! - docs: add AI documentation links to README

- [llms.txt](https://react-native-gesture-image-viewer.pages.dev/llms.txt)
- [llms-full.txt](https://react-native-gesture-image-viewer.pages.dev/llms-full.txt)

- [#156](https://github.com/saseungmin/react-native-gesture-image-viewer/pull/156) [`63c258f`](https://github.com/saseungmin/react-native-gesture-image-viewer/commit/63c258f229808725c276807d404879437dcdd5a6) Thanks [@cljamal](https://github.com/cljamal)! - fix: support bidirectional (up & down) swipe-to-dismiss

## 2.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-gesture-image-viewer",
"version": "2.2.0",
"version": "2.3.0",
"description": "🖼️ React Native Image Viewer - Reanimated-powered image gestures with full control",
"keywords": [
"android",
Expand Down
Loading