From 76db80abb3133577edb52940989e580ae6b5f3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Billioud?= Date: Mon, 7 Apr 2025 14:11:28 +0200 Subject: [PATCH] Move the project out of react-native-community, as it is [supposed to](https://github.com/react-native-community/discussions-and-proposals/issues/330#issuecomment-772666380) --- LICENSE.md | 2 +- README.md | 22 +++++++++---------- example-web/craco.config.js | 2 +- example-web/src/Examples.tsx | 2 +- example-web/src/Props.tsx | 2 +- example/ios/Podfile.lock | 4 ++-- example/package-lock.json | 6 ++--- example/package.json | 6 ++--- example/src/App.tsx | 2 +- example/src/Examples.tsx | 2 +- example/src/Props.tsx | 2 +- example/windows/example.sln | 2 +- .../example/AutolinkedNativeModules.g.cpp | 4 ++-- .../example/AutolinkedNativeModules.g.targets | 10 +++++---- package/ios/RNCSliderComponentView.mm | 2 +- package/ios/RNCSliderManager.m | 2 +- package/package-lock.json | 4 ++-- package/package.json | 2 +- 18 files changed, 40 insertions(+), 38 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index d1a3b10e..f865134b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 react-native-community +Copyright (c) 2019 callstack Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 188a3558..3c04c04b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@

-

@react-native-community/slider

+

@callstack/slider

- - Latest version released on npmjs + + Latest version released on npmjs Build on GitHub Actions @@ -12,7 +12,7 @@ Supported platforms - License + License

@@ -28,17 +28,17 @@ To install this module `cd` to your project directory and enter the following command: ``` -yarn add @react-native-community/slider +yarn add @callstack/slider ``` or ``` -npm install @react-native-community/slider --save +npm install @callstack/slider --save ``` If using iOS please remember to install cocoapods by running: `npx pod-install` The following code presents the basic usage scenario of this library: ```javascript -import Slider from '@react-native-community/slider'; +import Slider from '@callstack/slider'; =0.69` | | `4.3.0` | `>=0.64` | | `4.x.x` | `>=0.60`; `>=0.62` (on Windows); | | `3.1.x` | `>=0.60` | | `2.x.x` | `>= 0.60` | -| [`1.x.x`](https://github.com/react-native-community/react-native-slider/tree/937f0942f1fffc6ed88b5cf7c88d73b7878f00f0) | `<= 0.59` | +| [`1.x.x`](https://github.com/callstack/react-native-slider/tree/937f0942f1fffc6ed88b5cf7c88d73b7878f00f0) | `<= 0.59` | ## Properties @@ -244,7 +244,7 @@ If you are using React Native version lower than 0.70, you need to setup manual Inside `example/android/app/src/main/jni/Android.mk` add these lines: ```diff -+ include $(NODE_MODULES_DIR)/@react-native-community/slider/android/build/generated/source/codegen/jni/Android.mk ++ include $(NODE_MODULES_DIR)/@callstack/slider/android/build/generated/source/codegen/jni/Android.mk include $(CLEAR_VARS) ``` @@ -285,7 +285,7 @@ MainComponentsRegistry::sharedProviderRegistry() { ## Contributors -This module was extracted from `react-native` core. Please, refer to [contributors graph](https://github.com/react-native-community/react-native-slider/graphs/contributors) for the complete list of contributors. +This module was extracted from `react-native` core. Please, refer to [contributors graph](https://github.com/callstack/react-native-slider/graphs/contributors) for the complete list of contributors. --- diff --git a/example-web/craco.config.js b/example-web/craco.config.js index 90051fbb..b0afdddb 100644 --- a/example-web/craco.config.js +++ b/example-web/craco.config.js @@ -8,7 +8,7 @@ module.exports = { webpack: { alias: { 'react-native$': 'react-native-web', - '@react-native-community/slider': path.resolve(__dirname, LIB_PATH), + '@callstack/slider': path.resolve(__dirname, LIB_PATH), // make sure we don't include multiple versions of react 'react': path.resolve(__dirname, './node_modules/react'), }, diff --git a/example-web/src/Examples.tsx b/example-web/src/Examples.tsx index 69909624..5188bbf9 100644 --- a/example-web/src/Examples.tsx +++ b/example-web/src/Examples.tsx @@ -2,7 +2,7 @@ import React, {useState} from 'react'; // @ts-ignore import {Text, View, StyleSheet, ScrollView} from 'react-native'; // @ts-ignore -import Slider, {SliderProps} from '@react-native-community/slider'; +import Slider, {SliderProps} from '@callstack/slider'; export interface Props { title: string; diff --git a/example-web/src/Props.tsx b/example-web/src/Props.tsx index 04ac35ad..e026f64f 100644 --- a/example-web/src/Props.tsx +++ b/example-web/src/Props.tsx @@ -2,7 +2,7 @@ import React, {useState} from 'react'; // @ts-ignore import {Text, View, StyleSheet} from 'react-native'; // @ts-ignore -import Slider, {SliderProps} from '@react-native-community/slider'; +import Slider, {SliderProps} from '@callstack/slider'; export interface Props { title: string; diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 5ed19e05..2df62876 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1637,7 +1637,7 @@ DEPENDENCIES: - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) - react-native-pager-view (from `../node_modules/react-native-pager-view`) - - "react-native-slider (from `../node_modules/@react-native-community/slider`)" + - "react-native-slider (from `../node_modules/@callstack/slider`)" - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) @@ -1746,7 +1746,7 @@ EXTERNAL SOURCES: react-native-pager-view: :path: "../node_modules/react-native-pager-view" react-native-slider: - :path: "../node_modules/@react-native-community/slider" + :path: "../node_modules/@callstack/slider" React-nativeconfig: :path: "../node_modules/react-native/ReactCommon" React-NativeModulesApple: diff --git a/example/package-lock.json b/example/package-lock.json index 57434bd4..ef243b01 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "hasInstallScript": true, "dependencies": { - "@react-native-community/slider": "file:../package", + "@callstack/slider": "file:../package", "babel-preset-expo": "^9.2.0", "react": "^18.3.1", "react-native": "^0.76.3", @@ -49,7 +49,7 @@ } }, "../package": { - "name": "@react-native-community/slider", + "name": "@callstack/slider", "version": "4.5.6", "license": "MIT", "devDependencies": { @@ -3538,7 +3538,7 @@ "dev": true, "license": "MIT" }, - "node_modules/@react-native-community/slider": { + "node_modules/@callstack/slider": { "resolved": "../package", "link": true }, diff --git a/example/package.json b/example/package.json index 034f3396..f1ec6b4a 100644 --- a/example/package.json +++ b/example/package.json @@ -9,13 +9,13 @@ "start": "react-native start", "test": "jest", "windows": "npx @react-native-community/cli run-windows", - "postinstall": "rimraf ./node_modules/@react-native-community/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@react-native-community/slider && rimraf ./node_modules/@react-native-community/slider/node_modules", - "refresh-package": "rimraf ./node_modules/@react-native-community/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@react-native-community/slider && rimraf ./node_modules/@react-native-community/slider/node_modules", + "postinstall": "rimraf ./node_modules/@callstack/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@callstack/slider && rimraf ./node_modules/@callstack/slider/node_modules", + "refresh-package": "rimraf ./node_modules/@callstack/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@callstack/slider && rimraf ./node_modules/@callstack/slider/node_modules", "clean-android": "rm -rf android/app/build", "clean-ios": "rm -rf ios/build/generated/ios && rm -rf ios/Pods && rm ios/Podfile.lock" }, "dependencies": { - "@react-native-community/slider": "file:../package", + "@callstack/slider": "file:../package", "babel-preset-expo": "^9.2.0", "react": "^18.3.1", "react-native": "^0.76.3", diff --git a/example/src/App.tsx b/example/src/App.tsx index 0ff0fec4..360449e1 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -10,7 +10,7 @@ import { import {examples, Props as ExamplesTabProperties} from './Examples'; import {propsExamples, Props as PropsTabProperties} from './Props'; import PagerView from 'react-native-pager-view'; -import Slider from '@react-native-community/slider'; +import Slider from '@callstack/slider'; const App = () => { const [currentPage, setCurrentPage] = useState(0); diff --git a/example/src/Examples.tsx b/example/src/Examples.tsx index 9f67eea6..d61ee763 100644 --- a/example/src/Examples.tsx +++ b/example/src/Examples.tsx @@ -1,6 +1,6 @@ import React, {FC, useCallback, useState} from 'react'; import {Text, View, StyleSheet, Image} from 'react-native'; -import Slider, {MarkerProps, SliderProps} from '@react-native-community/slider'; +import Slider, {MarkerProps, SliderProps} from '@callstack/slider'; export interface Props { title: string; diff --git a/example/src/Props.tsx b/example/src/Props.tsx index 11749ed6..69c22fa7 100644 --- a/example/src/Props.tsx +++ b/example/src/Props.tsx @@ -1,6 +1,6 @@ import React, {useState} from 'react'; import {Text, View, StyleSheet} from 'react-native'; -import Slider, {SliderProps} from '@react-native-community/slider'; +import Slider, {SliderProps} from '@callstack/slider'; export interface Props { title: string; diff --git a/example/windows/example.sln b/example/windows/example.sln index 02ad0d4a..6199c5a5 100644 --- a/example/windows/example.sln +++ b/example/windows/example.sln @@ -33,7 +33,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\node_modules\reac EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "..\node_modules\react-native-windows\include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SliderWindows", "..\node_modules\@react-native-community\slider\windows\SliderWindows\SliderWindows.vcxproj", "{685A83AE-36BC-4E9D-BDC6-417EBF168463}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SliderWindows", "..\node_modules\@callstack\slider\windows\SliderWindows\SliderWindows.vcxproj", "{685A83AE-36BC-4E9D-BDC6-417EBF168463}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/example/windows/example/AutolinkedNativeModules.g.cpp b/example/windows/example/AutolinkedNativeModules.g.cpp index cefeac35..13536d8e 100644 --- a/example/windows/example/AutolinkedNativeModules.g.cpp +++ b/example/windows/example/AutolinkedNativeModules.g.cpp @@ -3,7 +3,7 @@ #include "pch.h" #include "AutolinkedNativeModules.g.h" -// Includes from @react-native-community/slider +// Includes from @callstack/slider #include namespace winrt::Microsoft::ReactNative @@ -11,7 +11,7 @@ namespace winrt::Microsoft::ReactNative void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector const& packageProviders) { - // IReactPackageProviders from @react-native-community/slider + // IReactPackageProviders from @callstack/slider packageProviders.Append(winrt::SliderWindows::ReactPackageProvider()); } diff --git a/example/windows/example/AutolinkedNativeModules.g.targets b/example/windows/example/AutolinkedNativeModules.g.targets index ef4e058e..5d5039b2 100644 --- a/example/windows/example/AutolinkedNativeModules.g.targets +++ b/example/windows/example/AutolinkedNativeModules.g.targets @@ -1,10 +1,12 @@ - + - - + + {685a83ae-36bc-4e9d-bdc6-417ebf168463} - + \ No newline at end of file diff --git a/package/ios/RNCSliderComponentView.mm b/package/ios/RNCSliderComponentView.mm index 14b2b796..1543cd31 100644 --- a/package/ios/RNCSliderComponentView.mm +++ b/package/ios/RNCSliderComponentView.mm @@ -99,7 +99,7 @@ - (void)tapHandler:(UITapGestureRecognizer *)gesture { std::dynamic_pointer_cast(_eventEmitter) ->onRNCSliderSlidingStart(RNCSliderEventEmitter::OnRNCSliderSlidingStart{.value = static_cast(slider.lastValue)}); - // Trigger onValueChange to address https://github.com/react-native-community/react-native-slider/issues/212 + // Trigger onValueChange to address https://github.com/callstack/react-native-slider/issues/212 std::dynamic_pointer_cast(_eventEmitter) ->onRNCSliderValueChange(RNCSliderEventEmitter::OnRNCSliderValueChange{.value = static_cast(slider.value)}); diff --git a/package/ios/RNCSliderManager.m b/package/ios/RNCSliderManager.m index 9756769a..0b0e40b1 100644 --- a/package/ios/RNCSliderManager.m +++ b/package/ios/RNCSliderManager.m @@ -82,7 +82,7 @@ - (void)tapHandler:(UITapGestureRecognizer *)gesture { }); } - // Trigger onValueChange to address https://github.com/react-native-community/react-native-slider/issues/212 + // Trigger onValueChange to address https://github.com/callstack/react-native-slider/issues/212 if (slider.onRNCSliderValueChange) { slider.onRNCSliderValueChange(@{ @"value": @(slider.value), diff --git a/package/package-lock.json b/package/package-lock.json index 2fd06a72..c746a6c5 100644 --- a/package/package-lock.json +++ b/package/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@react-native-community/slider", + "name": "@callstack/slider", "version": "4.5.6", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@react-native-community/slider", + "name": "@callstack/slider", "version": "4.5.6", "license": "MIT", "devDependencies": { diff --git a/package/package.json b/package/package.json index 23f588db..441ddbb4 100644 --- a/package/package.json +++ b/package/package.json @@ -1,5 +1,5 @@ { - "name": "@react-native-community/slider", + "name": "@callstack/slider", "version": "4.5.6", "license": "MIT", "author": "react-native-community",