diff --git a/README.md b/README.md index 8c6e0c7..0a44a4e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ [![TypeScript](https://img.shields.io/badge/types-included-blue.svg)](./src/types.ts) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md) -A lightweight, production-ready toolkit for smooth, scroll-driven UI with Reanimated 3. +A lightweight, production-ready toolkit for smooth, scroll-driven UI with +Reanimated 3.16+ and 4. - **UI-thread animations** at 60 FPS - **Automatic direction detection** with threshold @@ -50,11 +51,14 @@ pnpm add react-native-motionify # bun bun add react-native-motionify -# peer deps +# peer dependency npm install react-native-reanimated@">=3.16" ``` -Follow Reanimated 3 setup: `https://docs.swmansion.com/react-native-reanimated/docs/3.x/fundamentals/getting-started`. +Follow the setup guide for your installed Reanimated major version: + +- [Reanimated 4 setup](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/) for New Architecture apps. Reanimated 4 also requires `react-native-worklets`. +- [Reanimated 3 setup](https://docs.swmansion.com/react-native-reanimated/docs/3.x/fundamentals/getting-started/) for apps that still use the Legacy Architecture. --- @@ -345,7 +349,7 @@ function HomeScreen() { - `DEFAULTS`: threshold, durations, idle timeout, throttle - `TRANSLATION_PRESETS`: common ranges (e.g., `BOTTOM_TAB`, `FAB_*`, `HEADER`) - `INTERPOLATION_PRESETS`: fade/scale/parallax/rotate/sticky presets -- Helpers: `createInterpolation`, `createFadeInterpolation`, `createScaleInterpolation`, `createParallaxInterpolation`, `createRotationInterpolation`, `clamp`, `lerp`, `mapRange` +- Helpers: `createTranslationRange`, `createInterpolation`, `createFadeInterpolation`, `createScaleInterpolation`, `createParallaxInterpolation`, `createRotationInterpolation`, `clamp`, `lerp`, `mapRange` --- @@ -513,13 +517,16 @@ git clone https://github.com/dennytosp/react-native-motionify.git cd react-native-motionify bun install -bun run typecheck # tsc --noEmit over src/ and test/ -bun test # unit tests for the pure helpers -bun run build # tsc -> lib/ +bun run format:check +bun run lint +bun run typecheck +bun test +bun run build +npm pack --dry-run ``` -These three commands are exactly what CI runs on every pull request. See -[CONTRIBUTING.md](./CONTRIBUTING.md) for the full guide, and +CI also validates the Expo example dependency versions and runs Expo Doctor. +See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full guide, and [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) for community expectations. - Found a bug? [Open an issue](https://github.com/dennytosp/react-native-motionify/issues/new?template=bug_report.yml) diff --git a/example/app.config.ts b/example/app.config.ts index 2621a71..7edda14 100644 --- a/example/app.config.ts +++ b/example/app.config.ts @@ -35,7 +35,6 @@ export default (config: ExpoConfig): ExpoConfig => ({ icon: appIcon.default.icon, scheme: appScheme, userInterfaceStyle: "automatic", - newArchEnabled: true, runtimeVersion: appVersion, ios: { icon: { @@ -64,7 +63,6 @@ export default (config: ExpoConfig): ExpoConfig => ({ backgroundImage: "./assets/images/android-icon-background.png", monochromeImage: "./assets/images/android-icon-monochrome.png", }, - edgeToEdgeEnabled: true, predictiveBackGestureEnabled: false, package: appId, versionCode: buildNumber, diff --git a/example/bun.lock b/example/bun.lock index 0d61d90..8ca0f73 100644 --- a/example/bun.lock +++ b/example/bun.lock @@ -16,7 +16,7 @@ "@reduxjs/toolkit": "^2.9.2", "@shopify/react-native-skia": "2.6.2", "axios": "^1.12.2", - "eas-local-cache": "^1.0.3", + "eas-local-cache": "^1.0.4", "expo": "~57.0.11", "expo-blur": "~57.0.2", "expo-build-properties": "~57.0.9", @@ -45,7 +45,7 @@ "react-native-indicators": "^0.17.0", "react-native-localize": "^3.5.4", "react-native-modal": "^14.0.0-rc.1", - "react-native-motionify": "^1.0.1", + "react-native-motionify": "^1.1.0", "react-native-popup-menu": "^0.19.0", "react-native-reanimated": "4.5.1", "react-native-safe-area-context": "~5.7.0", @@ -1486,7 +1486,7 @@ "react-native-modal": ["react-native-modal@14.0.0-rc.1", "", { "dependencies": { "react-native-animatable": "1.4.0" }, "peerDependencies": { "react": "*", "react-native": ">=0.70.0" } }, "sha512-v5pvGyx1FlmBzdHyPqBsYQyS2mIJhVmuXyNo5EarIzxicKhuoul6XasXMviGcXboEUT0dTYWs88/VendojPiVw=="], - "react-native-motionify": ["react-native-motionify@1.0.4", "", { "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.60.0", "react-native-reanimated": ">=3.16.0" } }, "sha512-Bq+HYjBiFcBMDZu5DEer9kAJbVSfLvkWSE/JWmn4z9W3qKdNNo3MtfkqweSmI7GqQECK6knf37aXcL8YLIICzw=="], + "react-native-motionify": ["react-native-motionify@1.1.0", "", { "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.60.0", "react-native-reanimated": ">=3.16.0" } }, "sha512-dVVgQf9Fw246BZElMM/1Stz6dAcLgkHBAig2uAMOfgAST+k/vKZDjh5xhlVCIgDOzl1YDsJWp/BKDsecnjp4bw=="], "react-native-popup-menu": ["react-native-popup-menu@0.19.0", "", {}, "sha512-mWC2VCLMmTDPlqgIy39JUy57yZV0//4/dITIrTM0Wu0QtUDlbDmSKl115YjAAY4mj2iceTxo0nOmXrLu8Tp8UQ=="], diff --git a/example/package.json b/example/package.json index c218b3a..4161e35 100644 --- a/example/package.json +++ b/example/package.json @@ -37,7 +37,7 @@ "@reduxjs/toolkit": "^2.9.2", "@shopify/react-native-skia": "2.6.2", "axios": "^1.12.2", - "eas-local-cache": "^1.0.3", + "eas-local-cache": "^1.0.4", "expo": "~57.0.11", "expo-blur": "~57.0.2", "expo-build-properties": "~57.0.9", @@ -66,7 +66,7 @@ "react-native-indicators": "^0.17.0", "react-native-localize": "^3.5.4", "react-native-modal": "^14.0.0-rc.1", - "react-native-motionify": "^1.0.1", + "react-native-motionify": "^1.1.0", "react-native-popup-menu": "^0.19.0", "react-native-reanimated": "4.5.1", "react-native-safe-area-context": "~5.7.0",