From 8dfb722cd9d19944cdcaf65bc0a71f3d51e0b4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Esmer?= Date: Sun, 12 May 2024 18:11:32 +0300 Subject: [PATCH] chore: update package name to rn-swiper-list and dependencies --- README.md | 5 +---- example/package.json | 2 +- example/src/App.tsx | 2 +- package.json | 4 ++-- src/Swiper.tsx | 2 +- src/SwiperCard/index.tsx | 2 +- src/hooks/useSwipeControls.ts | 2 +- tsconfig.json | 2 +- yarn.lock | 42 +++++++++++++++++------------------ 9 files changed, 30 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 4a197cc..5301bb2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ https://github.com/Skipperlla/rn-tinder-swiper/assets/68515357/149b7418-cc2f-489b-9133-e6ba7120b277 - ⚡ Lightning fast and customizable tinder-like swiper for React Native ## Installation ⚙️ @@ -22,8 +21,6 @@ yarn add react-native-reanimated react-native-gesture-handler - [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) - [react-native-gesture-handler](https://docs.swmansion.com/react-native-gesture-handler/docs/installation) -> **_NOTE:_** I will change the name of the repository to rn-tinder-swiper via npm as soon as possible 📌 - ## Overview - [x] Rotation animation @@ -110,7 +107,7 @@ import { } from 'react-native'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { AntDesign } from '@expo/vector-icons'; -import { Swiper, type SwiperCardRefType } from 'rn-tinder-swiper'; +import { Swiper, type SwiperCardRefType } from 'rn-swiper-list'; import { ActionButton } from '../components'; diff --git a/example/package.json b/example/package.json index a471d14..73654a5 100644 --- a/example/package.json +++ b/example/package.json @@ -1,5 +1,5 @@ { - "name": "rn-tinder-swiper-example", + "name": "rn-swiper-list-example", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { diff --git a/example/src/App.tsx b/example/src/App.tsx index 6b4e7cd..8c0214b 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -8,7 +8,7 @@ import { } from 'react-native'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { AntDesign } from '@expo/vector-icons'; -import { Swiper, type SwiperCardRefType } from 'rn-tinder-swiper'; +import { Swiper, type SwiperCardRefType } from 'rn-swiper-list'; import { ActionButton } from '../components'; diff --git a/package.json b/package.json index 3c5ed32..a1fc059 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "rn-tinder-swiper", + "name": "rn-swiper-list", "version": "2.0.0", "description": "⚡ Lightning fast and customizable tinder-like swipe card for React Native", "main": "lib/commonjs/index", @@ -26,7 +26,7 @@ "!**/.*" ], "scripts": { - "example": "yarn workspace rn-tinder-swiper-example", + "example": "yarn workspace rn-swiper-list-example", "test": "jest", "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\"", diff --git a/src/Swiper.tsx b/src/Swiper.tsx index 76cc12a..13af7ea 100644 --- a/src/Swiper.tsx +++ b/src/Swiper.tsx @@ -1,7 +1,7 @@ import React, { useImperativeHandle, type ForwardedRef } from 'react'; import { runOnJS, useAnimatedReaction } from 'react-native-reanimated'; import { Dimensions } from 'react-native'; -import type { SwiperCardRefType, SwiperOptions } from 'rn-tinder-swiper'; +import type { SwiperCardRefType, SwiperOptions } from 'rn-swiper-list'; import useSwipeControls from './hooks/useSwipeControls'; import SwiperCard from './SwiperCard'; diff --git a/src/SwiperCard/index.tsx b/src/SwiperCard/index.tsx index b8e582c..251942e 100644 --- a/src/SwiperCard/index.tsx +++ b/src/SwiperCard/index.tsx @@ -17,7 +17,7 @@ import Animated, { withSpring, withTiming, } from 'react-native-reanimated'; -import type { SwiperCardOptions, SwiperCardRefType } from 'rn-tinder-swiper'; +import type { SwiperCardOptions, SwiperCardRefType } from 'rn-swiper-list'; import OverlayLabel from './OverlayLabel'; diff --git a/src/hooks/useSwipeControls.ts b/src/hooks/useSwipeControls.ts index 905374f..c98e9e1 100644 --- a/src/hooks/useSwipeControls.ts +++ b/src/hooks/useSwipeControls.ts @@ -1,6 +1,6 @@ import { createRef, useCallback, useMemo, type RefObject } from 'react'; import { useSharedValue } from 'react-native-reanimated'; -import type { SwiperCardRefType } from 'rn-tinder-swiper'; +import type { SwiperCardRefType } from 'rn-swiper-list'; const useSwipeControls = (data: T[]) => { const activeIndex = useSharedValue(0); diff --git a/tsconfig.json b/tsconfig.json index 980c0c8..dc86b21 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "rootDir": ".", "paths": { - "rn-tinder-swiper": ["./src/index"] + "rn-swiper-list": ["./src/index"] }, "allowUnreachableCode": false, "allowUnusedLabels": false, diff --git a/yarn.lock b/yarn.lock index 1643b2c..a91d358 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15548,28 +15548,9 @@ __metadata: languageName: node linkType: hard -"rn-tinder-swiper-example@workspace:example": - version: 0.0.0-use.local - resolution: "rn-tinder-swiper-example@workspace:example" - dependencies: - "@babel/core": ^7.20.0 - "@expo/webpack-config": ^18.0.1 - babel-loader: ^8.1.0 - babel-plugin-module-resolver: ^5.0.0 - expo: ~50.0.17 - expo-status-bar: ~1.11.1 - react: 18.2.0 - react-dom: 18.2.0 - react-native: 0.73.6 - react-native-gesture-handler: ~2.14.0 - react-native-reanimated: ~3.6.2 - react-native-web: ~0.19.6 - languageName: unknown - linkType: soft - -"rn-tinder-swiper@workspace:.": +"rn-swiper-list@workspace:.": version: 0.0.0-use.local - resolution: "rn-tinder-swiper@workspace:." + resolution: "rn-swiper-list@workspace:." dependencies: "@commitlint/config-conventional": ^17.0.2 "@evilmartians/lefthook": ^1.5.0 @@ -15599,6 +15580,25 @@ __metadata: languageName: unknown linkType: soft +"rn-tinder-swiper-example@workspace:example": + version: 0.0.0-use.local + resolution: "rn-tinder-swiper-example@workspace:example" + dependencies: + "@babel/core": ^7.20.0 + "@expo/webpack-config": ^18.0.1 + babel-loader: ^8.1.0 + babel-plugin-module-resolver: ^5.0.0 + expo: ~50.0.17 + expo-status-bar: ~1.11.1 + react: 18.2.0 + react-dom: 18.2.0 + react-native: 0.73.6 + react-native-gesture-handler: ~2.14.0 + react-native-reanimated: ~3.6.2 + react-native-web: ~0.19.6 + languageName: unknown + linkType: soft + "run-applescript@npm:^5.0.0": version: 5.0.0 resolution: "run-applescript@npm:5.0.0"