Skip to content

Commit 9c2e496

Browse files
committed
transform-specific transitions
1 parent a865ef0 commit 9c2e496

File tree

7 files changed

+1084
-1813
lines changed

7 files changed

+1084
-1813
lines changed

.yarn/install-state.gz

-108 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.27.5](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.5) (2024-02-20)
7+
8+
**Note:** Version bump only for package moti
9+
10+
11+
12+
13+
14+
## [0.27.5](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.5) (2024-02-20)
15+
16+
**Note:** Version bump only for package moti
17+
18+
19+
20+
21+
22+
## [0.27.4](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.4) (2024-02-20)
23+
24+
**Note:** Version bump only for package moti
25+
26+
27+
28+
29+
30+
## [0.27.4](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.4) (2024-02-20)
31+
32+
**Note:** Version bump only for package moti
33+
34+
35+
36+
37+
638
## [0.27.4](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.4) (2024-02-20)
739

840
**Note:** Version bump only for package moti

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
],
66
"npmClient": "npm",
77
"useWorkspaces": true,
8-
"version": "0.27.4",
8+
"version": "0.27.5",
99
"command": {
1010
"publish": {
1111
"allowBranch": "master",

packages/moti/CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.27.5](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.5) (2024-02-20)
7+
8+
**Note:** Version bump only for package moti
9+
10+
11+
12+
13+
14+
## [0.27.5](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.5) (2024-02-20)
15+
16+
**Note:** Version bump only for package moti
17+
18+
19+
20+
21+
22+
## [0.27.4](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.4) (2024-02-20)
23+
24+
**Note:** Version bump only for package moti
25+
26+
27+
28+
29+
30+
## [0.27.4](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.4) (2024-02-20)
31+
32+
**Note:** Version bump only for package moti
33+
34+
35+
36+
37+
638
## [0.27.4](https://github.com/nandorojo/moti/compare/v0.27.1...v0.27.4) (2024-02-20)
739

840
**Note:** Version bump only for package moti

packages/moti/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "moti",
3-
"private": false,
43
"version": "0.27.4",
54
"keywords": [
65
"react-native",
@@ -50,7 +49,7 @@
5049
},
5150
"devDependencies": {
5251
"expo-linear-gradient": "^10.0.3",
53-
"expo-module-scripts": "^2.0.0",
52+
"expo-module-scripts": "^3.4.1",
5453
"react-native-linear-gradient": "^2.6.2",
5554
"react-native-reanimated": "3.5.4",
5655
"typescript": "^5.2.0"

packages/moti/src/core/use-motify.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,14 @@ export function useMotify<Animate>({
553553
delayMs = transition?.[transformKey]?.delay
554554
}
555555

556+
const {
557+
animation,
558+
config,
559+
shouldRepeat,
560+
repeatCount,
561+
repeatReverse,
562+
} = animationConfig(transformKey, transition)
563+
556564
let finalValue = animation(transformValue, config, callback)
557565
if (shouldRepeat) {
558566
finalValue = withRepeat(finalValue, repeatCount, repeatReverse)
@@ -609,8 +617,6 @@ export function useMotify<Animate>({
609617
}
610618
} else if (isTransform(key)) {
611619
final['transform'] = final['transform'] || []
612-
// const transformKey = Object.keys(transformProp)[0]
613-
// const transformValue = transformProp[transformKey]
614620

615621
if (transition?.[key]?.delay != null) {
616622
delayMs = transition?.[key]?.delay

0 commit comments

Comments
 (0)