├── src ├── index.ts ├── patches │ └── 0.73.0 │ │ └── files │ │ └── Libraries │ │ └── Components │ │ └── TextInput │ │ └── RCTSingelineTextInputNativeComponent.js ├── patch.js └── patch-dev.js ├── .nvmrc ├── .watchmanconfig ├── example ├── .watchmanconfig ├── jest.config.js ├── .bundle │ └── config ├── app.json ├── ios │ ├── File.swift │ ├── ImprovedExample │ │ ├── Images.xcassets │ │ │ ├── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── AppDelegate.mm │ │ └── Info.plist │ ├── ImprovedExample-Bridging-Header.h │ ├── ImprovedExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── .xcode.env │ ├── ImprovedExampleTests │ │ ├── Info.plist │ │ └── ImprovedExampleTests.m │ └── Podfile ├── src │ ├── assets │ │ ├── call.png │ │ ├── fist.png │ │ ├── hawk.png │ │ ├── like.png │ │ ├── poke.png │ │ ├── bunny.png │ │ ├── dislike.png │ │ ├── empty.png │ │ ├── flowers.png │ │ ├── flux@3x.png │ │ ├── heart.png │ │ ├── liking.png │ │ ├── party.png │ │ ├── slider.png │ │ ├── trees.jpg │ │ ├── victory.png │ │ ├── bandaged.png │ │ ├── imageMask.png │ │ ├── relay@3x.png │ │ ├── slider@2x.png │ │ ├── superlike.png │ │ ├── search-icon.png │ │ ├── slider-left.png │ │ ├── slider-right.png │ │ ├── documentation.png │ │ ├── slider-left@2x.png │ │ ├── uie_thumb_big.png │ │ ├── bookmark-filled.png │ │ ├── bookmark-outline.png │ │ ├── slider-right@2x.png │ │ ├── header-back-button.png │ │ ├── uie_thumb_normal@2x.png │ │ ├── bookmark-outline-blue.png │ │ ├── bookmark-outline-gray.png │ │ ├── uie_comment_normal@2x.png │ │ ├── uie_thumb_selected@2x.png │ │ ├── bottom-nav-bookmark-fill.png │ │ ├── bottom-nav-apis-icon-active.png │ │ ├── bottom-nav-bookmark-outline.png │ │ ├── uie_comment_highlighted@2x.png │ │ ├── bottom-nav-apis-icon-inactive.png │ │ ├── tumblr_mfqekpMktw1rn90umo1_500.gif │ │ ├── bottom-nav-components-icon-active.png │ │ ├── bottom-nav-components-icon-inactive.png │ │ ├── helloworld.html │ │ └── messagingtest.html │ ├── examples │ │ ├── Accessibility │ │ │ ├── check.png │ │ │ ├── mixed.png │ │ │ ├── uncheck.png │ │ │ └── AccessibilityIOSExample.js │ │ ├── Snapshot │ │ │ ├── SnapshotViewIOS.android.js │ │ │ ├── SnapshotExample.js │ │ │ └── SnapshotViewIOS.ios.js │ │ ├── Text │ │ │ ├── TextExample.js.flow │ │ │ └── TextAdjustsDynamicLayoutExample.js │ │ ├── TextInput │ │ │ ├── TextInputExample.js.flow │ │ │ └── TextInputKeyProp.js │ │ ├── TurboModule │ │ │ ├── TurboModuleExample.js │ │ │ ├── LegacyModuleExample.js │ │ │ └── TurboModuleExampleCommon.js │ │ ├── Animated │ │ │ ├── ContinuousInteractionsExample.js │ │ │ ├── utils │ │ │ │ └── ToggleNativeDriver.js │ │ │ └── AnimatedIndex.js │ │ ├── WebSocket │ │ │ ├── http_test_server.js │ │ │ └── websocket_test_server.js │ │ ├── Modal │ │ │ └── ModalExample.js │ │ ├── Performance │ │ │ ├── performanceComparisonExamples │ │ │ │ ├── index.js │ │ │ │ ├── RenderOffscreenContentExample.js │ │ │ │ ├── NotMemoizeExpensiveTaskExample.js │ │ │ │ ├── ReRenderWithNonPureChildExample.js │ │ │ │ ├── ReRenderWithObjectPropExample.js │ │ │ │ ├── SetStateInWrongEffectExample.js │ │ │ │ └── SetStateInWrongEffectExample2.js │ │ │ └── components │ │ │ │ ├── itemData.js │ │ │ │ └── ItemList.js │ │ ├── SetPropertiesExample │ │ │ └── SetPropertiesExampleApp.js │ │ ├── MutationObserver │ │ │ ├── MutationObserverIndex.js │ │ │ └── VisualCompletionExample │ │ │ │ └── VCOverlayExample.js │ │ ├── IntersectionObserver │ │ │ └── IntersectionObserverIndex.js │ │ ├── Crash │ │ │ └── CrashExample.js │ │ ├── ActionSheetIOS │ │ │ └── ActionSheetIOSExample.js │ │ ├── SectionList │ │ │ ├── SectionListIndex.js │ │ │ ├── SectionList-inverted.js │ │ │ ├── SectionList-onEndReached.js │ │ │ ├── SectionList-stickyHeadersEnabled.js │ │ │ ├── SectionList-withSeparators.js │ │ │ ├── SectionList-contentInset.js │ │ │ └── SectionList-onViewableItemsChanged.js │ │ ├── Experimental │ │ │ ├── PlatformTest │ │ │ │ ├── RNTesterPlatformTestInstructions.js │ │ │ │ ├── RNTesterPlatformTestResultsText.js │ │ │ │ ├── RNTesterPlatformTestTypes.js │ │ │ │ └── RNTesterPlatformTestMinimizedResultView.js │ │ │ ├── Compatibility │ │ │ │ └── CompatibilityNativeGestureHandling.js │ │ │ └── W3CPointerEventPlatformTests │ │ │ │ └── PointerEventPointerMove.js │ │ ├── DevSettings │ │ │ └── DevSettingsExample.js │ │ ├── FlatList │ │ │ ├── FlatList-inverted.js │ │ │ ├── FlatList-onEndReached.js │ │ │ ├── FlatListExampleIndex.js │ │ │ ├── FlatList-onStartReached.js │ │ │ ├── FlatList-stickyHeaders.js │ │ │ ├── FlatList-withSeparators.js │ │ │ └── FlatList-contentInset.js │ │ ├── TransparentHitTest │ │ │ └── TransparentHitTestExample.js │ │ ├── XHR │ │ │ ├── XHRExampleAbortController.js │ │ │ ├── XHRExample.js │ │ │ └── XHRExampleOnTimeOut.js │ │ ├── Dimensions │ │ │ └── DimensionsExample.js │ │ ├── RootViewSizeFlexibilityExample │ │ │ └── RootViewSizeFlexibilityExampleApp.js │ │ ├── OrientationChange │ │ │ └── OrientationChangeExample.js │ │ ├── Image │ │ │ └── ImageCapInsetsExample.js │ │ ├── NewAppScreen │ │ │ └── NewAppScreenExample.js │ │ ├── JSResponderHandlerExample │ │ │ └── JSResponderHandlerExample.js │ │ └── ScrollView │ │ │ └── ScrollViewPressableStickyHeaderExample.js │ ├── RNTesterApp.js.flow │ ├── RNTesterApp.android.js │ ├── utils │ │ └── RNTesterList.js.flow │ ├── components │ │ ├── createExamplePage.js │ │ ├── UseCase.js │ │ ├── RNTesterSettingSwitchRow.js │ │ ├── RNTesterDocumentationURL.js │ │ ├── RNTesterComponentTitle.js │ │ ├── RNTConfigurationBlock.js │ │ ├── RNTesterButton.js │ │ ├── RNTesterTitle.js │ │ ├── RNTesterBookmarkButton.js │ │ ├── RNTesterPage.js │ │ ├── RNTesterEmptyBookmarksState.js │ │ ├── RNTesterBlock.js │ │ ├── RNTesterListFilters.js │ │ └── RNTOption.js │ ├── AndroidPatch.js │ ├── RNTesterApp.ios.js │ └── types │ │ └── RNTesterTypes.js ├── android │ ├── app │ │ ├── debug.keystore │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── drawable │ │ │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── improvedexample │ │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ │ └── MainApplication.kt │ │ │ │ └── AndroidManifest.xml │ │ │ └── debug │ │ │ │ └── AndroidManifest.xml │ │ └── proguard-rules.pro │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ ├── build.gradle │ └── gradle.properties ├── index.js ├── Gemfile ├── react-native.config.js ├── babel.config.js ├── package.json └── metro.config.js ├── .gitattributes ├── tsconfig.build.json ├── babel.config.js ├── android ├── src │ ├── main │ │ ├── AndroidManifestNew.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ ├── text │ │ │ ├── ReactTextViewImproved.java │ │ │ ├── TextViewPackage.java │ │ │ └── ReactTextViewImprovedManager.java │ │ │ ├── modal │ │ │ └── ReactModalHostImprovedManager.java │ │ │ └── textinput │ │ │ └── ReactTextInputImprovedManager.java │ ├── oldarch │ │ └── TextViewManagerSpec.java │ └── newarch │ │ └── TextViewManagerSpec.java └── gradle.properties ├── ios ├── text │ └── textinput │ │ ├── Utils.h │ │ ├── Utils.m │ │ ├── RCTSinglelineTextInputViewImproved.h │ │ ├── RCTSinglelineTextInputViewImprovedManager.h │ │ ├── RCTBaseTextInputShadowViewImproved.h │ │ ├── RCTSinglelineTextInputViewImprovedManager.mm │ │ └── RCTSinglelineTextInputViewImproved.mm └── Views │ ├── RCTModalHostViewImprovedManager.h │ ├── RCTModalHostViewControllerImproved.h │ ├── RCTModalHostViewControllerImproved.m │ └── RCTModalHostViewImproved.h ├── .yarnrc.yml ├── .editorconfig ├── tsconfig.json ├── turbo.json ├── LICENSE ├── .gitignore ├── README.md └── react-native-improved.podspec /src/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v18 2 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /example/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | }; 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | # specific for windows script files 3 | *.bat text eol=crlf -------------------------------------------------------------------------------- /example/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "exclude": ["example"] 4 | } 5 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ImprovedExample", 3 | "displayName": "ImprovedExample" 4 | } 5 | -------------------------------------------------------------------------------- /example/ios/File.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // TextExample 4 | // 5 | 6 | import Foundation 7 | -------------------------------------------------------------------------------- /example/src/assets/call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/call.png -------------------------------------------------------------------------------- /example/src/assets/fist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/fist.png -------------------------------------------------------------------------------- /example/src/assets/hawk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/hawk.png -------------------------------------------------------------------------------- /example/src/assets/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/like.png -------------------------------------------------------------------------------- /example/src/assets/poke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/poke.png -------------------------------------------------------------------------------- /example/src/assets/bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bunny.png -------------------------------------------------------------------------------- /example/src/assets/dislike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/dislike.png -------------------------------------------------------------------------------- /example/src/assets/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/empty.png -------------------------------------------------------------------------------- /example/src/assets/flowers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/flowers.png -------------------------------------------------------------------------------- /example/src/assets/flux@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/flux@3x.png -------------------------------------------------------------------------------- /example/src/assets/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/heart.png -------------------------------------------------------------------------------- /example/src/assets/liking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/liking.png -------------------------------------------------------------------------------- /example/src/assets/party.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/party.png -------------------------------------------------------------------------------- /example/src/assets/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/slider.png -------------------------------------------------------------------------------- /example/src/assets/trees.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/trees.jpg -------------------------------------------------------------------------------- /example/src/assets/victory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/victory.png -------------------------------------------------------------------------------- /android/src/main/AndroidManifestNew.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /example/src/assets/bandaged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bandaged.png -------------------------------------------------------------------------------- /example/src/assets/imageMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/imageMask.png -------------------------------------------------------------------------------- /example/src/assets/relay@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/relay@3x.png -------------------------------------------------------------------------------- /example/src/assets/slider@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/slider@2x.png -------------------------------------------------------------------------------- /example/src/assets/superlike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/superlike.png -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/src/assets/search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/search-icon.png -------------------------------------------------------------------------------- /example/src/assets/slider-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/slider-left.png -------------------------------------------------------------------------------- /example/src/assets/slider-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/slider-right.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ImprovedExample 3 | 4 | -------------------------------------------------------------------------------- /example/src/assets/documentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/documentation.png -------------------------------------------------------------------------------- /example/src/assets/slider-left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/slider-left@2x.png -------------------------------------------------------------------------------- /example/src/assets/uie_thumb_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/uie_thumb_big.png -------------------------------------------------------------------------------- /ios/text/textinput/Utils.h: -------------------------------------------------------------------------------- 1 | #ifndef Utils_h 2 | #define Utils_h 3 | 4 | @interface Utils : NSObject 5 | @end 6 | 7 | #endif /* Utils_h */ 8 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/src/assets/bookmark-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bookmark-filled.png -------------------------------------------------------------------------------- /example/src/assets/bookmark-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bookmark-outline.png -------------------------------------------------------------------------------- /example/src/assets/slider-right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/slider-right@2x.png -------------------------------------------------------------------------------- /example/src/assets/header-back-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/header-back-button.png -------------------------------------------------------------------------------- /example/src/assets/uie_thumb_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/uie_thumb_normal@2x.png -------------------------------------------------------------------------------- /example/src/assets/bookmark-outline-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bookmark-outline-blue.png -------------------------------------------------------------------------------- /example/src/assets/bookmark-outline-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bookmark-outline-gray.png -------------------------------------------------------------------------------- /example/src/assets/uie_comment_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/uie_comment_normal@2x.png -------------------------------------------------------------------------------- /example/src/assets/uie_thumb_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/uie_thumb_selected@2x.png -------------------------------------------------------------------------------- /example/src/examples/Accessibility/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/examples/Accessibility/check.png -------------------------------------------------------------------------------- /example/src/examples/Accessibility/mixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/examples/Accessibility/mixed.png -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-bookmark-fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bottom-nav-bookmark-fill.png -------------------------------------------------------------------------------- /example/src/examples/Accessibility/uncheck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/examples/Accessibility/uncheck.png -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-apis-icon-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bottom-nav-apis-icon-active.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-bookmark-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bottom-nav-bookmark-outline.png -------------------------------------------------------------------------------- /example/src/assets/uie_comment_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/uie_comment_highlighted@2x.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | Text_kotlinVersion=1.7.0 2 | Text_minSdkVersion=21 3 | Text_targetSdkVersion=31 4 | Text_compileSdkVersion=31 5 | Text_ndkversion=21.4.7075529 6 | -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-apis-icon-inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bottom-nav-apis-icon-inactive.png -------------------------------------------------------------------------------- /example/src/assets/tumblr_mfqekpMktw1rn90umo1_500.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/tumblr_mfqekpMktw1rn90umo1_500.gif -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-components-icon-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bottom-nav-components-icon-active.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-components-icon-inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/src/assets/bottom-nav-components-icon-inactive.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | compressionLevel: mixed 2 | 3 | enableGlobalCache: false 4 | 5 | nmHoistingLimits: workspaces 6 | 7 | nodeLinker: node-modules 8 | 9 | yarnPath: .yarn/releases/yarn-4.0.2.cjs 10 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import { name as appName } from './app.json'; 3 | import RNTesterApp from './src/RNTesterAppShared'; 4 | 5 | AppRegistry.registerComponent(appName, () => RNTesterApp); 6 | -------------------------------------------------------------------------------- /example/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby ">= 2.6.10" 5 | 6 | gem 'cocoapods', '~> 1.13' 7 | gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' 8 | -------------------------------------------------------------------------------- /example/react-native.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const pak = require('../package.json'); 3 | 4 | module.exports = { 5 | dependencies: { 6 | [pak.name]: { 7 | root: path.join(__dirname, '..'), 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ImprovedExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/@react-native/gradle-plugin') 5 | -------------------------------------------------------------------------------- /ios/text/textinput/Utils.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Utils.h" 3 | #import 4 | 5 | @implementation Utils 6 | 7 | + (id)alloc { 8 | [NSException raise:@"Cannot be instantiated!" format:@"Static class 'Utils' cannot be instantiated!"]; 9 | return nil; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | indent_style = space 10 | indent_size = 2 11 | 12 | end_of_line = lf 13 | charset = utf-8 14 | trim_trailing_whitespace = true 15 | insert_final_newline = true 16 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /example/src/RNTesterApp.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | import typeof RNTesterApp from './RNTesterAppShared'; 12 | 13 | declare module.exports: RNTesterApp; 14 | -------------------------------------------------------------------------------- /ios/Views/RCTModalHostViewImprovedManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | 7 | #import "RCTModalHostViewManager.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @interface RCTModalHostViewImprovedManager : RCTModalHostViewManager 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /example/src/examples/Snapshot/SnapshotViewIOS.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('react-native/Libraries/Components/UnimplementedViews/UnimplementedView'); 13 | -------------------------------------------------------------------------------- /ios/text/textinput/RCTSinglelineTextInputViewImproved.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | 7 | #import "RCTBaseTextInputView.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @interface RCTSinglelineTextInputViewImproved : RCTBaseTextInputView 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /example/src/examples/Text/TextExample.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | import type {RNTesterModule} from '../../types/RNTesterTypes'; 14 | 15 | declare module.exports: RNTesterModule; 16 | -------------------------------------------------------------------------------- /android/src/oldarch/TextViewManagerSpec.java: -------------------------------------------------------------------------------- 1 | package com.text; 2 | 3 | import android.view.View; 4 | 5 | import androidx.annotation.Nullable; 6 | 7 | import com.facebook.react.bridge.ReactApplicationContext; 8 | import com.facebook.react.uimanager.SimpleViewManager; 9 | 10 | public abstract class TextViewManagerSpec extends SimpleViewManager { 11 | public abstract void setColor(T view, @Nullable String value); 12 | } 13 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const pak = require('../package.json'); 3 | 4 | module.exports = { 5 | presets: ['module:@react-native/babel-preset'], 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | extensions: ['.tsx', '.ts', '.js', '.json'], 11 | alias: { 12 | [pak.name]: path.join(__dirname, '..', pak.source), 13 | }, 14 | }, 15 | ], 16 | ], 17 | }; 18 | -------------------------------------------------------------------------------- /example/src/examples/TextInput/TextInputExample.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | import type {RNTesterModule} from '../../types/RNTesterTypes'; 14 | 15 | declare module.exports: RNTesterModule; 16 | -------------------------------------------------------------------------------- /ios/text/textinput/RCTSinglelineTextInputViewImprovedManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | 7 | #import "RCTBaseTextInputViewManager.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @interface RCTSinglelineTextInputViewImprovedManager : RCTBaseTextInputViewManager 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /ios/Views/RCTModalHostViewControllerImproved.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | 7 | #import 8 | #import "RCTModalHostViewController.h" 9 | #import "RCTModalHostViewImproved.h" 10 | 11 | @interface RCTModalHostViewControllerImproved : RCTModalHostViewController 12 | 13 | @property RCTModalHostViewImproved* modalHostView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/src/RNTesterApp.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | import {AppRegistry} from 'react-native'; 12 | 13 | import RNTesterApp from './RNTesterAppShared'; 14 | 15 | AppRegistry.registerComponent('RNTesterApp', () => RNTesterApp); 16 | 17 | module.exports = RNTesterApp; 18 | -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /example/src/utils/RNTesterList.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | import type {RNTesterModuleInfo} from '../types/RNTesterTypes'; 14 | 15 | declare const APIs: Array; 16 | declare const Components: Array; 17 | declare const Modules: {...}; 18 | 19 | module.exports = {APIs, Components, Modules}; 20 | -------------------------------------------------------------------------------- /android/src/main/java/com/text/ReactTextViewImproved.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | package com.text; 7 | 8 | import android.util.Log; 9 | import com.facebook.react.bridge.ReactContext; 10 | import com.facebook.react.views.text.ReactTextView; 11 | 12 | public class ReactTextViewImproved extends ReactTextView { 13 | 14 | public ReactTextViewImproved(ReactContext context) { 15 | super(context); 16 | Log.w("TESTING", "ReactTextViewImproved"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | buildToolsVersion = "34.0.0" 4 | minSdkVersion = 21 5 | compileSdkVersion = 34 6 | targetSdkVersion = 34 7 | ndkVersion = "25.1.8937393" 8 | kotlinVersion = "1.8.0" 9 | } 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle") 16 | classpath("com.facebook.react:react-native-gradle-plugin") 17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") 18 | } 19 | } 20 | 21 | apply plugin: "com.facebook.react.rootproject" 22 | -------------------------------------------------------------------------------- /example/src/assets/helloworld.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello Bundled World 5 | 6 | 7 | 21 | 22 | 23 |

Hello Bundled World

24 | 25 | 26 | -------------------------------------------------------------------------------- /android/src/main/java/com/modal/ReactModalHostImprovedManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | package com.modal; 7 | 8 | import com.facebook.react.module.annotations.ReactModule; 9 | import com.facebook.react.views.modal.ReactModalHostManager; 10 | 11 | /** View manager for {@link ReactModalHostView} components. */ 12 | @ReactModule(name = ReactModalHostManager.REACT_CLASS) 13 | public class ReactModalHostImprovedManager extends ReactModalHostManager { 14 | 15 | public static final String REACT_CLASS = "RCTModalHostViewImproved"; 16 | 17 | @Override 18 | public String getName() { 19 | return REACT_CLASS; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/src/examples/TurboModule/TurboModuleExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | const React = require('react'); 14 | const SampleTurboModuleExample = require('./SampleTurboModuleExample'); 15 | 16 | exports.displayName = (undefined: ?string); 17 | exports.title = 'TurboModule'; 18 | exports.category = 'Basic'; 19 | exports.description = 'Usage of TurboModule'; 20 | exports.examples = [ 21 | { 22 | title: 'SampleTurboModule', 23 | render: function (): React.Element { 24 | return ; 25 | }, 26 | }, 27 | ]; 28 | -------------------------------------------------------------------------------- /android/src/newarch/TextViewManagerSpec.java: -------------------------------------------------------------------------------- 1 | package com.text; 2 | 3 | import android.view.View; 4 | 5 | import androidx.annotation.Nullable; 6 | 7 | import com.facebook.react.uimanager.SimpleViewManager; 8 | import com.facebook.react.uimanager.ViewManagerDelegate; 9 | import com.facebook.react.viewmanagers.TextViewManagerDelegate; 10 | import com.facebook.react.viewmanagers.TextViewManagerInterface; 11 | 12 | public abstract class TextViewManagerSpec extends SimpleViewManager implements TextViewManagerInterface { 13 | private final ViewManagerDelegate mDelegate; 14 | 15 | public TextViewManagerSpec() { 16 | mDelegate = new TextViewManagerDelegate(this); 17 | } 18 | 19 | @Nullable 20 | @Override 21 | protected ViewManagerDelegate getDelegate() { 22 | return mDelegate; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /example/src/examples/Animated/ContinuousInteractionsExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict-local 8 | * @format 9 | */ 10 | 11 | import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; 12 | import * as React from 'react'; 13 | import {Text} from 'react-native'; 14 | 15 | export default ({ 16 | title: 'Continuous Interactions', 17 | name: 'continuousInteractions', 18 | description: ('Gesture events, chaining, 2D ' + 19 | 'values, interrupting and transitioning ' + 20 | 'animations, etc.': string), 21 | render: (): React.Node => Checkout the Gratuitous Animation App!, 22 | }: RNTesterModuleExample); 23 | -------------------------------------------------------------------------------- /example/src/examples/TurboModule/LegacyModuleExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | const React = require('react'); 14 | const { 15 | default: SampleLegacyModuleExample, 16 | } = require('./SampleLegacyModuleExample'); 17 | 18 | exports.displayName = (undefined: ?string); 19 | exports.title = 'Legacy Native Module'; 20 | exports.category = 'Basic'; 21 | exports.description = 'Usage of legacy Native Module'; 22 | exports.examples = [ 23 | { 24 | title: 'SampleLegacyModule', 25 | render: function (): React.Element { 26 | return ; 27 | }, 28 | }, 29 | ]; 30 | -------------------------------------------------------------------------------- /ios/text/textinput/RCTBaseTextInputShadowViewImproved.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | 7 | #import "RCTBaseTextShadowView.h" 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface RCTBaseTextInputShadowViewImproved : RCTBaseTextInputShadowView 13 | 14 | - (instancetype)initWithBridge:(RCTBridge *)bridge; 15 | 16 | @property (nonatomic, copy, nullable) NSString *text; 17 | @property (nonatomic, copy, nullable) NSString *placeholder; 18 | @property (nonatomic, assign) NSInteger maximumNumberOfLines; 19 | @property (nonatomic, copy, nullable) RCTDirectEventBlock onContentSizeChange; 20 | 21 | - (void)uiManagerWillPerformMounting; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "rootDir": ".", 4 | "paths": { 5 | "react-native-improved": ["./src/index"] 6 | }, 7 | "allowUnreachableCode": true, 8 | "allowUnusedLabels": true, 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "jsx": "react-jsx", 12 | "lib": ["esnext"], 13 | "module": "esnext", 14 | "moduleResolution": "node", 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitUseStrict": false, 18 | "noStrictGenericChecks": false, 19 | "noUncheckedIndexedAccess": false, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "resolveJsonModule": true, 23 | "skipLibCheck": true, 24 | "strict": false, 25 | "target": "esnext", 26 | "verbatimModuleSyntax": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "pipeline": { 4 | "build:android": { 5 | "inputs": [ 6 | "package.json", 7 | "android", 8 | "!android/build", 9 | "src/*.ts", 10 | "src/*.tsx", 11 | "example/package.json", 12 | "example/android", 13 | "!example/android/.gradle", 14 | "!example/android/build", 15 | "!example/android/app/build" 16 | ], 17 | "outputs": [] 18 | }, 19 | "build:ios": { 20 | "inputs": [ 21 | "package.json", 22 | "*.podspec", 23 | "ios", 24 | "src/*.ts", 25 | "src/*.tsx", 26 | "example/package.json", 27 | "example/ios", 28 | "!example/ios/build", 29 | "!example/ios/Pods" 30 | ], 31 | "outputs": [] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /example/ios/ImprovedExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/src/examples/WebSocket/http_test_server.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /** 3 | * Copyright (c) Meta Platforms, Inc. and affiliates. 4 | * 5 | * This source code is licensed under the MIT license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | * @format 10 | */ 11 | 12 | 'use strict'; 13 | 14 | /* eslint-env node */ 15 | 16 | console.log(`\ 17 | Test server for WebSocketExample 18 | 19 | This will set a cookie named "wstest" on the response of any incoming request. 20 | `); 21 | 22 | const connect = require('connect'); 23 | const http = require('http'); 24 | 25 | const app = connect(); 26 | 27 | app.use(function (req, res) { 28 | console.log('received request'); 29 | res.setHeader('Set-Cookie', ['wstest=OK; Path=/']); 30 | res.end('Cookie has been set!\n'); 31 | }); 32 | 33 | http.createServer(app).listen(5556); 34 | -------------------------------------------------------------------------------- /ios/Views/RCTModalHostViewControllerImproved.m: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | 7 | #import "RCTModalHostViewControllerImproved.h" 8 | 9 | #import "RCTLog.h" 10 | #import "RCTModalHostView.h" 11 | 12 | @implementation RCTModalHostViewControllerImproved { 13 | CGRect _lastViewFrame; 14 | UIStatusBarStyle _preferredStatusBarStyle; 15 | BOOL _preferredStatusBarHidden; 16 | } 17 | 18 | - (instancetype)init 19 | { 20 | if (!(self = [super init])) { 21 | return nil; 22 | } 23 | 24 | self.modalInPresentation = YES; 25 | 26 | // _preferredStatusBarStyle = [RCTSharedApplication() statusBarStyle]; 27 | // _preferredStatusBarHidden = [RCTSharedApplication() isStatusBarHidden]; 28 | 29 | return self; 30 | } 31 | 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /example/src/components/createExamplePage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | const React = require('react'); 14 | 15 | import RNTesterModuleContainer from './RNTesterModuleContainer'; 16 | import type {RNTesterModule} from '../types/RNTesterTypes'; 17 | 18 | const createExamplePage = function ( 19 | title: ?string, 20 | exampleModule: RNTesterModule, 21 | ): React.ComponentType { 22 | class ExamplePage extends React.Component<{...}> { 23 | render(): React.Node { 24 | return ; 25 | } 26 | } 27 | 28 | return ExamplePage; 29 | }; 30 | 31 | module.exports = createExamplePage; 32 | -------------------------------------------------------------------------------- /example/src/examples/Modal/ModalExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict-local 8 | * @format 9 | */ 10 | 11 | import ModalPresentation from './ModalPresentation'; 12 | import ModalOnShow from './ModalOnShow'; 13 | import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; 14 | 15 | export const displayName = (undefined: ?string); 16 | export const framework = 'React'; 17 | export const title = 'Modal'; 18 | export const category = 'UI'; 19 | export const documentationURL = 'https://reactnative.dev/docs/modal'; 20 | export const description = 'Component for presenting modal views.'; 21 | export const examples = ([ 22 | ModalPresentation, 23 | ModalOnShow, 24 | ]: Array); 25 | -------------------------------------------------------------------------------- /example/src/examples/Performance/performanceComparisonExamples/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict-local 8 | * @format 9 | * @oncall react_native 10 | */ 11 | 12 | export {default as ReRenderWithNonPureChildExample} from './ReRenderWithNonPureChildExample'; 13 | export {default as ReRenderWithObjectPropExample} from './ReRenderWithObjectPropExample'; 14 | export {default as SetStateInWrongEffectExample} from './SetStateInWrongEffectExample'; 15 | export {default as RenderOffscreenContentExample} from './RenderOffscreenContentExample'; 16 | export {default as NotMemoizeExpensiveTaskExample} from './NotMemoizeExpensiveTaskExample'; 17 | export {default as EffectInRenderExample} from './EffectInRenderExample'; 18 | -------------------------------------------------------------------------------- /ios/text/textinput/RCTSinglelineTextInputViewImprovedManager.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | 7 | #import "RCTSinglelineTextInputViewImprovedManager.h" 8 | #import "RCTSinglelineTextInputViewImproved.h" 9 | 10 | #import 11 | #import 12 | 13 | @implementation RCTSinglelineTextInputViewImprovedManager 14 | 15 | RCT_EXPORT_MODULE() 16 | 17 | - (RCTShadowView *)shadowView 18 | { 19 | RCTBaseTextInputShadowView *shadowView = (RCTBaseTextInputShadowView *)[super shadowView]; 20 | 21 | shadowView.maximumNumberOfLines = 1; 22 | 23 | return shadowView; 24 | } 25 | 26 | - (UIView *)view 27 | { 28 | return [[RCTSinglelineTextInputViewImproved alloc] initWithBridge:self.bridge]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /example/src/examples/SetPropertiesExample/SetPropertiesExampleApp.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow strict-local 9 | */ 10 | 11 | 'use strict'; 12 | 13 | const React = require('react'); 14 | 15 | const {Text, View} = require('react-native'); 16 | 17 | class SetPropertiesExampleApp extends React.Component<$FlowFixMeProps> { 18 | render(): React.Node { 19 | const wrapperStyle = { 20 | backgroundColor: this.props.color, 21 | flex: 1, 22 | alignItems: 'center', 23 | justifyContent: 'center', 24 | }; 25 | 26 | return ( 27 | 28 | Embedded React Native view 29 | 30 | ); 31 | } 32 | } 33 | 34 | module.exports = SetPropertiesExampleApp; 35 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | 5 | @implementation AppDelegate 6 | 7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 8 | { 9 | self.moduleName = @"ImprovedExample"; 10 | // You can add your custom initial props in the dictionary below. 11 | // They will be passed down to the ViewController used by React Native. 12 | self.initialProps = @{}; 13 | 14 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 15 | } 16 | 17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 18 | { 19 | return [self getBundleURL]; 20 | } 21 | 22 | - (NSURL *)getBundleURL 23 | { 24 | #if DEBUG 25 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 26 | #else 27 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 28 | #endif 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/improvedexample/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.improvedexample 2 | 3 | import com.facebook.react.ReactActivity 4 | import com.facebook.react.ReactActivityDelegate 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate 7 | 8 | class MainActivity : ReactActivity() { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | override fun getMainComponentName(): String = "ImprovedExample" 15 | 16 | /** 17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 19 | */ 20 | override fun createReactActivityDelegate(): ReactActivityDelegate = 21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) 22 | } 23 | -------------------------------------------------------------------------------- /example/src/examples/MutationObserver/MutationObserverIndex.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict-local 8 | * @format 9 | */ 10 | 11 | import * as MutationObserverExample from './MutationObserverExample'; 12 | import * as VisualCompletionExample from './VisualCompletionExample/VisualCompletionExample'; 13 | 14 | export const framework = 'React'; 15 | export const title = 'MutationObserver'; 16 | export const category = 'UI'; 17 | export const documentationURL = 18 | 'https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver'; 19 | export const description = 'API to detect mutations in React Native nodes.'; 20 | export const showIndividualExamples = true; 21 | export const examples = [MutationObserverExample]; 22 | 23 | if (typeof IntersectionObserver !== 'undefined') { 24 | examples.push(VisualCompletionExample); 25 | } 26 | -------------------------------------------------------------------------------- /example/src/examples/IntersectionObserver/IntersectionObserverIndex.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict-local 8 | * @format 9 | */ 10 | 11 | import * as IntersectionObserverMDNExample from './IntersectionObserverMDNExample'; 12 | import * as IntersectionObserverBenchmark from './IntersectionObserverBenchmark'; 13 | 14 | export const framework = 'React'; 15 | export const title = 'IntersectionObserver'; 16 | export const category = 'UI'; 17 | export const documentationURL = 18 | 'https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API'; 19 | export const description = 20 | 'API to detect paint times for elements and changes in their intersections with other elements.'; 21 | export const showIndividualExamples = true; 22 | export const examples = [ 23 | IntersectionObserverMDNExample, 24 | IntersectionObserverBenchmark, 25 | ]; 26 | -------------------------------------------------------------------------------- /example/src/assets/messagingtest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Messaging Test 5 | 6 | 7 | 8 | 9 |

Messages received from React Native: 0

10 |

(No messages)

11 | 14 | 15 | 28 | 29 | -------------------------------------------------------------------------------- /example/src/components/UseCase.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | import * as React from 'react'; 12 | import {StyleSheet, Text, View} from 'react-native'; 13 | 14 | type Props = $ReadOnly<{| 15 | children?: React.Node, 16 | title?: ?string, 17 | note?: ?string, 18 | ios?: ?boolean, 19 | android?: ?boolean, 20 | |}>; 21 | 22 | export default function UseCase(props: Props): React.Node { 23 | const children = React.Children.toArray(props.children).filter( 24 | child => child !== ' ', 25 | ); 26 | return ( 27 | 28 | {props.title} 29 | {props.note} 30 | {children} 31 | 32 | ); 33 | } 34 | 35 | const styles = StyleSheet.create({ 36 | container: { 37 | justifyContent: 'center', 38 | alignItems: 'center', 39 | }, 40 | }); 41 | -------------------------------------------------------------------------------- /example/src/examples/Crash/CrashExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow strict-local 9 | */ 10 | 11 | import type {Node} from 'react'; 12 | import {Button} from 'react-native'; 13 | import React from 'react'; 14 | 15 | exports.displayName = (undefined: ?string); 16 | exports.framework = 'React'; 17 | exports.title = 'Crash'; 18 | exports.category = 'Basic'; 19 | exports.description = 'Crash examples.'; 20 | 21 | exports.examples = [ 22 | { 23 | title: 'JS crash', 24 | render(): Node { 25 | return ( 26 |