├── .editorconfig ├── .gitattributes ├── .gitignore ├── .nvmrc ├── .watchmanconfig ├── .yarn └── releases │ └── yarn-4.0.2.cjs ├── .yarnrc.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── android ├── build.gradle ├── gradle.properties └── src │ ├── main │ ├── AndroidManifest.xml │ ├── AndroidManifestNew.xml │ └── java │ │ └── com │ │ ├── modal │ │ └── ReactModalHostImprovedManager.java │ │ ├── text │ │ ├── ReactTextViewImproved.java │ │ ├── ReactTextViewImprovedManager.java │ │ ├── ReactTextViewImprovedShadowNode.java │ │ └── TextViewPackage.java │ │ └── textinput │ │ ├── ReactEditTextImproved.java │ │ └── ReactTextInputImprovedManager.java │ ├── newarch │ └── TextViewManagerSpec.java │ └── oldarch │ └── TextViewManagerSpec.java ├── babel.config.js ├── example ├── .bundle │ └── config ├── .watchmanconfig ├── Gemfile ├── Gemfile.lock ├── README.md ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── improvedexample │ │ │ │ ├── MainActivity.kt │ │ │ │ └── MainApplication.kt │ │ │ └── res │ │ │ ├── drawable │ │ │ └── rn_edit_text_material.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 │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── .xcode.env │ ├── File.swift │ ├── ImprovedExample-Bridging-Header.h │ ├── ImprovedExample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── ImprovedExample.xcscheme │ ├── ImprovedExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── ImprovedExample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── main.m │ ├── ImprovedExampleTests │ │ ├── ImprovedExampleTests.m │ │ └── Info.plist │ ├── Podfile │ └── Podfile.lock ├── jest.config.js ├── metro.config.js ├── package.json ├── react-native.config.js └── src │ ├── AndroidPatch.js │ ├── RNTesterApp.android.js │ ├── RNTesterApp.ios.js │ ├── RNTesterApp.js.flow │ ├── RNTesterAppShared.js │ ├── assets │ ├── bandaged.png │ ├── bookmark-filled.png │ ├── bookmark-outline-blue.png │ ├── bookmark-outline-gray.png │ ├── bookmark-outline.png │ ├── bottom-nav-apis-icon-active.png │ ├── bottom-nav-apis-icon-inactive.png │ ├── bottom-nav-bookmark-fill.png │ ├── bottom-nav-bookmark-outline.png │ ├── bottom-nav-components-icon-active.png │ ├── bottom-nav-components-icon-inactive.png │ ├── bunny.png │ ├── call.png │ ├── dislike.png │ ├── documentation.png │ ├── empty.png │ ├── fist.png │ ├── flowers.png │ ├── flux@3x.png │ ├── hawk.png │ ├── header-back-button.png │ ├── heart.png │ ├── helloworld.html │ ├── imageMask.png │ ├── like.png │ ├── liking.png │ ├── messagingtest.html │ ├── party.png │ ├── poke.png │ ├── relay@3x.png │ ├── search-icon.png │ ├── slider-left.png │ ├── slider-left@2x.png │ ├── slider-right.png │ ├── slider-right@2x.png │ ├── slider.png │ ├── slider@2x.png │ ├── superlike.png │ ├── trees.jpg │ ├── tumblr_mfqekpMktw1rn90umo1_500.gif │ ├── uie_comment_highlighted@2x.png │ ├── uie_comment_normal@2x.png │ ├── uie_thumb_big.png │ ├── uie_thumb_normal@2x.png │ ├── uie_thumb_selected@2x.png │ └── victory.png │ ├── components │ ├── ListExampleShared.js │ ├── RNTConfigurationBlock.js │ ├── RNTOption.js │ ├── RNTPressableRow.js │ ├── RNTTestDetails.js │ ├── RNTTitleBar.js │ ├── RNTesterBlock.js │ ├── RNTesterBookmarkButton.js │ ├── RNTesterButton.js │ ├── RNTesterComponentTitle.js │ ├── RNTesterDocumentationURL.js │ ├── RNTesterEmptyBookmarksState.js │ ├── RNTesterExampleFilter.js │ ├── RNTesterListFilters.js │ ├── RNTesterModuleContainer.js │ ├── RNTesterModuleList.js │ ├── RNTesterNavbar.js │ ├── RNTesterPage.js │ ├── RNTesterSettingSwitchRow.js │ ├── RNTesterTheme.js │ ├── RNTesterTitle.js │ ├── TextInlineView.js │ ├── TextLegend.js │ ├── UseCase.js │ └── createExamplePage.js │ ├── examples │ ├── Accessibility │ │ ├── AccessibilityAndroidExample.js │ │ ├── AccessibilityExample.js │ │ ├── AccessibilityIOSExample.js │ │ ├── check.png │ │ ├── mixed.png │ │ └── uncheck.png │ ├── ActionSheetIOS │ │ └── ActionSheetIOSExample.js │ ├── ActivityIndicator │ │ └── ActivityIndicatorExample.js │ ├── Alert │ │ └── AlertExample.js │ ├── Animated │ │ ├── AnimatedIndex.js │ │ ├── ColorStylesExample.js │ │ ├── ComposeAnimationsWithEasingExample.js │ │ ├── ComposingExample.js │ │ ├── ContinuousInteractionsExample.js │ │ ├── EasingExample.js │ │ ├── FadeInViewExample.js │ │ ├── LoopingExample.js │ │ ├── MovingBoxExample.js │ │ ├── RotatingImagesExample.js │ │ ├── TransformBounceExample.js │ │ ├── TransformStylesExample.js │ │ └── utils │ │ │ └── ToggleNativeDriver.js │ ├── AnimatedGratuitousApp │ │ ├── AnExApp.js │ │ ├── AnExBobble.js │ │ ├── AnExChained.js │ │ ├── AnExScroll.js │ │ ├── AnExSet.js │ │ ├── AnExSlides.md │ │ └── AnExTilt.js │ ├── AppState │ │ └── AppStateExample.js │ ├── Appearance │ │ └── AppearanceExample.js │ ├── Border │ │ └── BorderExample.js │ ├── BoxShadow │ │ └── BoxShadowExample.js │ ├── Button │ │ └── ButtonExample.js │ ├── Crash │ │ └── CrashExample.js │ ├── DevSettings │ │ └── DevSettingsExample.js │ ├── Dimensions │ │ └── DimensionsExample.js │ ├── DrawerLayoutAndroid │ │ └── DrawerLayoutAndroidExample.js │ ├── Experimental │ │ ├── Compatibility │ │ │ ├── CompatibilityAnimatedPointerMove.js │ │ │ ├── CompatibilityNativeGestureHandling.js │ │ │ └── ManyPointersPropertiesExample.js │ │ ├── PlatformTest │ │ │ ├── README.md │ │ │ ├── RNTesterPlatformTest.js │ │ │ ├── RNTesterPlatformTestEventRecorder.js │ │ │ ├── RNTesterPlatformTestInstructions.js │ │ │ ├── RNTesterPlatformTestMinimizedResultView.js │ │ │ ├── RNTesterPlatformTestResultView.js │ │ │ ├── RNTesterPlatformTestResultsText.js │ │ │ ├── RNTesterPlatformTestTypes.js │ │ │ └── usePlatformTestHarness.js │ │ ├── W3CPointerEventPlatformTests │ │ │ ├── PointerEventAccessibility.js │ │ │ ├── PointerEventAttributesHoverablePointers.js │ │ │ ├── PointerEventAttributesNoHoverPointers.js │ │ │ ├── PointerEventCaptureMouse.js │ │ │ ├── PointerEventClickTouch.js │ │ │ ├── PointerEventClickTouchHierarchy.js │ │ │ ├── PointerEventClickTouchHierarchyPointerEvents.js │ │ │ ├── PointerEventLayoutChangeShouldFirePointerOver.js │ │ │ ├── PointerEventPointerCancelTouch.js │ │ │ ├── PointerEventPointerMove.js │ │ │ ├── PointerEventPointerMoveAcross.js │ │ │ ├── PointerEventPointerMoveBetween.js │ │ │ ├── PointerEventPointerMoveEventOrder.js │ │ │ ├── PointerEventPointerMoveOnChordedMouseButton.js │ │ │ ├── PointerEventPointerOverOut.js │ │ │ ├── PointerEventPrimaryTouchPointer.js │ │ │ └── PointerEventSupport.js │ │ ├── W3CPointerEventsEventfulView.js │ │ └── W3CPointerEventsExample.js │ ├── FlatList │ │ ├── BaseFlatListExample.js │ │ ├── FlatList-basic.js │ │ ├── FlatList-contentInset.js │ │ ├── FlatList-inverted.js │ │ ├── FlatList-multiColumn.js │ │ ├── FlatList-nested.js │ │ ├── FlatList-onEndReached.js │ │ ├── FlatList-onStartReached.js │ │ ├── FlatList-onViewableItemsChanged.js │ │ ├── FlatList-stickyHeaders.js │ │ ├── FlatList-withSeparators.js │ │ └── FlatListExampleIndex.js │ ├── Image │ │ ├── ImageCapInsetsExample.js │ │ └── ImageExample.js │ ├── InputAccessoryView │ │ └── InputAccessoryViewExample.js │ ├── IntersectionObserver │ │ ├── IntersectionObserverBenchmark.js │ │ ├── IntersectionObserverIndex.js │ │ └── IntersectionObserverMDNExample.js │ ├── InvalidProps │ │ └── InvalidPropsExample.js │ ├── JSResponderHandlerExample │ │ └── JSResponderHandlerExample.js │ ├── Keyboard │ │ └── KeyboardExample.js │ ├── KeyboardAvoidingView │ │ └── KeyboardAvoidingViewExample.js │ ├── Layout │ │ ├── LayoutAnimationExample.js │ │ ├── LayoutEventsExample.js │ │ └── LayoutExample.js │ ├── Linking │ │ └── LinkingExample.js │ ├── Modal │ │ ├── ModalExample.js │ │ ├── ModalOnShow.js │ │ └── ModalPresentation.js │ ├── MutationObserver │ │ ├── MutationObserverExample.js │ │ ├── MutationObserverIndex.js │ │ └── VisualCompletionExample │ │ │ ├── VCOverlayExample.js │ │ │ ├── VCTrackerExample.js │ │ │ └── VisualCompletionExample.js │ ├── NativeAnimation │ │ └── NativeAnimationsExample.js │ ├── NewAppScreen │ │ └── NewAppScreenExample.js │ ├── OrientationChange │ │ └── OrientationChangeExample.js │ ├── PanResponder │ │ └── PanResponderExample.js │ ├── Performance │ │ ├── PerformanceApiExample.js │ │ ├── PerformanceComparisonExample.js │ │ ├── components │ │ │ ├── ItemList.js │ │ │ └── itemData.js │ │ └── performanceComparisonExamples │ │ │ ├── EffectInRenderExample.js │ │ │ ├── NotMemoizeExpensiveTaskExample.js │ │ │ ├── ReRenderWithNonPureChildExample.js │ │ │ ├── ReRenderWithObjectPropExample.js │ │ │ ├── RenderOffscreenContentExample.js │ │ │ ├── SetStateInWrongEffectExample.js │ │ │ ├── SetStateInWrongEffectExample2.js │ │ │ └── index.js │ ├── PermissionsAndroid │ │ └── PermissionsExample.js │ ├── PlatformColor │ │ └── PlatformColorExample.js │ ├── PointerEvents │ │ └── PointerEventsExample.js │ ├── Pressable │ │ └── PressableExample.js │ ├── RCTRootView │ │ └── RCTRootViewIOSExample.js │ ├── RTL │ │ └── RTLExample.js │ ├── RefreshControl │ │ └── RefreshControlExample.js │ ├── RootViewSizeFlexibilityExample │ │ └── RootViewSizeFlexibilityExampleApp.js │ ├── SafeAreaView │ │ └── SafeAreaViewExample.js │ ├── ScrollView │ │ ├── ScrollViewAnimatedExample.js │ │ ├── ScrollViewExample.js │ │ ├── ScrollViewIndicatorInsetsIOSExample.js │ │ ├── ScrollViewKeyboardInsetsIOSExample.js │ │ ├── ScrollViewPressableStickyHeaderExample.js │ │ └── ScrollViewSimpleExample.js │ ├── SectionList │ │ ├── SectionList-contentInset.js │ │ ├── SectionList-inverted.js │ │ ├── SectionList-onEndReached.js │ │ ├── SectionList-onViewableItemsChanged.js │ │ ├── SectionList-scrollable.js │ │ ├── SectionList-stickyHeadersEnabled.js │ │ ├── SectionList-withSeparators.js │ │ ├── SectionListBaseExample.js │ │ └── SectionListIndex.js │ ├── SetPropertiesExample │ │ └── SetPropertiesExampleApp.js │ ├── Share │ │ └── ShareExample.js │ ├── Snapshot │ │ ├── SnapshotExample.js │ │ ├── SnapshotViewIOS.android.js │ │ └── SnapshotViewIOS.ios.js │ ├── StatusBar │ │ └── StatusBarExample.js │ ├── SwipeableCardExample │ │ └── SwipeableCardExample.js │ ├── Switch │ │ └── SwitchExample.js │ ├── Text │ │ ├── TextAdjustsDynamicLayoutExample.js │ │ ├── TextExample.android.js │ │ ├── TextExample.ios.js │ │ └── TextExample.js.flow │ ├── TextInput │ │ ├── TextInputExample.android.js │ │ ├── TextInputExample.ios.js │ │ ├── TextInputExample.js.flow │ │ ├── TextInputKeyProp.js │ │ └── TextInputSharedExamples.js │ ├── Timer │ │ └── TimerExample.js │ ├── ToastAndroid │ │ └── ToastAndroidExample.js │ ├── Touchable │ │ └── TouchableExample.js │ ├── Transform │ │ └── TransformExample.js │ ├── TransparentHitTest │ │ └── TransparentHitTestExample.js │ ├── TurboModule │ │ ├── LegacyModuleExample.js │ │ ├── SampleLegacyModuleExample.js │ │ ├── SampleTurboModuleExample.js │ │ ├── TurboModuleExample.js │ │ └── TurboModuleExampleCommon.js │ ├── Vibration │ │ └── VibrationExample.js │ ├── View │ │ └── ViewExample.js │ ├── WebSocket │ │ ├── WebSocketExample.js │ │ ├── http_test_server.js │ │ └── websocket_test_server.js │ └── XHR │ │ ├── XHRExample.js │ │ ├── XHRExampleAbortController.js │ │ ├── XHRExampleBinaryUpload.js │ │ ├── XHRExampleDownload.js │ │ ├── XHRExampleFetch.js │ │ ├── XHRExampleHeaders.js │ │ └── XHRExampleOnTimeOut.js │ ├── types │ └── RNTesterTypes.js │ └── utils │ ├── RNTesterList.android.js │ ├── RNTesterList.ios.js │ ├── RNTesterList.js.flow │ ├── RNTesterNavigationReducer.js │ ├── testerStateUtils.js │ └── useJsStalls.js ├── ios ├── Views │ ├── RCTModalHostViewControllerImproved.h │ ├── RCTModalHostViewControllerImproved.m │ ├── RCTModalHostViewImproved.h │ ├── RCTModalHostViewImproved.m │ ├── RCTModalHostViewImprovedManager.h │ └── RCTModalHostViewImprovedManager.m └── text │ └── textinput │ ├── RCTBaseTextInputShadowViewImproved.h │ ├── RCTBaseTextInputShadowViewImproved.m │ ├── RCTSinglelineTextInputViewImproved.h │ ├── RCTSinglelineTextInputViewImproved.mm │ ├── RCTSinglelineTextInputViewImprovedManager.h │ ├── RCTSinglelineTextInputViewImprovedManager.mm │ ├── Utils.h │ └── Utils.m ├── package.json ├── react-native-improved.podspec ├── src ├── index.ts ├── patch-dev.js ├── patch.js └── patches │ └── 0.73.0 │ └── files │ └── Libraries │ ├── Components │ └── TextInput │ │ ├── AndroidTextInputNativeComponent.js │ │ └── RCTSingelineTextInputNativeComponent.js │ ├── Modal │ └── RCTModalHostViewNativeComponent.js │ ├── Renderer │ └── implementations │ │ ├── ReactNativeRenderer-dev.js │ │ └── ReactNativeRenderer-prod.js │ └── Text │ └── TextNativeComponent.js ├── tsconfig.build.json ├── tsconfig.json ├── turbo.json └── yarn.lock /.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 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | # specific for windows script files 3 | *.bat text eol=crlf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # XDE 6 | .expo/ 7 | 8 | # VSCode 9 | .vscode/ 10 | jsconfig.json 11 | 12 | # Xcode 13 | # 14 | build/ 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | DerivedData 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | project.xcworkspace 31 | 32 | # Android/IJ 33 | # 34 | .classpath 35 | .cxx 36 | .gradle 37 | .idea 38 | .project 39 | .settings 40 | local.properties 41 | android.iml 42 | 43 | # Cocoapods 44 | # 45 | example/ios/Pods 46 | 47 | # xcode 48 | # 49 | example/ios/.xcode.env.local 50 | 51 | # Ruby 52 | example/vendor/ 53 | 54 | # node.js 55 | # 56 | node_modules/ 57 | npm-debug.log 58 | yarn-debug.log 59 | yarn-error.log 60 | 61 | # BUCK 62 | buck-out/ 63 | \.buckd/ 64 | android/app/libs 65 | android/keystores/debug.keystore 66 | 67 | # Yarn 68 | .yarn/* 69 | !.yarn/patches 70 | !.yarn/plugins 71 | !.yarn/releases 72 | !.yarn/sdks 73 | !.yarn/versions 74 | 75 | # Expo 76 | .expo/ 77 | 78 | # Turborepo 79 | .turbo/ 80 | 81 | # generated by bob 82 | lib/ 83 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v18 2 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Fabrizio Bertoglio 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-improved 2 | 3 | 4 | - **Supports ONLY react-native 0.73**. 5 | - Supports only old architechture (new architechture is WIP) 6 | - Support for other versions will be added in the future ([#24](https://github.com/fabOnReact/react-native-improved/issues/24)). 7 | 8 | Provides different react-native iOS, Android and JS API fixes/PRs. 9 | 10 | - Text: PR https://github.com/facebook/react-native/pull/41770 11 | - TextInput: PR https://github.com/facebook/react-native/pull/29070 12 | - Modal: PR https://github.com/facebook/react-native/pull/31498 13 | 14 | ## Set-up 15 | 16 | In package.json 17 | 18 | ```diff 19 | "scripts": { 20 | + "postinstall": "yarn run react-native-patch" 21 | } 22 | ``` 23 | 24 | Then 25 | 26 | ## npm 27 | 28 | ```sh 29 | npm install react-native-improved --save-dev 30 | ``` 31 | 32 | ## yarn v1 33 | 34 | ```sh 35 | yarn add react-native-improved --dev 36 | ``` 37 | 38 | ## yarn v2, v3, v4 39 | 40 | ```sh 41 | yarn add react-native-improved --dev 42 | ``` 43 | 44 | create a file `.yarnrc.yml` (or add to your existing one) with: 45 | 46 | ``` 47 | nodeLinker: node-modules 48 | ``` 49 | 50 | ## Feature Requests 51 | 52 | If you want to ask for additional features in this library, you can open an [issue](https://github.com/fabriziobertoglio1987/react-native-improved/issues). I will follow-up with your request. 53 | 54 | ## Contributing 55 | 56 | See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. 57 | 58 | 59 | ## License 60 | 61 | MIT 62 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifestNew.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/src/main/java/com/text/ReactTextViewImprovedManager.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 androidx.annotation.Nullable; 9 | import com.facebook.react.module.annotations.ReactModule; 10 | import com.facebook.react.uimanager.ThemedReactContext; 11 | import com.facebook.react.views.text.ReactTextShadowNode; 12 | import com.facebook.react.views.text.ReactTextView; 13 | import com.facebook.react.views.text.ReactTextViewManager; 14 | import com.facebook.react.views.text.ReactTextViewManagerCallback; 15 | 16 | @ReactModule(name = ReactTextViewImprovedManager.NAME) 17 | public class ReactTextViewImprovedManager extends ReactTextViewManager { 18 | public static final String NAME = "RCTTextImproved"; 19 | protected @Nullable ReactTextViewManagerCallback mReactTextViewManagerCallback; 20 | 21 | @Override 22 | public String getName() { 23 | return NAME; 24 | } 25 | 26 | public ReactTextViewImprovedManager() { 27 | this(null); 28 | } 29 | 30 | public ReactTextViewImprovedManager( 31 | @Nullable ReactTextViewManagerCallback reactTextViewManagerCallback) { 32 | super(reactTextViewManagerCallback); 33 | mReactTextViewManagerCallback = reactTextViewManagerCallback; 34 | } 35 | 36 | @Override 37 | public ReactTextView createViewInstance(ThemedReactContext context) { 38 | return new ReactTextViewImproved(context); 39 | } 40 | 41 | @Override 42 | public ReactTextShadowNode createShadowNodeInstance() { 43 | return new ReactTextViewImprovedShadowNode(mReactTextViewManagerCallback); 44 | } 45 | 46 | @Override 47 | public Class getShadowNodeClass() { 48 | return ReactTextShadowNode.class; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /android/src/main/java/com/text/TextViewPackage.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 com.facebook.react.ReactPackage; 9 | import com.facebook.react.bridge.NativeModule; 10 | import com.facebook.react.bridge.ReactApplicationContext; 11 | import com.facebook.react.uimanager.ViewManager; 12 | import com.modal.ReactModalHostImprovedManager; 13 | import com.textinput.ReactTextInputImprovedManager; 14 | 15 | import java.util.ArrayList; 16 | import java.util.Collections; 17 | import java.util.List; 18 | 19 | public class TextViewPackage implements ReactPackage { 20 | @Override 21 | public List createViewManagers(ReactApplicationContext reactContext) { 22 | List viewManagers = new ArrayList<>(); 23 | viewManagers.add(new ReactTextViewImprovedManager()); 24 | viewManagers.add(new ReactTextInputImprovedManager()); 25 | viewManagers.add(new ReactModalHostImprovedManager()); 26 | return viewManagers; 27 | } 28 | 29 | @Override 30 | public List createNativeModules(ReactApplicationContext reactContext) { 31 | return Collections.emptyList(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /android/src/main/java/com/textinput/ReactTextInputImprovedManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @see https://github.com/fabriziobertoglio1987/react-native-improved 3 | * 4 | * @author Fabrizio Bertoglio https://github.com/fabriziobertoglio1987 5 | */ 6 | package com.textinput; 7 | 8 | import androidx.annotation.Nullable; 9 | import com.facebook.react.module.annotations.ReactModule; 10 | import com.facebook.react.uimanager.ThemedReactContext; 11 | import com.facebook.react.views.text.ReactTextViewManagerCallback; 12 | import com.facebook.react.views.textinput.ReactEditText; 13 | import com.facebook.react.views.textinput.ReactTextInputManager; 14 | 15 | @ReactModule(name = ReactTextInputImprovedManager.NAME) 16 | public class ReactTextInputImprovedManager extends ReactTextInputManager { 17 | public static final String NAME = "RCTTextInputImproved"; 18 | protected @Nullable ReactTextViewManagerCallback mReactTextViewManagerCallback; 19 | 20 | @Override 21 | public String getName() { 22 | return NAME; 23 | } 24 | 25 | /* 26 | public ReactTextInputImprovedManager() { 27 | this(null); 28 | } 29 | 30 | 31 | public ReactTextInputImprovedManager( 32 | @Nullable ReactTextViewManagerCallback reactTextViewManagerCallback) { 33 | super(reactTextViewManagerCallback); 34 | } 35 | */ 36 | 37 | @Override 38 | public ReactEditText createViewInstance(ThemedReactContext context) { 39 | return new ReactEditTextImproved(context); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /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/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/debug.keystore -------------------------------------------------------------------------------- /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/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /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/android/app/src/main/java/com/improvedexample/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package com.improvedexample 2 | 3 | import android.app.Application 4 | import com.facebook.react.PackageList 5 | import com.facebook.react.ReactApplication 6 | import com.facebook.react.ReactHost 7 | import com.facebook.react.ReactNativeHost 8 | import com.facebook.react.ReactPackage 9 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load 10 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost 11 | import com.facebook.react.defaults.DefaultReactNativeHost 12 | import com.facebook.react.flipper.ReactNativeFlipper 13 | import com.facebook.soloader.SoLoader 14 | import com.improvedexample.BuildConfig 15 | 16 | class MainApplication : Application(), ReactApplication { 17 | 18 | override val reactNativeHost: ReactNativeHost = 19 | object : DefaultReactNativeHost(this) { 20 | override fun getPackages(): List { 21 | // Packages that cannot be autolinked yet can be added manually here, for example: 22 | // packages.add(new MyReactNativePackage()); 23 | return PackageList(this).packages 24 | } 25 | 26 | override fun getJSMainModuleName(): String = "index" 27 | 28 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG 29 | 30 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED 31 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED 32 | } 33 | 34 | override val reactHost: ReactHost 35 | get() = getDefaultReactHost(this.applicationContext, reactNativeHost) 36 | 37 | override fun onCreate() { 38 | super.onCreate() 39 | SoLoader.init(this, false) 40 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 41 | // If you opted-in for the New Architecture, we load the native entry point for this app. 42 | load() 43 | } 44 | ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ImprovedExample 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /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/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Use this property to specify which architecture you want to build. 28 | # You can also override it from the CLI using 29 | # ./gradlew -PreactNativeArchitectures=x86_64 30 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 31 | 32 | # Use this property to enable support to the new architecture. 33 | # This will allow you to use TurboModules and the Fabric render in 34 | # your application. You should enable this flag either if you want 35 | # to write custom TurboModules/Fabric components OR use libraries that 36 | # are providing them. 37 | newArchEnabled=false 38 | 39 | # Use this property to enable or disable the Hermes JS engine. 40 | # If set to false, you will be using JSC instead. 41 | hermesEnabled=true 42 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ImprovedExample", 3 | "displayName": "ImprovedExample" 4 | } 5 | -------------------------------------------------------------------------------- /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/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/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/ios/File.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // TextExample 4 | // 5 | 6 | import Foundation 7 | -------------------------------------------------------------------------------- /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.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 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /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/ios/ImprovedExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/ImprovedExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ImprovedExample 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSAllowsLocalNetworking 32 | 33 | 34 | NSLocationWhenInUseUsageDescription 35 | 36 | UILaunchStoryboardName 37 | LaunchScreen 38 | UIRequiredDeviceCapabilities 39 | 40 | armv7 41 | 42 | UISupportedInterfaceOrientations 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | UIViewControllerBasedStatusBarAppearance 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /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/ios/ImprovedExampleTests/ImprovedExampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ImprovedExampleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ImprovedExampleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /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/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Resolve react_native_pods.rb with node to allow for hoisting 2 | require Pod::Executable.execute_command('node', ['-p', 3 | 'require.resolve( 4 | "react-native/scripts/react_native_pods.rb", 5 | {paths: [process.argv[1]]}, 6 | )', __dir__]).strip 7 | 8 | platform :ios, min_ios_version_supported 9 | prepare_react_native_project! 10 | 11 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. 12 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded 13 | # 14 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` 15 | # ```js 16 | # module.exports = { 17 | # dependencies: { 18 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), 19 | # ``` 20 | flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled 21 | 22 | linkage = ENV['USE_FRAMEWORKS'] 23 | if linkage != nil 24 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 25 | use_frameworks! :linkage => linkage.to_sym 26 | end 27 | 28 | target 'ImprovedExample' do 29 | config = use_native_modules! 30 | 31 | use_react_native!( 32 | :path => config[:reactNativePath], 33 | # Enables Flipper. 34 | # 35 | # Note that if you have use_frameworks! enabled, Flipper will not work and 36 | # you should disable the next line. 37 | :flipper_configuration => flipper_config, 38 | # An absolute path to your application root. 39 | :app_path => "#{Pod::Config.instance.installation_root}/.." 40 | ) 41 | 42 | target 'ImprovedExampleTests' do 43 | inherit! :complete 44 | # Pods for testing 45 | end 46 | 47 | post_install do |installer| 48 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 49 | react_native_post_install( 50 | installer, 51 | config[:reactNativePath], 52 | :mac_catalyst_enabled => false 53 | ) 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /example/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | }; 4 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); 2 | const path = require('path'); 3 | const escape = require('escape-string-regexp'); 4 | const exclusionList = require('metro-config/src/defaults/exclusionList'); 5 | const pak = require('../package.json'); 6 | 7 | const root = path.resolve(__dirname, '..'); 8 | const modules = Object.keys({ ...pak.peerDependencies }); 9 | 10 | /** 11 | * Metro configuration 12 | * https://facebook.github.io/metro/docs/configuration 13 | * 14 | * @type {import('metro-config').MetroConfig} 15 | */ 16 | const config = { 17 | watchFolders: [root], 18 | 19 | // We need to make sure that only one version is loaded for peerDependencies 20 | // So we block them at the root, and alias them to the versions in example's node_modules 21 | resolver: { 22 | blacklistRE: exclusionList( 23 | modules.map( 24 | (m) => 25 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) 26 | ) 27 | ), 28 | 29 | extraNodeModules: modules.reduce((acc, name) => { 30 | acc[name] = path.join(__dirname, 'node_modules', name); 31 | return acc; 32 | }, {}), 33 | }, 34 | 35 | transformer: { 36 | getTransformOptions: async () => ({ 37 | transform: { 38 | experimentalImportSupport: false, 39 | inlineRequires: true, 40 | }, 41 | }), 42 | }, 43 | }; 44 | 45 | module.exports = mergeConfig(getDefaultConfig(__dirname), config); 46 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "improvedexample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a", 10 | "build:ios": "cd ios && xcodebuild -workspace ImprovedExample.xcworkspace -scheme ImprovedExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO" 11 | }, 12 | "dependencies": { 13 | "patch-package": "^8.0.0", 14 | "postinstall-postinstall": "^2.1.0", 15 | "react": "18.2.0", 16 | "react-native": "0.73.0" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.20.0", 20 | "@babel/preset-env": "^7.20.0", 21 | "@babel/runtime": "^7.20.0", 22 | "@react-native/babel-preset": "^0.73.18", 23 | "@react-native/metro-config": "^0.73.2", 24 | "@react-native/typescript-config": "^0.73.1", 25 | "babel-plugin-module-resolver": "^5.0.0", 26 | "pod-install": "^0.1.0" 27 | }, 28 | "engines": { 29 | "node": ">=18" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /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/src/AndroidPatch.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { View, StyleSheet, Text, TextInput } from 'react-native'; 3 | export function AndroidPatch() { 4 | const email = 5 | 'From vincenzoddragon+five@gmail.com From vincenzoddrlxagon+five@gmail.com'; 6 | return ( 7 | <> 8 | 9 | 10 | 15 | {email} 16 | 17 | 18 | 19 | Normal Text 20 | 21 | 22 | ); 23 | } 24 | 25 | const styles = StyleSheet.create({ 26 | container: { 27 | flex: 1, 28 | justifyContent: 'center', 29 | padding: 8, 30 | backgroundColor: 'yellow', 31 | }, 32 | flexBrokenStyle: { 33 | flexDirection: 'row', 34 | }, 35 | parentText: { 36 | backgroundColor: 'red', 37 | }, 38 | input: { borderWidth: 1 }, 39 | }); 40 | -------------------------------------------------------------------------------- /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/src/RNTesterApp.ios.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 type {Node} from 'react'; 12 | 13 | import {AppRegistry} from 'react-native'; 14 | import React from 'react'; 15 | 16 | import SnapshotViewIOS from './examples/Snapshot/SnapshotViewIOS.ios'; 17 | import RNTesterModuleContainer from './components/RNTesterModuleContainer'; 18 | import RNTesterList from './utils/RNTesterList'; 19 | import RNTesterApp from './RNTesterAppShared'; 20 | import type {RNTesterModuleInfo} from './types/RNTesterTypes'; 21 | 22 | AppRegistry.registerComponent('SetPropertiesExampleApp', () => 23 | require('./examples/SetPropertiesExample/SetPropertiesExampleApp'), 24 | ); 25 | AppRegistry.registerComponent('RootViewSizeFlexibilityExampleApp', () => 26 | require('./examples/RootViewSizeFlexibilityExample/RootViewSizeFlexibilityExampleApp'), 27 | ); 28 | AppRegistry.registerComponent('RNTesterApp', () => RNTesterApp); 29 | 30 | // Register suitable examples for snapshot tests 31 | RNTesterList.Components.concat(RNTesterList.APIs).forEach( 32 | (Example: RNTesterModuleInfo) => { 33 | const ExampleModule = Example.module; 34 | if (ExampleModule.displayName) { 35 | class Snapshotter extends React.Component<{...}> { 36 | render(): Node { 37 | return ( 38 | 39 | {}} 42 | /> 43 | 44 | ); 45 | } 46 | } 47 | 48 | AppRegistry.registerComponent( 49 | ExampleModule.displayName, 50 | () => Snapshotter, 51 | ); 52 | } 53 | }, 54 | ); 55 | 56 | module.exports = RNTesterApp; 57 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/src/assets/bandaged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bandaged.png -------------------------------------------------------------------------------- /example/src/assets/bookmark-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bookmark-filled.png -------------------------------------------------------------------------------- /example/src/assets/bookmark-outline-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bookmark-outline-blue.png -------------------------------------------------------------------------------- /example/src/assets/bookmark-outline-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bookmark-outline-gray.png -------------------------------------------------------------------------------- /example/src/assets/bookmark-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bookmark-outline.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-apis-icon-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bottom-nav-apis-icon-active.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-apis-icon-inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bottom-nav-apis-icon-inactive.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-bookmark-fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bottom-nav-bookmark-fill.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-bookmark-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bottom-nav-bookmark-outline.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-components-icon-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bottom-nav-components-icon-active.png -------------------------------------------------------------------------------- /example/src/assets/bottom-nav-components-icon-inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bottom-nav-components-icon-inactive.png -------------------------------------------------------------------------------- /example/src/assets/bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/bunny.png -------------------------------------------------------------------------------- /example/src/assets/call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/call.png -------------------------------------------------------------------------------- /example/src/assets/dislike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/dislike.png -------------------------------------------------------------------------------- /example/src/assets/documentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/documentation.png -------------------------------------------------------------------------------- /example/src/assets/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/empty.png -------------------------------------------------------------------------------- /example/src/assets/fist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/fist.png -------------------------------------------------------------------------------- /example/src/assets/flowers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/flowers.png -------------------------------------------------------------------------------- /example/src/assets/flux@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/flux@3x.png -------------------------------------------------------------------------------- /example/src/assets/hawk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/hawk.png -------------------------------------------------------------------------------- /example/src/assets/header-back-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/header-back-button.png -------------------------------------------------------------------------------- /example/src/assets/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/heart.png -------------------------------------------------------------------------------- /example/src/assets/helloworld.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello Bundled World 5 | 6 | 7 | 21 | 22 | 23 |

Hello Bundled World

24 | 25 | 26 | -------------------------------------------------------------------------------- /example/src/assets/imageMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/imageMask.png -------------------------------------------------------------------------------- /example/src/assets/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/like.png -------------------------------------------------------------------------------- /example/src/assets/liking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/liking.png -------------------------------------------------------------------------------- /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/assets/party.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/party.png -------------------------------------------------------------------------------- /example/src/assets/poke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/poke.png -------------------------------------------------------------------------------- /example/src/assets/relay@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/relay@3x.png -------------------------------------------------------------------------------- /example/src/assets/search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/search-icon.png -------------------------------------------------------------------------------- /example/src/assets/slider-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/slider-left.png -------------------------------------------------------------------------------- /example/src/assets/slider-left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/slider-left@2x.png -------------------------------------------------------------------------------- /example/src/assets/slider-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/slider-right.png -------------------------------------------------------------------------------- /example/src/assets/slider-right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/slider-right@2x.png -------------------------------------------------------------------------------- /example/src/assets/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/slider.png -------------------------------------------------------------------------------- /example/src/assets/slider@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/slider@2x.png -------------------------------------------------------------------------------- /example/src/assets/superlike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/superlike.png -------------------------------------------------------------------------------- /example/src/assets/trees.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/trees.jpg -------------------------------------------------------------------------------- /example/src/assets/tumblr_mfqekpMktw1rn90umo1_500.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/tumblr_mfqekpMktw1rn90umo1_500.gif -------------------------------------------------------------------------------- /example/src/assets/uie_comment_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/uie_comment_highlighted@2x.png -------------------------------------------------------------------------------- /example/src/assets/uie_comment_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/uie_comment_normal@2x.png -------------------------------------------------------------------------------- /example/src/assets/uie_thumb_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/uie_thumb_big.png -------------------------------------------------------------------------------- /example/src/assets/uie_thumb_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/uie_thumb_normal@2x.png -------------------------------------------------------------------------------- /example/src/assets/uie_thumb_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/uie_thumb_selected@2x.png -------------------------------------------------------------------------------- /example/src/assets/victory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/assets/victory.png -------------------------------------------------------------------------------- /example/src/components/RNTConfigurationBlock.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 | import * as React from 'react'; 14 | import {StyleSheet, View} from 'react-native'; 15 | import {RNTesterThemeContext} from './RNTesterTheme'; 16 | 17 | type Props = $ReadOnly<{| 18 | children?: ?React.Node, 19 | testID?: string, 20 | |}>; 21 | 22 | /** 23 | * Container view for a block of configuration options for an example. 24 | */ 25 | export default function RNTConfigurationBlock(props: Props): React.Node { 26 | const theme = React.useContext(RNTesterThemeContext); 27 | return ( 28 | 33 | {props.children} 34 | 35 | ); 36 | } 37 | 38 | const styles = StyleSheet.create({ 39 | container: { 40 | paddingVertical: 6, 41 | paddingHorizontal: 10, 42 | borderBottomWidth: 1, 43 | }, 44 | }); 45 | -------------------------------------------------------------------------------- /example/src/components/RNTesterBlock.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 {RNTesterThemeContext} from './RNTesterTheme'; 13 | import {StyleSheet, Text, View} from 'react-native'; 14 | 15 | type Props = $ReadOnly<{| 16 | children?: React.Node, 17 | title?: ?string, 18 | description?: ?string, 19 | |}>; 20 | 21 | const RNTesterBlock = ({description, title, children}: Props): React.Node => { 22 | const theme = React.useContext(RNTesterThemeContext); 23 | return ( 24 | 32 | 33 | {title && ( 34 | 35 | {title} 36 | 37 | )} 38 | {description && ( 39 | 44 | {description} 45 | 46 | )} 47 | 48 | {children} 49 | 50 | ); 51 | }; 52 | 53 | const styles = StyleSheet.create({ 54 | container: { 55 | borderRadius: 0, 56 | borderWidth: 1, 57 | marginHorizontal: 20, 58 | }, 59 | titleText: { 60 | fontSize: 18, 61 | fontWeight: '300', 62 | }, 63 | titleContainer: { 64 | paddingHorizontal: 10, 65 | paddingVertical: 5, 66 | }, 67 | descriptionText: { 68 | fontSize: 12, 69 | opacity: 0.5, 70 | }, 71 | children: { 72 | marginHorizontal: 20, 73 | marginVertical: 10, 74 | }, 75 | }); 76 | 77 | module.exports = RNTesterBlock; 78 | -------------------------------------------------------------------------------- /example/src/components/RNTesterBookmarkButton.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 | const React = require('react'); 12 | 13 | import {TouchableOpacity, Image, StyleSheet} from 'react-native'; 14 | 15 | type Props = {| 16 | isActive: boolean, 17 | onPress: Function, 18 | size: number, 19 | |}; 20 | 21 | class RNTesterBookmarkButton extends React.Component { 22 | constructor(props: Props) { 23 | super(props); 24 | } 25 | 26 | render(): React.Node { 27 | const {size, onPress, isActive} = this.props; 28 | return ( 29 | 39 | 47 | 48 | ); 49 | } 50 | } 51 | 52 | const styles = StyleSheet.create({ 53 | imageViewStyle: { 54 | backgroundColor: 'blue', 55 | justifyContent: 'center', 56 | alignItems: 'center', 57 | }, 58 | }); 59 | 60 | module.exports = RNTesterBookmarkButton; 61 | -------------------------------------------------------------------------------- /example/src/components/RNTesterButton.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 {Pressable, StyleSheet, Text} = require('react-native'); 16 | 17 | import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes'; 18 | 19 | type Props = $ReadOnly<{| 20 | testID?: string, 21 | textTestID?: string, 22 | children?: React.Node, 23 | onPress?: ?(event: PressEvent) => mixed, 24 | |}>; 25 | 26 | class RNTesterButton extends React.Component { 27 | render(): React.Node { 28 | return ( 29 | [styles.button, pressed && styles.pressed]}> 33 | {this.props.children} 34 | 35 | ); 36 | } 37 | } 38 | 39 | const styles = StyleSheet.create({ 40 | button: { 41 | borderColor: '#696969', 42 | borderRadius: 8, 43 | borderWidth: 1, 44 | padding: 10, 45 | margin: 5, 46 | alignItems: 'center', 47 | justifyContent: 'center', 48 | backgroundColor: '#d3d3d3', 49 | }, 50 | pressed: { 51 | backgroundColor: '#a9a9a9', 52 | }, 53 | }); 54 | 55 | module.exports = RNTesterButton; 56 | -------------------------------------------------------------------------------- /example/src/components/RNTesterComponentTitle.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 | const React = require('react'); 12 | import {RNTesterThemeContext} from './RNTesterTheme'; 13 | const {StyleSheet, Text} = require('react-native'); 14 | 15 | type Props = $ReadOnly<{| 16 | children: string, 17 | |}>; 18 | 19 | class RNTesterComponentTitle extends React.Component { 20 | constructor(props: Props) { 21 | super(props); 22 | } 23 | 24 | render(): React.Node { 25 | return ( 26 | 27 | {theme => ( 28 | 29 | {this.props.children} 30 | 31 | )} 32 | 33 | ); 34 | } 35 | } 36 | 37 | const styles = StyleSheet.create({ 38 | titleText: { 39 | fontSize: 20, 40 | fontWeight: '400', 41 | marginBottom: 5, 42 | }, 43 | }); 44 | 45 | module.exports = RNTesterComponentTitle; 46 | -------------------------------------------------------------------------------- /example/src/components/RNTesterDocumentationURL.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 {Image, StyleSheet, TouchableOpacity} from 'react-native'; 13 | import openURLInBrowser from 'react-native/Libraries/Core/Devtools/openURLInBrowser'; 14 | 15 | type Props = $ReadOnly<{| 16 | documentationURL: string, 17 | |}>; 18 | 19 | const RNTesterDocumentationURL = ({documentationURL}: Props): React.Node => ( 20 | openURLInBrowser(documentationURL)}> 23 | 27 | 28 | ); 29 | 30 | export default RNTesterDocumentationURL; 31 | 32 | const styles = StyleSheet.create({ 33 | container: { 34 | position: 'absolute', 35 | bottom: 0, 36 | right: -15, 37 | }, 38 | icon: { 39 | height: 24, 40 | }, 41 | }); 42 | -------------------------------------------------------------------------------- /example/src/components/RNTesterEmptyBookmarksState.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 {View, Image, Text, StyleSheet} from 'react-native'; 13 | import {RNTesterThemeContext} from './RNTesterTheme'; 14 | 15 | export const RNTesterEmptyBookmarksState = (): React.Node => { 16 | const theme = React.useContext(RNTesterThemeContext); 17 | return ( 18 | 22 | 23 | 24 | 25 | Bookmarks are empty 26 | 27 | 28 | Please tap the{' '} 29 | {' '} 34 | icon to bookmark examples. 35 | 36 | 37 | 38 | 39 | ); 40 | }; 41 | 42 | const styles = StyleSheet.create({ 43 | emptyContainer: { 44 | flex: 1, 45 | paddingHorizontal: 40, 46 | justifyContent: 'center', 47 | alignItems: 'center', 48 | }, 49 | emptyContainerInner: { 50 | marginTop: -150, 51 | }, 52 | emptyImage: { 53 | maxWidth: '100%', 54 | height: 300, 55 | }, 56 | heading: { 57 | fontSize: 24, 58 | textAlign: 'center', 59 | }, 60 | subheading: { 61 | fontSize: 16, 62 | textAlign: 'center', 63 | }, 64 | bookmarkIcon: { 65 | width: 24, 66 | height: 24, 67 | transform: [{translateY: 4}], 68 | }, 69 | }); 70 | -------------------------------------------------------------------------------- /example/src/components/RNTesterListFilters.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 | const {StyleSheet, Text, TouchableOpacity, View} = require('react-native'); 16 | 17 | const filters = ['Basic', 'UI', 'ListView', 'iOS', 'Android']; 18 | 19 | type Props = { 20 | onFilterButtonPress: (filter: string) => mixed, //optional only for testing 21 | ... 22 | }; 23 | 24 | class RNTesterListFilters extends React.Component< 25 | Props, 26 | {|currentFilter: string|}, 27 | > { 28 | constructor(props: Props) { 29 | super(props); 30 | this.state = { 31 | currentFilter: '', 32 | }; 33 | } 34 | 35 | filterPressed: any = filterLabel => { 36 | const newFilter = 37 | this.state.currentFilter === filterLabel ? '' : filterLabel; 38 | this.setState({ 39 | currentFilter: newFilter, 40 | }); 41 | this.props.onFilterButtonPress(newFilter); 42 | }; 43 | 44 | render(): React.Node { 45 | return ( 46 | 47 | {filters.map(filterLabel => { 48 | return ( 49 | this.filterPressed(filterLabel)}> 61 | 68 | {filterLabel} 69 | 70 | 71 | ); 72 | })} 73 | 74 | ); 75 | } 76 | } 77 | 78 | const styles = StyleSheet.create({ 79 | container: { 80 | flexDirection: 'row', 81 | alignItems: 'center', 82 | justifyContent: 'center', 83 | }, 84 | pillStyle: { 85 | padding: 10, 86 | marginHorizontal: 5, 87 | marginVertical: 10, 88 | borderRadius: 20, 89 | borderWidth: 1, 90 | borderColor: '#045cfc', 91 | }, 92 | }); 93 | 94 | module.exports = RNTesterListFilters; 95 | -------------------------------------------------------------------------------- /example/src/components/RNTesterPage.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 | const RNTesterTitle = require('./RNTesterTitle'); 12 | const React = require('react'); 13 | const {SafeAreaView, ScrollView, StyleSheet, View} = require('react-native'); 14 | import {RNTesterThemeContext} from './RNTesterTheme'; 15 | import {useContext} from 'react'; 16 | 17 | type Props = $ReadOnly<{| 18 | children?: React.Node, 19 | title?: ?string, 20 | noScroll?: ?boolean, 21 | |}>; 22 | 23 | function RNTesterPage({children, title, noScroll}: Props): React.Node { 24 | const theme = useContext(RNTesterThemeContext); 25 | 26 | return ( 27 | 32 | {title && } 33 | {noScroll ? ( 34 | {children} 35 | ) : ( 36 | 42 | {children} 43 | 44 | )} 45 | 46 | ); 47 | } 48 | 49 | const styles = StyleSheet.create({ 50 | background: { 51 | flex: 1, 52 | }, 53 | noscrollWrapper: { 54 | flex: 1, 55 | rowGap: 30, 56 | }, 57 | scrollWrapper: { 58 | flex: 1, 59 | }, 60 | scrollWrapperContentContainer: { 61 | paddingVertical: 10, 62 | rowGap: 30, 63 | }, 64 | }); 65 | 66 | module.exports = RNTesterPage; 67 | -------------------------------------------------------------------------------- /example/src/components/RNTesterSettingSwitchRow.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 * as React from 'react'; 12 | import {StyleSheet, Switch, Text, View} from 'react-native'; 13 | 14 | type Props = { 15 | label: string, 16 | onEnable: () => void, 17 | onDisable: () => void, 18 | active: boolean, 19 | }; 20 | 21 | const styles = StyleSheet.create({ 22 | row: { 23 | padding: 10, 24 | flexDirection: 'row', 25 | justifyContent: 'space-between', 26 | }, 27 | }); 28 | 29 | const RNTesterSettingSwitchRow = ({ 30 | label, 31 | onEnable, 32 | onDisable, 33 | active, 34 | }: Props): React.Node => { 35 | return ( 36 | 37 | {label} 38 | 39 | 40 | ); 41 | }; 42 | 43 | export default RNTesterSettingSwitchRow; 44 | -------------------------------------------------------------------------------- /example/src/components/RNTesterTitle.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 | const React = require('react'); 12 | 13 | const {StyleSheet, Text, View} = require('react-native'); 14 | import {RNTesterThemeContext} from './RNTesterTheme'; 15 | 16 | class RNTesterTitle extends React.Component<$FlowFixMeProps> { 17 | render(): React.Node { 18 | return ( 19 | 20 | {theme => { 21 | return ( 22 | 30 | 31 | {this.props.title} 32 | 33 | 34 | ); 35 | }} 36 | 37 | ); 38 | } 39 | } 40 | 41 | const styles = StyleSheet.create({ 42 | container: { 43 | borderRadius: 4, 44 | borderWidth: 0.5, 45 | margin: 10, 46 | marginBottom: 0, 47 | height: 45, 48 | padding: 10, 49 | }, 50 | text: { 51 | fontSize: 19, 52 | fontWeight: '500', 53 | }, 54 | }); 55 | 56 | module.exports = RNTesterTitle; 57 | -------------------------------------------------------------------------------- /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/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/Accessibility/AccessibilityIOSExample.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 {Text, View, Alert} = require('react-native'); 15 | 16 | type Props = $ReadOnly<{||}>; 17 | class AccessibilityIOSExample extends React.Component { 18 | render(): React.Node { 19 | return ( 20 | <> 21 | { 23 | if (event.nativeEvent.actionName === 'activate') { 24 | Alert.alert('Alert', 'onAccessibilityTap success'); 25 | } 26 | }} 27 | accessible={true} 28 | accessibilityActions={[{name: 'activate'}]}> 29 | Accessibility normal tap example 30 | 31 | { 33 | if (event.nativeEvent.actionName === 'magicTap') { 34 | Alert.alert('Alert', 'onMagicTap success'); 35 | } 36 | }} 37 | accessible={true} 38 | accessibilityActions={[{name: 'magicTap'}]}> 39 | Accessibility magic tap example 40 | 41 | { 43 | if (event.nativeEvent.actionName === 'escape') { 44 | Alert.alert('onAccessibilityEscape success'); 45 | } 46 | }} 47 | accessible={true} 48 | accessibilityActions={[{name: 'escape'}]}> 49 | Accessibility escape example 50 | 51 | 52 | 53 | This view's children are hidden from the accessibility tree 54 | 55 | 56 | 57 | This view's language should be `it-IT` 58 | 59 | 60 | ); 61 | } 62 | } 63 | 64 | exports.title = 'AccessibilityIOS'; 65 | exports.description = 'iOS specific Accessibility APIs'; 66 | exports.examples = [ 67 | { 68 | title: 'iOS Accessibility elements', 69 | render(): React.Element { 70 | return ; 71 | }, 72 | }, 73 | ]; 74 | -------------------------------------------------------------------------------- /example/src/examples/Accessibility/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/examples/Accessibility/check.png -------------------------------------------------------------------------------- /example/src/examples/Accessibility/mixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/examples/Accessibility/mixed.png -------------------------------------------------------------------------------- /example/src/examples/Accessibility/uncheck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabOnReact/react-native-improved/8545f4dd1a01a948436c20734a9cda60ef460ad6/example/src/examples/Accessibility/uncheck.png -------------------------------------------------------------------------------- /example/src/examples/ActionSheetIOS/ActionSheetIOSExample.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 | import type {NativeMethods} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; 14 | 15 | const React = require('react'); 16 | const { 17 | StyleSheet, 18 | Text, 19 | View, 20 | Alert, 21 | findNodeHandle, 22 | } = require('react-native'); 23 | 24 | const style = StyleSheet.create({ 25 | button: { 26 | marginBottom: 10, 27 | fontWeight: '500', 28 | }, 29 | anchorRow: { 30 | flex: 1, 31 | flexDirection: 'row', 32 | justifyContent: 'space-between', 33 | }, 34 | }); 35 | 36 | exports.title = 'ActionSheetIOS'; 37 | exports.category = 'iOS'; 38 | exports.description = "Interface to show iOS' action sheets"; 39 | exports.examples = [ 40 | { 41 | title: 'Show Action Sheet', 42 | render(): React.Element { 43 | return Do nothing; 44 | }, 45 | }, 46 | ]; 47 | -------------------------------------------------------------------------------- /example/src/examples/Animated/AnimatedIndex.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 {RNTesterModule} from '../../types/RNTesterTypes'; 12 | import RotatingImagesExample from './RotatingImagesExample'; 13 | import ContinuousInteractionsExample from './ContinuousInteractionsExample'; 14 | import LoopingExample from './LoopingExample'; 15 | import MovingBoxExample from './MovingBoxExample'; 16 | import EasingExample from './EasingExample'; 17 | import FadeInViewExample from './FadeInViewExample'; 18 | import ComposeAnimationsWithEasingExample from './ComposeAnimationsWithEasingExample'; 19 | import TransformBounceExample from './TransformBounceExample'; 20 | import ComposingExample from './ComposingExample'; 21 | import TransformStylesExample from './TransformStylesExample'; 22 | import ColorStylesExample from './ColorStylesExample'; 23 | 24 | export default ({ 25 | framework: 'React', 26 | title: 'Animated', 27 | category: 'UI', 28 | documentationURL: 'https://reactnative.dev/docs/animated', 29 | description: 30 | 'Library designed to make animations fluid, powerful, and painless to ' + 31 | 'build and maintain.', 32 | showIndividualExamples: true, 33 | examples: [ 34 | TransformStylesExample, 35 | ColorStylesExample, 36 | FadeInViewExample, 37 | ComposingExample, 38 | EasingExample, 39 | ComposeAnimationsWithEasingExample, 40 | RotatingImagesExample, 41 | MovingBoxExample, 42 | TransformBounceExample, 43 | LoopingExample, 44 | ContinuousInteractionsExample, 45 | ], 46 | }: RNTesterModule); 47 | -------------------------------------------------------------------------------- /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/Animated/utils/ToggleNativeDriver.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 {View, Text, StyleSheet, Switch} from 'react-native'; 12 | import * as React from 'react'; 13 | 14 | type ViewStyleProp = $ElementType, 'style'>; 15 | 16 | type Props = { 17 | value: boolean, 18 | onValueChange: $ElementType< 19 | React.ElementConfig, 20 | 'onValueChange', 21 | >, 22 | style?: ?ViewStyleProp, 23 | }; 24 | 25 | export default function ToggleNativeDriver({ 26 | value, 27 | onValueChange, 28 | style, 29 | }: Props): React.Node { 30 | return ( 31 | 32 | Use Native Driver 33 | 38 | 39 | ); 40 | } 41 | 42 | const styles = StyleSheet.create({ 43 | row: { 44 | flexDirection: 'row', 45 | justifyContent: 'space-between', 46 | alignItems: 'center', 47 | }, 48 | }); 49 | -------------------------------------------------------------------------------- /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 |