Skip to content

Commit 66ccb6d

Browse files
release: version packages (beta) (#870)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 12c1a63 commit 66ccb6d

3 files changed

Lines changed: 57 additions & 8 deletions

File tree

.changeset/pre.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"react-native-reanimated-carousel": "4.0.3"
66
},
77
"changesets": [
8-
"honest-baboons-sip"
8+
"blue-news-stare",
9+
"fix-nonloop-overdrag-visible-ranges",
10+
"fix-nonloop-overscroll",
11+
"fix-pagination-accessibility",
12+
"honest-baboons-sip",
13+
"odd-news-carry"
914
]
1015
}

CHANGELOG.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# react-native-reanimated-carousel
22

3+
## 5.0.0-beta.1
4+
5+
### Minor Changes
6+
7+
- [#853](https://github.com/dohooo/react-native-reanimated-carousel/pull/853) [`c595958`](https://github.com/dohooo/react-native-reanimated-carousel/commit/c59595896381c36cc395f95b8631aee503cfd927) Thanks [@dohooo](https://github.com/dohooo)! - - add `itemWidth`/`itemHeight` props so horizontal and vertical carousels can define their snapping step explicitly (e.g. to show multiple cards per page)
8+
9+
- default behaviour still falls back to the carousel container size or legacy `width`/`height` props
10+
11+
- [#853](https://github.com/dohooo/react-native-reanimated-carousel/pull/853) [`c595958`](https://github.com/dohooo/react-native-reanimated-carousel/commit/c59595896381c36cc395f95b8631aee503cfd927) Thanks [@dohooo](https://github.com/dohooo)! - ## ✨ Style API refresh
12+
13+
- `style` now controls the outer carousel container (positioning, width/height, margins).
14+
- New `contentContainerStyle` replaces `containerStyle` for styling the scrollable content.
15+
- `width` and `height` props are deprecated; define size via `style` instead.
16+
17+
### Migration Example
18+
19+
```tsx
20+
// Before
21+
<Carousel
22+
width={300}
23+
height={200}
24+
containerStyle={{ paddingHorizontal: 16 }}
25+
/>
26+
27+
// After
28+
<Carousel
29+
style={{ width: 300, height: 200 }}
30+
contentContainerStyle={{ paddingHorizontal: 16 }}
31+
/>
32+
```
33+
34+
- Any layout logic still works; simply move `width`/`height` into `style` and container tweaks into `contentContainerStyle`.
35+
- `contentContainerStyle` runs on the JS thread—avoid adding `opacity` / `transform` there if you rely on built-in animations.
36+
37+
### Patch Changes
38+
39+
- [#872](https://github.com/dohooo/react-native-reanimated-carousel/pull/872) [`12c1a63`](https://github.com/dohooo/react-native-reanimated-carousel/commit/12c1a636185e476ba71698f6fe507217c6326d50) Thanks [@dohooo](https://github.com/dohooo)! - Clamp visible ranges for non-loop overdrag and add test to ensure the first item stays visible when dragging right on the first page. Credits to PR #869 reporter.
40+
41+
- [#871](https://github.com/dohooo/react-native-reanimated-carousel/pull/871) [`bc7daaf`](https://github.com/dohooo/react-native-reanimated-carousel/commit/bc7daafbe9c927b54fe0b57c7c137382da7f382f) Thanks [@dohooo](https://github.com/dohooo)! - Fix non-loop overscroll direction so tiny positive offsets at the first page no longer wrap to the last page when calling next()/scrollTo(), and add integration coverage for the scenario. Thanks to @hennessyevan for the original report and PR 839 inspiration.
42+
43+
- [#866](https://github.com/dohooo/react-native-reanimated-carousel/pull/866) [`566bf52`](https://github.com/dohooo/react-native-reanimated-carousel/commit/566bf52ef775b861febc74dc602d3f5e7289004c) Thanks [@hennessyevan](https://github.com/hennessyevan)! - Fix pagination accessibility state by syncing selection with scheduleOnRN instead of reading reanimated values during render, and add coverage to avoid test warnings.
44+
345
## 5.0.0-beta.0
446

547
### Major Changes
@@ -16,24 +58,26 @@
1658
#### Migration Guide
1759

1860
**Before:**
61+
1962
```jsx
2063
<Carousel
2164
width={300}
2265
height={200}
23-
style={{ backgroundColor: 'red' }} // Applied to inner container
66+
style={{ backgroundColor: "red" }} // Applied to inner container
2467
containerStyle={{ margin: 10 }} // Applied to outer container
2568
/>
2669
```
2770

2871
**After:**
72+
2973
```jsx
3074
<Carousel
31-
style={{
32-
width: 300,
33-
height: 200,
34-
margin: 10
75+
style={{
76+
width: 300,
77+
height: 200,
78+
margin: 10,
3579
}} // Applied to outer container
36-
contentContainerStyle={{ backgroundColor: 'red' }} // Applied to inner container
80+
contentContainerStyle={{ backgroundColor: "red" }} // Applied to inner container
3781
/>
3882
```
3983

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-reanimated-carousel",
3-
"version": "5.0.0-beta.0",
3+
"version": "5.0.0-beta.1",
44
"packageManager": "yarn@4.0.2",
55
"description": "Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.",
66
"author": "Doho <zhaodonghao586@outlook.com> (https://github.com/dohooo)",

0 commit comments

Comments
 (0)