react-native-windows 0.0.0 → 0.0.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +42 -17
- package/Chakra/Chakra.vcxitems +0 -5
- package/Chakra/Chakra.vcxitems.filters +2 -17
- package/Chakra/ChakraHelpers.cpp +2 -268
- package/Chakra/ChakraInstanceArgs.h +0 -29
- package/Chakra/ChakraPlatform.cpp +1 -1
- package/Chakra/ChakraPlatform.h +0 -4
- package/Chakra/ChakraTracing.cpp +0 -33
- package/Chakra/ChakraUtils.cpp +10 -14
- package/Chakra/ChakraUtils.h +2 -2
- package/Chakra/ChakraValue.cpp +6 -3
- package/Chakra/ChakraValue.h +2 -6
- package/Chakra/Utf8DebugExtensions.cpp +0 -5
- package/Chakra/Utf8DebugExtensions.h +0 -6
- package/Common/Common.vcxproj +7 -10
- package/Common/Common.vcxproj.filters +4 -1
- package/Common/Utilities.cpp +59 -0
- package/Common/packages.lock.json +26 -0
- package/Common/utilities.h +11 -0
- package/Directory.Build.props +53 -28
- package/Directory.Build.targets +13 -71
- package/Folly/.clang-format +2 -0
- package/Folly/Folly.vcxproj +75 -33
- package/Folly/Folly.vcxproj.filters +24 -5
- package/Folly/TEMP_UntilFollyUpdate/dynamic-inl.h +1439 -0
- package/Folly/TEMP_UntilFollyUpdate/lang/SafeAssert.h +195 -0
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +338 -0
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +182 -0
- package/Folly/TEMP_UntilFollyUpdate/portability/Unistd.cpp +33 -0
- package/Folly/cgmanifest.json +15 -0
- package/Folly/packages.lock.json +23 -0
- package/Folly/pch.cpp +4 -0
- package/Folly/pch.h +18 -0
- package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +86 -0
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +36 -9
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +5 -43
- package/Libraries/Alert/Alert.d.ts +91 -0
- package/Libraries/Alert/Alert.js +28 -10
- package/Libraries/Alert/Alert.windows.js +68 -21
- package/Libraries/Alert/NativeAlertManager.js +5 -26
- package/Libraries/Alert/RCTAlertManager.android.js +2 -4
- package/Libraries/Alert/RCTAlertManager.ios.js +2 -3
- package/Libraries/Animated/Animated.d.ts +626 -0
- package/Libraries/Animated/Animated.js +14 -14
- package/Libraries/Animated/AnimatedEvent.js +53 -30
- package/Libraries/Animated/AnimatedImplementation.js +152 -111
- package/Libraries/Animated/AnimatedMock.js +79 -40
- package/Libraries/Animated/AnimatedPlatformConfig.js +13 -0
- package/Libraries/Animated/AnimatedWeb.js +9 -6
- package/Libraries/Animated/Easing.d.ts +37 -0
- package/Libraries/Animated/Easing.js +40 -42
- package/Libraries/Animated/NativeAnimatedHelper.js +352 -146
- package/Libraries/Animated/NativeAnimatedModule.js +5 -62
- package/Libraries/Animated/NativeAnimatedTurboModule.js +5 -64
- package/Libraries/Animated/SpringConfig.js +13 -18
- package/Libraries/Animated/animations/Animation.js +55 -15
- package/Libraries/Animated/animations/DecayAnimation.js +22 -9
- package/Libraries/Animated/animations/SpringAnimation.js +37 -18
- package/Libraries/Animated/animations/TimingAnimation.js +35 -20
- package/Libraries/Animated/bezier.js +23 -12
- package/Libraries/Animated/components/AnimatedFlatList.js +5 -17
- package/Libraries/Animated/components/AnimatedImage.js +5 -8
- package/Libraries/Animated/components/AnimatedScrollView.js +120 -16
- package/Libraries/Animated/components/AnimatedSectionList.js +5 -17
- package/Libraries/Animated/components/AnimatedText.js +5 -8
- package/Libraries/Animated/components/AnimatedView.js +5 -8
- package/Libraries/Animated/createAnimatedComponent.js +46 -265
- package/Libraries/Animated/nodes/AnimatedAddition.js +15 -14
- package/Libraries/Animated/nodes/AnimatedColor.js +320 -0
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +13 -12
- package/Libraries/Animated/nodes/AnimatedDivision.js +15 -14
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +200 -158
- package/Libraries/Animated/nodes/AnimatedModulo.js +13 -12
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +15 -15
- package/Libraries/Animated/nodes/AnimatedNode.js +38 -25
- package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
- package/Libraries/Animated/nodes/AnimatedProps.js +51 -41
- package/Libraries/Animated/nodes/AnimatedStyle.js +57 -54
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +15 -14
- package/Libraries/Animated/nodes/AnimatedTracking.js +16 -18
- package/Libraries/Animated/nodes/AnimatedTransform.js +45 -36
- package/Libraries/Animated/nodes/AnimatedValue.js +66 -34
- package/Libraries/Animated/nodes/AnimatedValueXY.js +48 -38
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +12 -11
- package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
- package/Libraries/Animated/useAnimatedProps.js +220 -0
- package/Libraries/Animated/useAnimatedValue.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValue.js +25 -0
- package/Libraries/AppState/AppState.d.ts +58 -0
- package/Libraries/AppState/AppState.js +91 -142
- package/Libraries/AppState/NativeAppState.js +5 -22
- package/Libraries/AppTheme/AppTheme.js +90 -90
- package/Libraries/AppTheme/AppThemeTypes.d.ts +44 -23
- package/Libraries/AppTheme/NativeAppTheme.js +11 -0
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +77 -54
- package/Libraries/BatchedBridge/NativeModules.d.ts +25 -0
- package/Libraries/BatchedBridge/NativeModules.js +11 -6
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +1 -1
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +3 -3
- package/Libraries/Blob/Blob.js +13 -2
- package/Libraries/Blob/BlobManager.js +7 -10
- package/Libraries/Blob/BlobRegistry.js +15 -10
- package/Libraries/Blob/BlobTypes.js +1 -1
- package/Libraries/Blob/File.js +3 -4
- package/Libraries/Blob/FileReader.js +35 -15
- package/Libraries/Blob/NativeBlobModule.js +5 -52
- package/Libraries/Blob/NativeFileReaderModule.js +5 -15
- package/Libraries/Blob/URL.js +60 -47
- package/Libraries/Blob/__mocks__/BlobModule.js +1 -1
- package/Libraries/Blob/__mocks__/FileReaderModule.js +1 -1
- package/Libraries/BugReporting/BugReporting.js +3 -3
- package/Libraries/BugReporting/NativeBugReporting.js +5 -12
- package/Libraries/BugReporting/dumpReactTree.js +1 -1
- package/Libraries/BugReporting/getReactData.js +17 -8
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +157 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +421 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +350 -81
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +4 -18
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +5 -51
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js +36 -0
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.ios.js +26 -0
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js +36 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +86 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +18 -50
- package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +4 -47
- package/Libraries/Components/Button.d.ts +42 -0
- package/Libraries/Components/Button.js +152 -78
- package/Libraries/Components/Button.windows.js +273 -69
- package/Libraries/Components/Clipboard/Clipboard.d.ts +28 -0
- package/Libraries/Components/Clipboard/Clipboard.js +2 -4
- package/Libraries/Components/Clipboard/NativeClipboard.js +4 -13
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +4 -116
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +30 -29
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +141 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +12 -0
- package/Libraries/Components/Flyout/Flyout.d.ts +55 -20
- package/Libraries/Components/Flyout/Flyout.js +110 -75
- package/Libraries/Components/Flyout/FlyoutNativeComponent.js +45 -0
- package/Libraries/Components/Glyph/Glyph.d.ts +29 -13
- package/Libraries/Components/Glyph/Glyph.js +43 -56
- package/Libraries/Components/Glyph/GlyphNativeComponent.js +31 -0
- package/Libraries/Components/Keyboard/Keyboard.d.ts +109 -0
- package/Libraries/Components/Keyboard/Keyboard.js +78 -66
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +46 -0
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +81 -37
- package/Libraries/Components/Keyboard/KeyboardExt.d.ts +8 -6
- package/Libraries/Components/Keyboard/KeyboardExt.js +27 -60
- package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
- package/Libraries/Components/Keyboard/KeyboardExtProps.d.ts +17 -43
- package/Libraries/Components/Keyboard/KeyboardExtProps.js +7 -24
- package/Libraries/Components/Keyboard/KeyboardExtProps.js.map +1 -1
- package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +4 -12
- package/Libraries/Components/Popup/Popup.d.ts +41 -20
- package/Libraries/Components/Popup/Popup.js +86 -76
- package/Libraries/Components/Popup/PopupNativeComponent.js +49 -0
- package/Libraries/Components/Pressable/Pressable.d.ts +167 -0
- package/Libraries/Components/Pressable/Pressable.js +128 -18
- package/Libraries/Components/Pressable/Pressable.windows.js +169 -44
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +27 -22
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +9 -10
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +83 -0
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +20 -0
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +5 -27
- package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +4 -77
- package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +4 -56
- package/Libraries/Components/RefreshControl/RefreshControl.d.ts +87 -0
- package/Libraries/Components/RefreshControl/RefreshControl.js +15 -37
- package/Libraries/Components/RefreshControl/RefreshControl.windows.js +15 -37
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +6 -9
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +4 -20
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +24 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +12 -39
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +5 -32
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +34 -21
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +13 -20
- package/Libraries/Components/ScrollView/ScrollView.d.ts +910 -0
- package/Libraries/Components/ScrollView/ScrollView.js +1062 -410
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +4 -4
- package/Libraries/Components/ScrollView/ScrollViewContext.js +1 -3
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +164 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +179 -0
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +11 -16
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +237 -247
- package/Libraries/Components/ScrollView/processDecelerationRate.js +1 -3
- package/Libraries/Components/Sound/NativeSoundManager.js +4 -14
- package/Libraries/Components/Sound/SoundManager.js +2 -3
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +4 -60
- package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +4 -81
- package/Libraries/Components/StatusBar/StatusBar.d.ts +138 -0
- package/Libraries/Components/StatusBar/StatusBar.js +33 -33
- package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +5 -56
- package/Libraries/Components/Switch/Switch.d.ts +115 -0
- package/Libraries/Components/Switch/Switch.js +119 -127
- package/Libraries/Components/Switch/Switch.windows.js +257 -0
- package/Libraries/Components/Switch/SwitchNativeComponent.js +5 -50
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +241 -36
- package/Libraries/Components/TextInput/InputAccessoryView.d.ts +34 -0
- package/Libraries/Components/TextInput/InputAccessoryView.js +20 -24
- package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +5 -20
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +24 -9
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +16 -16
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +169 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +973 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +1092 -0
- package/Libraries/Components/TextInput/TextInput.js +935 -372
- package/Libraries/Components/TextInput/TextInput.windows.js +1096 -378
- package/Libraries/Components/TextInput/TextInputNativeCommands.js +2 -4
- package/Libraries/Components/TextInput/TextInputState.js +33 -10
- package/Libraries/Components/TextInput/TextInputState.windows.js +42 -16
- package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +772 -9
- package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +4 -30
- package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +4 -5
- package/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +47 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +45 -0
- package/Libraries/Components/Touchable/BoundingDimensions.js +4 -5
- package/Libraries/Components/Touchable/PooledClass.js +26 -15
- package/Libraries/Components/Touchable/Position.js +3 -4
- package/Libraries/Components/Touchable/Touchable.d.ts +90 -0
- package/Libraries/Components/Touchable/Touchable.js +99 -90
- package/Libraries/Components/Touchable/Touchable.windows.js +974 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +52 -18
- package/Libraries/Components/Touchable/TouchableHighlight.d.ts +68 -0
- package/Libraries/Components/Touchable/TouchableHighlight.js +60 -22
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +59 -17
- package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +114 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +85 -37
- package/Libraries/Components/Touchable/TouchableOpacity.d.ts +109 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +89 -26
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +88 -21
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +143 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +87 -20
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +87 -20
- package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +4 -19
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +3 -4
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +167 -69
- package/Libraries/Components/View/ReactNativeViewAttributes.js +4 -3
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +61 -0
- package/Libraries/Components/View/View.d.ts +29 -0
- package/Libraries/Components/View/View.js +116 -13
- package/Libraries/Components/View/View.windows.js +250 -30
- package/Libraries/Components/View/ViewAccessibility.d.ts +415 -0
- package/Libraries/Components/View/ViewAccessibility.js +84 -3
- package/Libraries/Components/View/ViewAccessibility.windows.js +86 -3
- package/Libraries/Components/View/ViewNativeComponent.js +96 -57
- package/Libraries/Components/View/ViewPropTypes.d.ts +363 -0
- package/Libraries/Components/View/ViewPropTypes.js +200 -59
- package/Libraries/Components/View/ViewPropTypes.windows.js +221 -61
- package/Libraries/Core/Devtools/getDevServer.js +1 -3
- package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
- package/Libraries/Core/Devtools/openFileInEditor.js +5 -1
- package/Libraries/Core/Devtools/openURLInBrowser.js +2 -1
- package/Libraries/Core/Devtools/parseErrorStack.js +8 -17
- package/Libraries/Core/Devtools/parseHermesStack.js +70 -43
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +5 -4
- package/Libraries/Core/ExceptionsManager.js +90 -98
- package/Libraries/Core/ExtendedError.js +33 -0
- package/Libraries/Core/InitializeCore.js +5 -4
- package/Libraries/Core/NativeExceptionsManager.js +4 -98
- package/Libraries/Core/RawEventEmitter.js +39 -0
- package/Libraries/Core/ReactFiberErrorDialog.js +45 -35
- package/Libraries/Core/ReactNativeVersion.js +12 -6
- package/Libraries/Core/ReactNativeVersionCheck.js +10 -7
- package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +4 -20
- package/Libraries/Core/Timers/JSTimers.js +82 -77
- package/Libraries/Core/Timers/NativeTiming.js +4 -18
- package/Libraries/Core/Timers/immediateShim.js +68 -0
- package/Libraries/Core/Timers/queueMicrotask.js +41 -0
- package/Libraries/Core/__mocks__/ErrorUtils.js +1 -1
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
- package/Libraries/Core/checkNativeVersion.js +1 -1
- package/Libraries/Core/polyfillPromise.js +2 -2
- package/Libraries/Core/registerCallableModule.js +42 -0
- package/Libraries/Core/setUpAlert.js +2 -2
- package/Libraries/Core/setUpBatchedBridge.js +21 -9
- package/Libraries/Core/setUpDeveloperTools.js +57 -60
- package/Libraries/Core/setUpErrorHandling.js +2 -2
- package/Libraries/Core/setUpGlobals.js +6 -5
- package/Libraries/Core/setUpIntersectionObserver.js +16 -0
- package/Libraries/Core/setUpMutationObserver.js +16 -0
- package/Libraries/Core/setUpNavigator.js +7 -6
- package/Libraries/Core/setUpPerformance.js +18 -15
- package/Libraries/Core/setUpPerformanceObserver.js +18 -0
- package/Libraries/Core/setUpReactDevTools.js +28 -5
- package/Libraries/Core/setUpReactRefresh.js +4 -2
- package/Libraries/Core/setUpRegeneratorRuntime.js +28 -9
- package/Libraries/Core/setUpSegmentFetcher.js +3 -44
- package/Libraries/Core/setUpTimers.js +77 -8
- package/Libraries/Core/setUpXHR.js +5 -5
- package/Libraries/Debugging/DebuggingOverlay.js +111 -0
- package/Libraries/Debugging/DebuggingOverlayNativeComponent.js +13 -0
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +513 -0
- package/Libraries/Debugging/useSubscribeToDebuggingOverlayRegistry.js +32 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +35 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +20 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +49 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.windows.js +35 -0
- package/Libraries/DevToolsSettings/NativeDevToolsSettingsManager.js +13 -0
- package/Libraries/EventEmitter/NativeEventEmitter.d.ts +63 -0
- package/Libraries/EventEmitter/NativeEventEmitter.js +90 -48
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +29 -0
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +26 -66
- package/Libraries/EventEmitter/RCTEventEmitter.js +6 -2
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +32 -0
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.js +1 -3
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +33 -8
- package/Libraries/Events/CustomEvent.js +32 -0
- package/Libraries/Events/EventPolyfill.js +239 -0
- package/Libraries/HeapCapture/HeapCapture.js +2 -4
- package/Libraries/HeapCapture/NativeJSCHeapCapture.js +4 -11
- package/Libraries/Image/AssetRegistry.js +2 -2
- package/Libraries/Image/AssetSourceResolver.js +20 -32
- package/Libraries/Image/AssetSourceResolver.windows.js +186 -0
- package/Libraries/Image/AssetUtils.js +47 -0
- package/Libraries/Image/Image.android.js +200 -298
- package/Libraries/Image/Image.d.ts +382 -0
- package/Libraries/Image/Image.ios.js +122 -105
- package/Libraries/Image/Image.windows.js +123 -106
- package/Libraries/Image/ImageAnalyticsTagContext.js +3 -6
- package/Libraries/Image/ImageBackground.js +38 -12
- package/Libraries/Image/ImageInjection.js +87 -0
- package/Libraries/Image/ImageProps.js +133 -22
- package/Libraries/Image/ImageResizeMode.d.ts +49 -0
- package/Libraries/Image/ImageResizeMode.js +1 -1
- package/Libraries/Image/ImageSource.d.ts +76 -0
- package/Libraries/Image/ImageSource.js +60 -17
- package/Libraries/Image/ImageSourceUtils.js +80 -0
- package/Libraries/Image/ImageTypes.flow.js +76 -0
- package/Libraries/Image/ImageUtils.js +21 -0
- package/Libraries/Image/ImageViewNativeComponent.js +143 -29
- package/Libraries/Image/NativeImageEditor.js +4 -44
- package/Libraries/Image/NativeImageLoaderAndroid.js +5 -32
- package/Libraries/Image/NativeImageLoaderIOS.js +5 -29
- package/Libraries/Image/NativeImageStoreAndroid.js +4 -18
- package/Libraries/Image/NativeImageStoreIOS.js +4 -25
- package/Libraries/Image/RelativeImageStub.js +2 -2
- package/Libraries/Image/TextInlineImageNativeComponent.js +38 -7
- package/Libraries/Image/assetPaths.js +36 -0
- package/Libraries/Image/nativeImageSource.js +4 -6
- package/Libraries/Image/resolveAssetSource.js +65 -31
- package/Libraries/Image/resolveAssetSource.windows.js +148 -0
- package/Libraries/Inspector/BorderBox.js +2 -2
- package/Libraries/Inspector/BoxInspector.js +4 -5
- package/Libraries/Inspector/ElementBox.js +10 -8
- package/Libraries/Inspector/ElementProperties.js +34 -61
- package/Libraries/Inspector/Inspector.js +131 -275
- package/Libraries/Inspector/InspectorOverlay.js +26 -38
- package/Libraries/Inspector/InspectorPanel.js +15 -27
- package/Libraries/Inspector/NetworkOverlay.js +24 -18
- package/Libraries/Inspector/PerformanceOverlay.js +4 -4
- package/Libraries/Inspector/ReactDevToolsOverlay.js +171 -0
- package/Libraries/Inspector/StyleInspector.js +3 -3
- package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +83 -0
- package/Libraries/Inspector/resolveBoxStyle.js +1 -1
- package/Libraries/Interaction/FrameRateLogger.js +10 -22
- package/Libraries/Interaction/InteractionManager.d.ts +74 -0
- package/Libraries/Interaction/InteractionManager.js +17 -29
- package/Libraries/Interaction/JSEventLoopWatchdog.js +7 -11
- package/Libraries/Interaction/NativeFrameRateLogger.js +5 -16
- package/Libraries/Interaction/PanResponder.d.ts +202 -0
- package/Libraries/Interaction/PanResponder.js +26 -28
- package/Libraries/Interaction/TaskQueue.js +6 -5
- package/Libraries/Interaction/TouchHistoryMath.js +12 -12
- package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
- package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +141 -0
- package/Libraries/IntersectionObserver/IntersectionObserverManager.js +299 -0
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +13 -0
- package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +172 -0
- package/Libraries/JSInspector/InspectorAgent.js +1 -1
- package/Libraries/JSInspector/JSInspector.js +1 -4
- package/Libraries/JSInspector/NetworkAgent.js +5 -10
- package/Libraries/LayoutAnimation/LayoutAnimation.d.ts +84 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +71 -21
- package/Libraries/Linking/Linking.d.ts +61 -0
- package/Libraries/Linking/Linking.js +23 -27
- package/Libraries/Linking/NativeIntentAndroid.js +4 -22
- package/Libraries/Linking/NativeLinkingManager.js +4 -19
- package/Libraries/Lists/FillRateHelper.js +6 -228
- package/Libraries/Lists/FlatList.d.ts +245 -0
- package/Libraries/Lists/FlatList.js +193 -113
- package/Libraries/Lists/FlatList.windows.js +717 -0
- package/Libraries/Lists/SectionList.d.ts +267 -0
- package/Libraries/Lists/SectionList.js +36 -31
- package/Libraries/Lists/SectionListModern.js +249 -0
- package/Libraries/Lists/ViewabilityHelper.js +10 -327
- package/Libraries/Lists/VirtualizeUtils.js +6 -235
- package/Libraries/Lists/VirtualizedList.js +10 -2109
- package/Libraries/Lists/VirtualizedListContext.js +5 -142
- package/Libraries/Lists/VirtualizedSectionList.js +9 -565
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +2 -1
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +8 -8
- package/Libraries/LogBox/Data/LogBoxData.js +37 -34
- package/Libraries/LogBox/Data/LogBoxLog.js +11 -10
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +10 -9
- package/Libraries/LogBox/Data/parseLogBoxLog.js +97 -61
- package/Libraries/LogBox/LogBox.d.ts +28 -0
- package/Libraries/LogBox/LogBox.js +124 -76
- package/Libraries/LogBox/LogBoxInspectorContainer.js +6 -6
- package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -5
- package/Libraries/LogBox/UI/AnsiHighlight.js +17 -8
- package/Libraries/LogBox/UI/LogBoxButton.js +6 -7
- package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
- package/Libraries/LogBox/UI/LogBoxInspector.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +12 -10
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.windows.js +167 -0
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +27 -35
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -9
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +172 -0
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +6 -7
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +8 -9
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.windows.js +193 -0
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +3 -5
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +4 -8
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.windows.js +118 -0
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +19 -11
- package/Libraries/LogBox/UI/LogBoxMessage.js +100 -19
- package/Libraries/LogBox/UI/LogBoxNotification.js +15 -14
- package/Libraries/LogBox/UI/LogBoxStyle.js +1 -3
- package/Libraries/Modal/Modal.d.ts +104 -0
- package/Libraries/Modal/Modal.js +107 -49
- package/Libraries/Modal/ModalInjection.js +15 -0
- package/Libraries/Modal/NativeModalManager.js +4 -13
- package/Libraries/Modal/RCTModalHostViewNativeComponent.js +4 -126
- package/Libraries/MutationObserver/MutationObserver.js +184 -0
- package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
- package/Libraries/MutationObserver/MutationRecord.js +84 -0
- package/Libraries/MutationObserver/NativeMutationObserver.js +13 -0
- package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +339 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +401 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +454 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +157 -0
- package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +30 -0
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +25 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +163 -0
- package/Libraries/NativeComponent/ViewConfig.js +52 -0
- package/Libraries/NativeComponent/ViewConfigIgnore.js +51 -0
- package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +4 -12
- package/Libraries/NativeModules/specs/NativeDevMenu.js +4 -15
- package/Libraries/NativeModules/specs/NativeDevSettings.js +4 -25
- package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +4 -11
- package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +4 -40
- package/Libraries/NativeModules/specs/NativeDialogManagerWindows.js +11 -0
- package/Libraries/NativeModules/specs/NativeLogBox.js +4 -12
- package/Libraries/NativeModules/specs/NativeRedBox.js +5 -13
- package/Libraries/NativeModules/specs/NativeSourceCode.js +3 -27
- package/Libraries/Network/FormData.js +11 -3
- package/Libraries/Network/NativeNetworkingAndroid.js +5 -30
- package/Libraries/Network/NativeNetworkingIOS.js +5 -30
- package/Libraries/Network/RCTNetworking.android.js +15 -9
- package/Libraries/Network/RCTNetworking.ios.js +65 -21
- package/Libraries/Network/RCTNetworking.windows.js +112 -1
- package/Libraries/Network/XHRInterceptor.js +6 -7
- package/Libraries/Network/XMLHttpRequest.js +61 -22
- package/Libraries/Network/convertRequestBody.js +4 -4
- package/Libraries/Network/fetch.js +1 -1
- package/Libraries/NewAppScreen/components/Colors.js +1 -3
- package/Libraries/NewAppScreen/components/DebugInstructions.js +9 -6
- package/Libraries/NewAppScreen/components/DebugInstructions.windows.js +7 -5
- package/Libraries/NewAppScreen/components/Header.js +8 -4
- package/Libraries/NewAppScreen/components/HermesBadge.js +11 -4
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +18 -13
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +5 -2
- package/Libraries/NewAppScreen/components/ReloadInstructions.windows.js +4 -2
- package/Libraries/NewAppScreen/components/logo.png +0 -0
- package/Libraries/NewAppScreen/index.js +2 -4
- package/Libraries/Performance/NativeJSCSamplingProfiler.js +4 -11
- package/Libraries/Performance/SamplingProfiler.js +4 -4
- package/Libraries/Performance/Systrace.d.ts +66 -0
- package/Libraries/Performance/Systrace.js +114 -194
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +5 -52
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +116 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +59 -22
- package/Libraries/Pressability/HoverState.js +5 -3
- package/Libraries/Pressability/Pressability.js +211 -135
- package/Libraries/Pressability/Pressability.windows.js +318 -167
- package/Libraries/Pressability/PressabilityDebug.js +30 -26
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +49 -0
- package/Libraries/Pressability/PressabilityTypes.js +18 -0
- package/Libraries/Pressability/usePressability.js +8 -3
- package/Libraries/Promise.js +1 -2
- package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +5 -66
- package/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +295 -0
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +132 -81
- package/Libraries/ReactNative/AppContainer-dev.js +192 -0
- package/Libraries/ReactNative/AppContainer-prod.js +53 -0
- package/Libraries/ReactNative/AppContainer.js +9 -136
- package/Libraries/ReactNative/AppRegistry.d.ts +114 -0
- package/Libraries/ReactNative/AppRegistry.js +130 -71
- package/Libraries/ReactNative/BridgelessUIManager.js +438 -0
- package/Libraries/ReactNative/DisplayMode.js +32 -0
- package/Libraries/ReactNative/FabricUIManager.js +164 -32
- package/Libraries/ReactNative/HeadlessJsTaskError.js +1 -3
- package/Libraries/ReactNative/I18nManager.d.ts +25 -0
- package/Libraries/ReactNative/I18nManager.js +17 -12
- package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +4 -12
- package/Libraries/ReactNative/NativeI18nManager.js +4 -17
- package/Libraries/ReactNative/NativeUIManager.js +5 -113
- package/Libraries/ReactNative/PaperUIManager.js +79 -52
- package/Libraries/ReactNative/PaperUIManager.windows.js +71 -40
- package/Libraries/ReactNative/ReactFabricInternals.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +100 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +38 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +31 -0
- package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
- package/Libraries/ReactNative/RendererImplementation.js +123 -0
- package/Libraries/ReactNative/RendererProxy.d.ts +20 -0
- package/Libraries/ReactNative/RendererProxy.js +26 -0
- package/Libraries/ReactNative/RootTag.d.ts +13 -0
- package/Libraries/ReactNative/RootTag.js +5 -9
- package/Libraries/ReactNative/UIManager.d.ts +134 -0
- package/Libraries/ReactNative/UIManager.js +178 -24
- package/Libraries/ReactNative/UIManagerProperties.js +2 -3
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +670 -0
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +35 -0
- package/Libraries/ReactNative/getNativeComponentAttributes.js +34 -18
- package/Libraries/ReactNative/renderApplication.js +62 -19
- package/Libraries/ReactNative/requireNativeComponent.d.ts +23 -0
- package/Libraries/ReactNative/requireNativeComponent.js +4 -4
- package/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +66 -11
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +25088 -18550
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +5698 -3917
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +6388 -4402
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +25418 -19040
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5768 -3968
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +6269 -4235
- package/Libraries/Renderer/shims/ReactFabric.js +9 -8
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +4 -2
- package/Libraries/Renderer/shims/ReactNative.js +4 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +160 -100
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +23 -32
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +7 -6
- package/Libraries/Settings/NativeSettingsManager.js +5 -18
- package/Libraries/Settings/Settings.d.ts +18 -0
- package/Libraries/Settings/Settings.ios.js +5 -3
- package/Libraries/Settings/Settings.js +33 -0
- package/Libraries/Share/NativeShareModule.js +4 -15
- package/Libraries/Share/Share.d.ts +74 -0
- package/Libraries/Share/Share.js +8 -8
- package/Libraries/StyleSheet/EdgeInsetsPropType.js +5 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +10 -7
- package/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +18 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +52 -16
- package/Libraries/StyleSheet/PlatformColorValueTypes.windows.js +11 -7
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +25 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +11 -5
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +3 -3
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -3
- package/Libraries/StyleSheet/StyleSheet.d.ts +150 -0
- package/Libraries/StyleSheet/StyleSheet.js +29 -46
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +410 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +362 -114
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +3 -3
- package/Libraries/StyleSheet/flattenStyle.js +13 -9
- package/Libraries/StyleSheet/normalizeColor.js +7 -9
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
- package/Libraries/StyleSheet/private/_TransformStyle.js +69 -0
- package/Libraries/StyleSheet/processAspectRatio.js +63 -0
- package/Libraries/StyleSheet/processColor.d.ts +16 -0
- package/Libraries/StyleSheet/processColor.js +6 -8
- package/Libraries/StyleSheet/processColorArray.js +18 -7
- package/Libraries/StyleSheet/processFontVariant.js +30 -0
- package/Libraries/StyleSheet/processTransform.js +141 -111
- package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
- package/Libraries/StyleSheet/setNormalizedColorAlpha.js +1 -1
- package/Libraries/StyleSheet/splitLayoutProps.js +57 -49
- package/Libraries/Text/Text.d.ts +219 -0
- package/Libraries/Text/Text.js +283 -224
- package/Libraries/Text/Text.windows.js +395 -292
- package/Libraries/Text/TextAncestor.js +3 -4
- package/Libraries/Text/TextNativeComponent.js +56 -43
- package/Libraries/Text/TextProps.js +97 -31
- package/Libraries/Text/TextProps.windows.js +275 -0
- package/Libraries/TurboModule/RCTExport.d.ts +12 -0
- package/Libraries/TurboModule/RCTExport.js +2 -2
- package/Libraries/TurboModule/TurboModuleRegistry.d.ts +13 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +55 -36
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +5 -29
- package/Libraries/Types/CodegenTypes.js +4 -2
- package/Libraries/Types/CoreEventTypes.d.ts +266 -0
- package/Libraries/Types/CoreEventTypes.js +142 -5
- package/Libraries/Types/CoreEventTypes.windows.js +154 -5
- package/Libraries/Types/ReactDevToolsTypes.js +58 -0
- package/Libraries/Types/RootTagTypes.js +11 -0
- package/Libraries/Types/UIManagerJSInterface.js +16 -0
- package/Libraries/UTFSequence.js +5 -3
- package/Libraries/Utilities/Appearance.d.ts +53 -0
- package/Libraries/Utilities/Appearance.js +35 -15
- package/Libraries/Utilities/BackHandler.android.js +8 -12
- package/Libraries/Utilities/BackHandler.d.ts +38 -0
- package/Libraries/Utilities/BackHandler.ios.js +1 -1
- package/Libraries/Utilities/BackHandler.windows.js +8 -12
- package/Libraries/Utilities/DebugEnvironment.js +3 -8
- package/Libraries/Utilities/DevSettings.d.ts +32 -0
- package/Libraries/Utilities/DevSettings.js +55 -58
- package/Libraries/Utilities/DeviceInfo.js +1 -3
- package/Libraries/Utilities/Dimensions.d.ts +79 -0
- package/Libraries/Utilities/Dimensions.js +29 -49
- package/Libraries/Utilities/FeatureDetection.js +31 -0
- package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -3
- package/Libraries/Utilities/HMRClient.js +51 -25
- package/Libraries/Utilities/HMRClientProdShim.js +1 -1
- package/Libraries/Utilities/IPerformanceLogger.d.ts +48 -0
- package/Libraries/Utilities/IPerformanceLogger.js +49 -0
- package/Libraries/Utilities/LoadingView.android.js +29 -14
- package/Libraries/Utilities/LoadingView.ios.js +2 -4
- package/Libraries/Utilities/LoadingView.js +1 -1
- package/Libraries/Utilities/NativeAppearance.js +4 -27
- package/Libraries/Utilities/NativeDevLoadingView.js +4 -16
- package/Libraries/Utilities/NativeDeviceInfo.js +3 -50
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +4 -31
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +4 -25
- package/Libraries/Utilities/NativePlatformConstantsWin.js +3 -21
- package/Libraries/Utilities/PerformanceLoggerContext.js +14 -10
- package/Libraries/Utilities/PixelRatio.d.ts +64 -0
- package/Libraries/Utilities/PixelRatio.js +3 -3
- package/Libraries/Utilities/Platform.android.js +29 -14
- package/Libraries/Utilities/Platform.d.ts +106 -0
- package/Libraries/Utilities/Platform.flow.js +91 -0
- package/Libraries/Utilities/Platform.flow.windows.js +120 -0
- package/Libraries/Utilities/Platform.ios.js +32 -18
- package/Libraries/Utilities/Platform.windows.js +31 -14
- package/Libraries/Utilities/PolyfillFunctions.js +3 -3
- package/Libraries/Utilities/RCTLog.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +29 -44
- package/Libraries/Utilities/SceneTracker.js +6 -5
- package/Libraries/Utilities/__mocks__/BackHandler.js +4 -4
- package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +1 -1
- package/Libraries/Utilities/__mocks__/PixelRatio.js +2 -2
- package/Libraries/Utilities/binaryToBase64.js +2 -2
- package/Libraries/Utilities/codegenNativeCommands.js +6 -6
- package/Libraries/Utilities/codegenNativeComponent.js +21 -11
- package/Libraries/Utilities/createPerformanceLogger.js +21 -53
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +6 -3
- package/Libraries/Utilities/defineLazyObjectProperty.js +2 -2
- package/Libraries/Utilities/differ/deepDiffer.js +3 -3
- package/Libraries/Utilities/differ/insetsDiffer.js +2 -2
- package/Libraries/Utilities/differ/matricesDiffer.js +6 -2
- package/Libraries/Utilities/differ/pointsDiffer.js +2 -2
- package/Libraries/Utilities/differ/sizesDiffer.js +11 -5
- package/Libraries/Utilities/dismissKeyboard.js +1 -1
- package/Libraries/Utilities/infoLog.js +1 -1
- package/Libraries/Utilities/logError.js +2 -2
- package/Libraries/Utilities/mapWithSeparator.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +7 -7
- package/Libraries/Utilities/useColorScheme.js +10 -16
- package/Libraries/Utilities/useMergeRefs.js +40 -0
- package/Libraries/Utilities/useRefEffect.js +45 -0
- package/Libraries/Utilities/useWindowDimensions.js +15 -8
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +31 -35
- package/Libraries/Utilities/warnOnce.js +1 -1
- package/Libraries/Vibration/NativeVibration.js +4 -16
- package/Libraries/Vibration/Vibration.d.ts +43 -0
- package/Libraries/Vibration/Vibration.js +8 -9
- package/Libraries/WebSocket/NativeWebSocketModule.js +5 -27
- package/Libraries/WebSocket/WebSocket.js +38 -16
- package/Libraries/WebSocket/WebSocketEvent.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +13 -10
- package/Libraries/WebSocket/__mocks__/event-target-shim.js +1 -1
- package/Libraries/YellowBox/YellowBoxDeprecated.d.ts +19 -0
- package/Libraries/YellowBox/YellowBoxDeprecated.js +6 -6
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +2 -3
- package/Libraries/__tests__/ViewWindows-test.js +16 -0
- package/Libraries/platform-types.d.ts +19 -0
- package/Libraries/promiseRejectionTrackingOptions.js +29 -12
- package/Libraries/vendor/core/ErrorUtils.d.ts +15 -0
- package/Libraries/vendor/core/ErrorUtils.js +2 -2
- package/Libraries/vendor/emitter/EventEmitter.d.ts +164 -0
- package/Libraries/vendor/emitter/EventEmitter.js +145 -8
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +81 -0
- package/Microsoft.ReactNative/ABIViewManager.cpp +82 -5
- package/Microsoft.ReactNative/ABIViewManager.h +25 -1
- package/Microsoft.ReactNative/AsynchronousEventBeat.cpp +50 -0
- package/Microsoft.ReactNative/AsynchronousEventBeat.h +23 -0
- package/Microsoft.ReactNative/Base/CoreUIManagers.cpp +4 -4
- package/Microsoft.ReactNative/Base/CxxReactIncludes.h +4 -6
- package/Microsoft.ReactNative/Base/FollyIncludes.h +2 -2
- package/Microsoft.ReactNative/ComponentView.idl +106 -0
- package/Microsoft.ReactNative/Composition.Input.idl +117 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +132 -0
- package/Microsoft.ReactNative/CompositionContext.idl +54 -0
- package/Microsoft.ReactNative/CompositionHwndHost.idl +39 -0
- package/Microsoft.ReactNative/CompositionRootView.idl +106 -0
- package/Microsoft.ReactNative/CompositionSwitcher.idl +164 -0
- package/Microsoft.ReactNative/CompositionUIService.idl +26 -0
- package/Microsoft.ReactNative/DesktopWindowMessage.idl +15 -0
- package/Microsoft.ReactNative/DevMenuControl.idl +6 -3
- package/Microsoft.ReactNative/DevMenuControl.xaml +15 -15
- package/Microsoft.ReactNative/DynamicReader.cpp +8 -2
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +189 -0
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.h +80 -0
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.cpp +83 -0
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.h +83 -0
- package/Microsoft.ReactNative/Fabric/AbiState.cpp +71 -0
- package/Microsoft.ReactNative/Fabric/AbiState.h +38 -0
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +190 -0
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +80 -0
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +152 -0
- package/Microsoft.ReactNative/Fabric/AbiViewProps.h +92 -0
- package/Microsoft.ReactNative/Fabric/AbiViewShadowNode.cpp +90 -0
- package/Microsoft.ReactNative/Fabric/AbiViewShadowNode.h +87 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +340 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.h +176 -0
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +162 -0
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +63 -0
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +125 -0
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.h +37 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +670 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +226 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +1971 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +65 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +79 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +419 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +53 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +1183 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +175 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.cpp +137 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +81 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +160 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.h +48 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +444 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +82 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +701 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +158 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +138 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.cpp +42 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.h +25 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +21 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +1836 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +236 -0
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +113 -0
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +39 -0
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +432 -0
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +101 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +39 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +342 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +67 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +18 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +39 -0
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +361 -0
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +76 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +114 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +61 -0
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +196 -0
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +62 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +1219 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +145 -0
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +390 -0
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +83 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +179 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.h +25 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +170 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +1567 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +143 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.cpp +49 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.h +45 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.cpp +61 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.h +123 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +198 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +82 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +47 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +74 -0
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +560 -0
- package/Microsoft.ReactNative/Fabric/Composition/Theme.h +81 -0
- package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +85 -0
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +165 -0
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +32 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +124 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +41 -0
- package/Microsoft.ReactNative/Fabric/DWriteHelpers.cpp +19 -0
- package/Microsoft.ReactNative/Fabric/DWriteHelpers.h +13 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +446 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +99 -0
- package/Microsoft.ReactNative/Fabric/IComponentViewRegistry.h +35 -0
- package/Microsoft.ReactNative/Fabric/ImageManager.cpp +25 -0
- package/Microsoft.ReactNative/Fabric/ImageRequest.cpp +40 -0
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.cpp +53 -0
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.h +26 -0
- package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +39 -0
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +108 -0
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.h +48 -0
- package/Microsoft.ReactNative/Fabric/WindowsImageManager.cpp +125 -0
- package/Microsoft.ReactNative/Fabric/WindowsImageManager.h +20 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformTouch.h +10 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +57 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +31 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +69 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +33 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +27 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/KeyEvent.h +113 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/WindowsViewEvents.h +73 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Float.h +20 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +86 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h +38 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +145 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.h +12 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +315 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +97 -0
- package/Microsoft.ReactNative/GlyphViewManager.cpp +10 -9
- package/Microsoft.ReactNative/GlyphViewManager.h +1 -1
- package/Microsoft.ReactNative/IJSValueReader.idl +62 -14
- package/Microsoft.ReactNative/IJSValueWriter.idl +39 -19
- package/Microsoft.ReactNative/INativeUIManager.h +1 -1
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +28 -0
- package/Microsoft.ReactNative/IReactContext.cpp +32 -15
- package/Microsoft.ReactNative/IReactContext.h +7 -8
- package/Microsoft.ReactNative/IReactContext.idl +158 -26
- package/Microsoft.ReactNative/IReactDispatcher.cpp +79 -4
- package/Microsoft.ReactNative/IReactDispatcher.h +35 -3
- package/Microsoft.ReactNative/IReactDispatcher.idl +40 -12
- package/Microsoft.ReactNative/IReactModuleBuilder.cpp +57 -0
- package/Microsoft.ReactNative/IReactModuleBuilder.idl +25 -20
- package/Microsoft.ReactNative/IReactNonAbiValue.idl +8 -10
- package/Microsoft.ReactNative/IReactNotificationService.cpp +220 -65
- package/Microsoft.ReactNative/IReactNotificationService.h +47 -26
- package/Microsoft.ReactNative/IReactNotificationService.idl +56 -54
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +14 -13
- package/Microsoft.ReactNative/IReactPackageBuilderFabric.idl +23 -0
- package/Microsoft.ReactNative/IReactPackageProvider.idl +8 -6
- package/Microsoft.ReactNative/IReactPropertyBag.cpp +10 -1
- package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
- package/Microsoft.ReactNative/IReactPropertyBag.idl +48 -43
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +93 -0
- package/Microsoft.ReactNative/IViewManager.idl +73 -2
- package/Microsoft.ReactNative/IViewManagerCore.idl +2 -0
- package/Microsoft.ReactNative/JSDispatcherWriter.cpp +146 -0
- package/Microsoft.ReactNative/JSDispatcherWriter.h +47 -0
- package/Microsoft.ReactNative/JsiApi.cpp +565 -255
- package/Microsoft.ReactNative/JsiApi.h +55 -12
- package/Microsoft.ReactNative/JsiApi.idl +148 -9
- package/Microsoft.ReactNative/JsiWriter.cpp +1 -13
- package/Microsoft.ReactNative/JsiWriter.h +0 -3
- package/Microsoft.ReactNative/LayoutService.cpp +51 -0
- package/Microsoft.ReactNative/LayoutService.h +32 -0
- package/Microsoft.ReactNative/LayoutService.idl +41 -0
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +130 -173
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +111 -87
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +24 -20
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +13 -4
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +215 -54
- package/Microsoft.ReactNative/Modules/AlertModule.h +32 -21
- package/Microsoft.ReactNative/Modules/Animated/AdditionAnimatedNode.cpp +35 -18
- package/Microsoft.ReactNative/Modules/Animated/AdditionAnimatedNode.h +5 -4
- package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.cpp +19 -4
- package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.h +21 -3
- package/Microsoft.ReactNative/Modules/Animated/AnimatedPlatformConfig.cpp +23 -0
- package/Microsoft.ReactNative/Modules/Animated/AnimatedPlatformConfig.h +17 -0
- package/Microsoft.ReactNative/Modules/Animated/AnimationDriver.cpp +74 -38
- package/Microsoft.ReactNative/Modules/Animated/AnimationDriver.h +37 -11
- package/Microsoft.ReactNative/Modules/Animated/AnimationUtils.h +45 -0
- package/Microsoft.ReactNative/Modules/Animated/CalculatedAnimationDriver.cpp +13 -10
- package/Microsoft.ReactNative/Modules/Animated/CalculatedAnimationDriver.h +4 -6
- package/Microsoft.ReactNative/Modules/Animated/DecayAnimationDriver.cpp +33 -17
- package/Microsoft.ReactNative/Modules/Animated/DecayAnimationDriver.h +6 -6
- package/Microsoft.ReactNative/Modules/Animated/DiffClampAnimatedNode.cpp +31 -16
- package/Microsoft.ReactNative/Modules/Animated/DiffClampAnimatedNode.h +6 -4
- package/Microsoft.ReactNative/Modules/Animated/DivisionAnimatedNode.cpp +44 -21
- package/Microsoft.ReactNative/Modules/Animated/DivisionAnimatedNode.h +5 -4
- package/Microsoft.ReactNative/Modules/Animated/EventAnimationDriver.cpp +4 -4
- package/Microsoft.ReactNative/Modules/Animated/EventAnimationDriver.h +3 -3
- package/Microsoft.ReactNative/Modules/Animated/FacadeType.h +8 -3
- package/Microsoft.ReactNative/Modules/Animated/FrameAnimationDriver.cpp +51 -12
- package/Microsoft.ReactNative/Modules/Animated/FrameAnimationDriver.h +9 -4
- package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.cpp +82 -42
- package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.h +8 -7
- package/Microsoft.ReactNative/Modules/Animated/ModulusAnimatedNode.cpp +27 -15
- package/Microsoft.ReactNative/Modules/Animated/ModulusAnimatedNode.h +6 -4
- package/Microsoft.ReactNative/Modules/Animated/MultiplicationAnimatedNode.cpp +35 -18
- package/Microsoft.ReactNative/Modules/Animated/MultiplicationAnimatedNode.h +5 -4
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.cpp +251 -206
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.h +95 -43
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +395 -65
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.h +50 -15
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +213 -59
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +30 -7
- package/Microsoft.ReactNative/Modules/Animated/SpringAnimationDriver.cpp +78 -23
- package/Microsoft.ReactNative/Modules/Animated/SpringAnimationDriver.h +12 -8
- package/Microsoft.ReactNative/Modules/Animated/StyleAnimatedNode.cpp +27 -8
- package/Microsoft.ReactNative/Modules/Animated/StyleAnimatedNode.h +5 -4
- package/Microsoft.ReactNative/Modules/Animated/SubtractionAnimatedNode.cpp +44 -22
- package/Microsoft.ReactNative/Modules/Animated/SubtractionAnimatedNode.h +5 -3
- package/Microsoft.ReactNative/Modules/Animated/TrackingAnimatedNode.cpp +25 -13
- package/Microsoft.ReactNative/Modules/Animated/TrackingAnimatedNode.h +7 -8
- package/Microsoft.ReactNative/Modules/Animated/TransformAnimatedNode.cpp +42 -12
- package/Microsoft.ReactNative/Modules/Animated/TransformAnimatedNode.h +7 -4
- package/Microsoft.ReactNative/Modules/Animated/ValueAnimatedNode.cpp +62 -34
- package/Microsoft.ReactNative/Modules/Animated/ValueAnimatedNode.h +14 -6
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +82 -32
- package/Microsoft.ReactNative/Modules/AppStateModule.h +19 -13
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +83 -48
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +26 -26
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +71 -36
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +30 -30
- package/Microsoft.ReactNative/Modules/ClipboardModule.cpp +4 -4
- package/Microsoft.ReactNative/Modules/ClipboardModule.h +5 -2
- package/Microsoft.ReactNative/Modules/CreateModules.cpp +5 -15
- package/Microsoft.ReactNative/Modules/DevSettingsModule.h +3 -0
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +151 -54
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +22 -12
- package/Microsoft.ReactNative/Modules/ExceptionsManager.cpp +110 -0
- package/Microsoft.ReactNative/Modules/ExceptionsManager.h +54 -0
- package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +8 -6
- package/Microsoft.ReactNative/Modules/I18nManagerModule.h +5 -2
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +109 -104
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +37 -19
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +57 -67
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +39 -15
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +156 -38
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +12 -3
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +216 -160
- package/Microsoft.ReactNative/Modules/NativeUIManager.h +19 -9
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +148 -100
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +13 -3
- package/Microsoft.ReactNative/Modules/PlatformConstantsWinModule.cpp +49 -0
- package/Microsoft.ReactNative/Modules/PlatformConstantsWinModule.h +18 -0
- package/Microsoft.ReactNative/Modules/ReactRootViewTagGenerator.h +0 -3
- package/Microsoft.ReactNative/Modules/SourceCode.cpp +31 -0
- package/Microsoft.ReactNative/Modules/SourceCode.h +28 -0
- package/Microsoft.ReactNative/Modules/StatusBarManager.h +12 -0
- package/Microsoft.ReactNative/Modules/Timing.cpp +325 -0
- package/Microsoft.ReactNative/Modules/Timing.h +121 -0
- package/Microsoft.ReactNative/NativeModulesProvider.cpp +1 -1
- package/Microsoft.ReactNative/Pch/pch.h +30 -4
- package/Microsoft.ReactNative/PropertySheet.props +1 -1
- package/Microsoft.ReactNative/QuirkSettings.cpp +109 -12
- package/Microsoft.ReactNative/QuirkSettings.h +36 -2
- package/Microsoft.ReactNative/QuirkSettings.idl +54 -14
- package/Microsoft.ReactNative/ReactApplication.cpp +74 -22
- package/Microsoft.ReactNative/ReactApplication.h +47 -12
- package/Microsoft.ReactNative/ReactApplication.idl +24 -12
- package/Microsoft.ReactNative/ReactCoreInjection.cpp +209 -0
- package/Microsoft.ReactNative/ReactCoreInjection.h +86 -0
- package/Microsoft.ReactNative/ReactCoreInjection.idl +116 -0
- package/Microsoft.ReactNative/ReactHost/AsyncActionQueue.cpp +1 -2
- package/Microsoft.ReactNative/ReactHost/CrashManager.cpp +125 -0
- package/Microsoft.ReactNative/ReactHost/CrashManager.h +25 -0
- package/Microsoft.ReactNative/ReactHost/IReactInstance.h +4 -7
- package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +7 -4
- package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +2 -0
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +238 -0
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +71 -0
- package/Microsoft.ReactNative/ReactHost/MsoUtils.cpp +4 -5
- package/Microsoft.ReactNative/ReactHost/MsoUtils.h +2 -2
- package/Microsoft.ReactNative/ReactHost/React.h +38 -14
- package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +108 -34
- package/Microsoft.ReactNative/ReactHost/ReactHost.h +24 -7
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +921 -348
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +65 -28
- package/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h +1 -3
- package/Microsoft.ReactNative/ReactHost/ViewManagerProvider.h +2 -6
- package/Microsoft.ReactNative/ReactInstanceSettings.cpp +14 -22
- package/Microsoft.ReactNative/ReactInstanceSettings.h +68 -31
- package/Microsoft.ReactNative/ReactInstanceSettings.idl +207 -53
- package/Microsoft.ReactNative/ReactNativeHost.cpp +36 -10
- package/Microsoft.ReactNative/ReactNativeHost.h +4 -4
- package/Microsoft.ReactNative/ReactNativeHost.idl +32 -7
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +26 -3
- package/Microsoft.ReactNative/ReactPackageBuilder.h +27 -3
- package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +55 -0
- package/Microsoft.ReactNative/ReactPointerEventArgs.h +32 -0
- package/Microsoft.ReactNative/ReactPointerEventArgs.idl +79 -0
- package/Microsoft.ReactNative/ReactRootView.cpp +410 -13
- package/Microsoft.ReactNative/ReactRootView.h +71 -7
- package/Microsoft.ReactNative/ReactRootView.idl +21 -3
- package/Microsoft.ReactNative/ReactSupport.h +1 -1
- package/Microsoft.ReactNative/RedBox.cpp +121 -46
- package/Microsoft.ReactNative/RedBox.h +4 -3
- package/Microsoft.ReactNative/RedBoxHandler.cpp +7 -1
- package/Microsoft.ReactNative/RedBoxHandler.idl +56 -32
- package/Microsoft.ReactNative/SchedulerSettings.cpp +74 -0
- package/Microsoft.ReactNative/SchedulerSettings.h +35 -0
- package/Microsoft.ReactNative/SynchronousEventBeat.cpp +41 -0
- package/Microsoft.ReactNative/SynchronousEventBeat.h +29 -0
- package/Microsoft.ReactNative/TestHook.cpp +1 -1
- package/Microsoft.ReactNative/Theme.idl +68 -0
- package/Microsoft.ReactNative/Timer.cpp +63 -0
- package/Microsoft.ReactNative/Timer.h +22 -0
- package/Microsoft.ReactNative/Timer.idl +32 -0
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +300 -169
- package/Microsoft.ReactNative/TurboModulesProvider.h +14 -12
- package/Microsoft.ReactNative/Utils/AccessibilityUtils.cpp +2 -2
- package/Microsoft.ReactNative/Utils/AccessibilityUtils.h +2 -2
- package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +171 -0
- package/Microsoft.ReactNative/Utils/BatchingEventEmitter.h +72 -0
- package/Microsoft.ReactNative/Utils/Helpers.cpp +31 -34
- package/Microsoft.ReactNative/Utils/Helpers.h +7 -11
- package/Microsoft.ReactNative/Utils/ImageUtils.cpp +191 -0
- package/Microsoft.ReactNative/Utils/ImageUtils.h +36 -0
- package/Microsoft.ReactNative/Utils/KeyboardUtils.cpp +416 -0
- package/Microsoft.ReactNative/Utils/KeyboardUtils.h +15 -0
- package/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +53 -12
- package/Microsoft.ReactNative/Utils/LocalBundleReader.h +5 -5
- package/Microsoft.ReactNative/Utils/PropertyUtils.h +52 -23
- package/Microsoft.ReactNative/Utils/ResourceBrushUtils.cpp +54 -22
- package/Microsoft.ReactNative/Utils/ResourceBrushUtils.h +12 -4
- package/Microsoft.ReactNative/Utils/ShadowNodeTypeUtils.h +26 -0
- package/Microsoft.ReactNative/Utils/TextTransform.h +8 -0
- package/Microsoft.ReactNative/Utils/ThemeUtils.cpp +33 -0
- package/Microsoft.ReactNative/Utils/ThemeUtils.h +13 -0
- package/Microsoft.ReactNative/Utils/TransformableText.h +10 -15
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.cpp +2 -2
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +4 -4
- package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +2 -2
- package/Microsoft.ReactNative/Utils/UwpScriptStore.h +3 -3
- package/Microsoft.ReactNative/Utils/ValueUtils.cpp +140 -56
- package/Microsoft.ReactNative/Utils/ValueUtils.h +11 -8
- package/Microsoft.ReactNative/Utils/XamlIslandUtils.cpp +93 -0
- package/Microsoft.ReactNative/Utils/XamlIslandUtils.h +48 -0
- package/Microsoft.ReactNative/Version.rc +8 -25
- package/Microsoft.ReactNative/ViewProps.idl +57 -0
- package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.cpp +11 -1
- package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.h +2 -1
- package/Microsoft.ReactNative/Views/ConfigureBundlerDlg.cpp +6 -7
- package/Microsoft.ReactNative/Views/ControlViewManager.cpp +48 -1
- package/Microsoft.ReactNative/Views/ControlViewManager.h +9 -0
- package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.cpp +54 -0
- package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.h +30 -0
- package/Microsoft.ReactNative/Views/DevMenu.cpp +356 -182
- package/Microsoft.ReactNative/Views/DevMenu.h +3 -14
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +271 -140
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.h +19 -15
- package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +61 -71
- package/Microsoft.ReactNative/Views/DynamicAutomationProperties.h +24 -37
- package/Microsoft.ReactNative/Views/DynamicValueProvider.cpp +2 -2
- package/Microsoft.ReactNative/Views/DynamicValueProvider.h +4 -4
- package/Microsoft.ReactNative/Views/ExpressionAnimationStore.cpp +2 -2
- package/Microsoft.ReactNative/Views/ExpressionAnimationStore.h +2 -2
- package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +88 -20
- package/Microsoft.ReactNative/Views/FlyoutViewManager.h +1 -2
- package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +126 -0
- package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.h +23 -0
- package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +538 -257
- package/Microsoft.ReactNative/Views/FrameworkElementViewManager.h +0 -8
- package/Microsoft.ReactNative/Views/ICompositionRootView.h +18 -0
- package/Microsoft.ReactNative/Views/IXamlRootView.h +2 -15
- package/Microsoft.ReactNative/Views/Image/Effects.h +4 -6
- package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +66 -37
- package/Microsoft.ReactNative/Views/Image/ImageViewManager.h +13 -2
- package/Microsoft.ReactNative/Views/Image/Microsoft.UI.Composition.Effects_Impl.h +7 -13
- package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +179 -157
- package/Microsoft.ReactNative/Views/Image/ReactImage.h +14 -29
- package/Microsoft.ReactNative/Views/Image/ReactImageBrush.cpp +39 -37
- package/Microsoft.ReactNative/Views/Image/ReactImageBrush.h +6 -7
- package/Microsoft.ReactNative/Views/Impl/ScrollViewUWPImplementation.cpp +2 -2
- package/Microsoft.ReactNative/Views/Impl/ScrollViewUWPImplementation.h +2 -2
- package/Microsoft.ReactNative/Views/Impl/SnapPointManagingContentControl.cpp +2 -2
- package/Microsoft.ReactNative/Views/Impl/SnapPointManagingContentControl.h +2 -2
- package/Microsoft.ReactNative/Views/KeyboardEventHandler.cpp +35 -413
- package/Microsoft.ReactNative/Views/KeyboardEventHandler.h +3 -6
- package/Microsoft.ReactNative/Views/PaperShadowNode.h +2 -1
- package/Microsoft.ReactNative/Views/PopupViewManager.cpp +7 -10
- package/Microsoft.ReactNative/Views/PopupViewManager.h +1 -1
- package/Microsoft.ReactNative/Views/RawTextViewManager.cpp +8 -39
- package/Microsoft.ReactNative/Views/RawTextViewManager.h +10 -5
- package/Microsoft.ReactNative/Views/ReactViewInstance.cpp +43 -0
- package/Microsoft.ReactNative/Views/ReactViewInstance.h +53 -0
- package/Microsoft.ReactNative/Views/RefreshControlManager.cpp +9 -7
- package/Microsoft.ReactNative/Views/RefreshControlManager.h +1 -1
- package/Microsoft.ReactNative/Views/RootViewManager.cpp +9 -10
- package/Microsoft.ReactNative/Views/RootViewManager.h +1 -1
- package/Microsoft.ReactNative/Views/SIPEventHandler.cpp +7 -8
- package/Microsoft.ReactNative/Views/SIPEventHandler.h +1 -1
- package/Microsoft.ReactNative/Views/ScrollViewManager.cpp +79 -50
- package/Microsoft.ReactNative/Views/ScrollViewManager.h +4 -1
- package/Microsoft.ReactNative/Views/ShadowNodeBase.cpp +40 -5
- package/Microsoft.ReactNative/Views/ShadowNodeBase.h +33 -6
- package/Microsoft.ReactNative/Views/ShadowNodeRegistry.cpp +0 -12
- package/Microsoft.ReactNative/Views/ShadowNodeRegistry.h +2 -4
- package/Microsoft.ReactNative/Views/SliderViewManager.cpp +16 -8
- package/Microsoft.ReactNative/Views/SliderViewManager.h +1 -1
- package/Microsoft.ReactNative/Views/SwitchViewManager.cpp +70 -23
- package/Microsoft.ReactNative/Views/SwitchViewManager.h +1 -1
- package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.cpp +52 -0
- package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.h +37 -0
- package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.cpp +348 -0
- package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.h +13 -0
- package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.cpp +76 -0
- package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.h +32 -0
- package/Microsoft.ReactNative/Views/Text/TextParentVisitor.cpp +12 -0
- package/Microsoft.ReactNative/Views/Text/TextParentVisitor.h +19 -0
- package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp +75 -0
- package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.h +43 -0
- package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.cpp +21 -0
- package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +23 -0
- package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.cpp +70 -0
- package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.h +34 -0
- package/Microsoft.ReactNative/Views/Text/TextVisitor.cpp +56 -0
- package/Microsoft.ReactNative/Views/Text/TextVisitor.h +34 -0
- package/Microsoft.ReactNative/Views/Text/TextVisitorScope.h +35 -0
- package/Microsoft.ReactNative/Views/Text/TextVisitors.h +47 -0
- package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +320 -119
- package/Microsoft.ReactNative/Views/TextInputViewManager.h +1 -1
- package/Microsoft.ReactNative/Views/TextViewManager.cpp +245 -89
- package/Microsoft.ReactNative/Views/TextViewManager.h +12 -2
- package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +261 -165
- package/Microsoft.ReactNative/Views/TouchEventHandler.h +34 -21
- package/Microsoft.ReactNative/Views/UnimplementedViewManager.cpp +79 -0
- package/Microsoft.ReactNative/Views/UnimplementedViewManager.h +27 -0
- package/Microsoft.ReactNative/Views/ViewControl.cpp +5 -5
- package/Microsoft.ReactNative/Views/ViewControl.h +5 -5
- package/Microsoft.ReactNative/Views/ViewManager.h +4 -0
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +161 -43
- package/Microsoft.ReactNative/Views/ViewManagerBase.h +20 -6
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +28 -243
- package/Microsoft.ReactNative/Views/ViewPanel.h +12 -52
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +110 -206
- package/Microsoft.ReactNative/Views/ViewViewManager.h +3 -2
- package/Microsoft.ReactNative/Views/VirtualTextViewManager.cpp +64 -25
- package/Microsoft.ReactNative/Views/VirtualTextViewManager.h +14 -12
- package/Microsoft.ReactNative/Views/XamlFeatures.cpp +2 -2
- package/Microsoft.ReactNative/Views/XamlFeatures.h +2 -2
- package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +88 -13
- package/Microsoft.ReactNative/Views/cppwinrt/ViewPanel.idl +4 -12
- package/Microsoft.ReactNative/XamlHelper.cpp +52 -3
- package/Microsoft.ReactNative/XamlHelper.h +32 -1
- package/Microsoft.ReactNative/XamlHelper.idl +18 -5
- package/Microsoft.ReactNative/XamlLoadState.cpp +6 -5
- package/Microsoft.ReactNative/XamlLoadState.h +2 -2
- package/Microsoft.ReactNative/XamlUIService.cpp +54 -6
- package/Microsoft.ReactNative/XamlUIService.h +9 -2
- package/Microsoft.ReactNative/XamlUIService.idl +43 -10
- package/Microsoft.ReactNative/XamlView.cpp +18 -11
- package/Microsoft.ReactNative/XamlView.h +20 -6
- package/Microsoft.ReactNative/microsoft.reactnative.def +1 -1
- package/Microsoft.ReactNative/packages.lock.json +159 -0
- package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
- package/Microsoft.ReactNative.Cxx/AutoDraw.h +40 -0
- package/Microsoft.ReactNative.Cxx/CompositionSwitcher.Experimental.interop.h +34 -0
- package/Microsoft.ReactNative.Cxx/CppWinRTIncludes.h +3 -5
- package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +114 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +231 -165
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +39 -56
- package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.cpp +69 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.h +64 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
- package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
- package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiLoader.cpp +16 -0
- package/Microsoft.ReactNative.Cxx/JSValue.cpp +5 -6
- package/Microsoft.ReactNative.Cxx/JSValue.h +14 -2
- package/Microsoft.ReactNative.Cxx/JSValueComposition.h +22 -0
- package/Microsoft.ReactNative.Cxx/JSValueReader.h +47 -3
- package/Microsoft.ReactNative.Cxx/JSValueWriter.h +18 -12
- package/Microsoft.ReactNative.Cxx/JSValueXaml.h +48 -3
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +102 -12
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +70 -5
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +14 -4
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +28 -3
- package/Microsoft.ReactNative.Cxx/NamespaceRedirect.h +2 -0
- package/Microsoft.ReactNative.Cxx/NativeModules.h +189 -39
- package/Microsoft.ReactNative.Cxx/ReactContext.h +6 -5
- package/Microsoft.ReactNative.Cxx/ReactHandleHelper.h +1 -1
- package/Microsoft.ReactNative.Cxx/ReactNonAbiValue.h +5 -5
- package/Microsoft.ReactNative.Cxx/ReactNotificationService.h +20 -11
- package/Microsoft.ReactNative.Cxx/ReactPromise.cpp +21 -1
- package/Microsoft.ReactNative.Cxx/ReactPromise.h +27 -0
- package/Microsoft.ReactNative.Cxx/ReactPropertyBag.h +15 -13
- package/Microsoft.ReactNative.Cxx/StructInfo.h +4 -4
- package/Microsoft.ReactNative.Cxx/TurboModuleProvider.cpp +32 -0
- package/Microsoft.ReactNative.Cxx/TurboModuleProvider.h +34 -0
- package/Microsoft.ReactNative.Cxx/VersionMacros.h +19 -0
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +44 -5
- package/Microsoft.ReactNative.Cxx/cppapi.md.mustache +13 -0
- package/Microsoft.ReactNative.Cxx/doxysaurus.json +53 -0
- package/Microsoft.ReactNative.Managed/IReactPromise.cs +0 -20
- package/Microsoft.ReactNative.Managed/JSValue.cs +1 -1
- package/Microsoft.ReactNative.Managed/JSValueReader.cs +438 -444
- package/Microsoft.ReactNative.Managed/JSValueReaderGenerator.cs +5 -5
- package/Microsoft.ReactNative.Managed/JSValueWriter.cs +8 -7
- package/Microsoft.ReactNative.Managed/JSValueWriterGenerator.cs +5 -5
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +39 -35
- package/Microsoft.ReactNative.Managed/ReactAttributes.cs +16 -0
- package/Microsoft.ReactNative.Managed/ReactConstantProvider.cs +5 -0
- package/Microsoft.ReactNative.Managed/ReactContext.cs +21 -4
- package/Microsoft.ReactNative.Managed/ReactDispatcher.cs +34 -0
- package/Microsoft.ReactNative.Managed/ReactError.cs +36 -0
- package/Microsoft.ReactNative.Managed/ReactNotificationArgsOf.cs +23 -0
- package/Microsoft.ReactNative.Managed/ReactNotificationHandlerOf.cs +7 -0
- package/Microsoft.ReactNative.Managed/ReactNotificationIdOf.cs +44 -0
- package/Microsoft.ReactNative.Managed/ReactNotificationService.cs +146 -0
- package/Microsoft.ReactNative.Managed/ReactNotificationSubscription.cs +43 -0
- package/Microsoft.ReactNative.Managed/ReactNotificationSubscriptionRevoker.cs +64 -0
- package/Microsoft.ReactNative.Managed/ReactPackageBuilderExtensions.cs +1 -1
- package/Microsoft.ReactNative.Managed/ReactPromise.cs +123 -81
- package/Microsoft.ReactNative.Managed/ReactPropertyBag.cs +91 -0
- package/Microsoft.ReactNative.Managed/ReactPropertyIdOf.cs +44 -0
- package/Microsoft.ReactNative.Managed/ReactPropertyName.cs +39 -0
- package/Microsoft.ReactNative.Managed/ReactPropertyNamespace.cs +26 -0
- package/Microsoft.ReactNative.Managed/ReactSettingsSnapshot.cs +50 -0
- package/Microsoft.ReactNative.Managed/ReactTaskExtensions.cs +15 -4
- package/Microsoft.ReactNative.Managed/ReflectionReactPackageProvider.cs +1 -1
- package/Microsoft.ReactNative.Managed/packages.lock.json +373 -0
- package/Microsoft.ReactNative.Managed.CodeGen/App.cs +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/CodeAnalyzer.cs +795 -731
- package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.Module.cs +96 -61
- package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.Serializers.cs +57 -18
- package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.ViewManager.cs +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/DiagnosticDescriptors.cs +37 -5
- package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +7 -7
- package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactAssembly.cs +3 -3
- package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactGetConstants.cs +17 -0
- package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactMethod.cs +11 -2
- package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactModule.cs +2 -0
- package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactTypes.cs +10 -4
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +4 -4
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +4 -4
- package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +29 -3
- package/Microsoft.ReactNative.Managed.CodeGen/SyntaxHelpers.cs +18 -4
- package/Microsoft.ReactNative.Managed.CodeGen/packages.lock.json +3197 -0
- package/Mso/Mso.vcxitems.filters +2 -2
- package/Mso/activeObject/activeObject.h +8 -14
- package/Mso/comUtil/IUnknownShim.h +4 -0
- package/Mso/comUtil/qiCastCore.h +0 -6
- package/Mso/compilerAdapters/compilerFeatures.h +1 -1
- package/Mso/compilerAdapters/cppMacros.h +3 -5
- package/Mso/compilerAdapters/functionDecorations.h +6 -6
- package/Mso/cppExtensions/autoRestore.h +1 -6
- package/Mso/debugAssertApi/debugAssertApi.h +1 -3
- package/Mso/debugAssertApi/debugAssertDetails.h +4 -6
- package/Mso/dispatchQueue/dispatchQueue.h +21 -8
- package/Mso/errorCode/errorProvider.h +2 -2
- package/Mso/errorCode/maybe.h +4 -4
- package/Mso/functional/functor.h +6 -6
- package/Mso/functional/functorRef.h +2 -2
- package/Mso/future/details/executor.h +3 -3
- package/Mso/future/details/futureFuncInl.h +4 -4
- package/Mso/future/details/ifuture.h +3 -3
- package/Mso/future/details/maybeInvoker.h +6 -6
- package/Mso/future/details/promiseGroupInl.h +4 -4
- package/Mso/future/details/promiseInl.h +4 -4
- package/Mso/future/details/resultTraits.h +4 -4
- package/Mso/future/details/whenAllInl.h +1 -1
- package/Mso/future/future.h +13 -13
- package/Mso/future/futureWait.h +1 -1
- package/Mso/future/futureWinRT.h +11 -7
- package/Mso/guid/msoGuidDetails.h +16 -15
- package/Mso/memoryApi/memoryApi.h +13 -7
- package/Mso/motifCpp/assert_IgnorePlat_emptyImpl.h +2 -0
- package/Mso/motifCpp/assert_motifApi.h +2 -0
- package/Mso/motifCpp/gTestAdapter.h +3 -1
- package/Mso/motifCpp/libletAwareMemLeakDetection.h +2 -0
- package/Mso/motifCpp/motifCppTest.h +5 -1
- package/Mso/motifCpp/motifCppTestBase.h +2 -0
- package/Mso/motifCpp/testCheck.h +9 -4
- package/Mso/motifCpp/testInfo.h +9 -9
- package/Mso/oacr/oacr.h +1 -1
- package/Mso/object/make.h +8 -8
- package/Mso/object/objectRefCount.h +3 -5
- package/Mso/object/objectWithWeakRef.h +10 -14
- package/Mso/object/queryCast.h +4 -6
- package/Mso/object/refCountedObject.h +4 -4
- package/Mso/object/unknownObject.h +7 -7
- package/Mso/platformAdapters/windowsFirst.h +1 -1
- package/Mso/smartPtr/cntPtr.h +21 -21
- package/Mso/smartPtr/smartPointerBase.h +1 -5
- package/Mso/src/debugAssertApi/debugAssertApi.cpp +1 -1
- package/Mso/src/dispatchQueue/looperScheduler.cpp +38 -11
- package/Mso/src/dispatchQueue/queueService.cpp +4 -6
- package/Mso/src/dispatchQueue/queueService.h +2 -2
- package/Mso/src/dispatchQueue/taskQueue.h +1 -1
- package/Mso/src/dispatchQueue/threadPoolScheduler_win.cpp +98 -6
- package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +135 -44
- package/Mso/src/eventWaitHandle/eventWaitHandleImpl_win.cpp +2 -3
- package/Mso/src/future/futureImpl.cpp +5 -5
- package/Mso/src/future/futureImpl.h +2 -2
- package/Mso/src/memoryApi/memoryApi.cpp +7 -4
- package/PropertySheets/Appx.props +19 -0
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/Bundle.Common.targets +5 -4
- package/PropertySheets/Bundle.props +9 -10
- package/PropertySheets/Codegen.props +15 -0
- package/PropertySheets/Codegen.targets +19 -0
- package/PropertySheets/CppAppConsumeCSharpModule.props +18 -3
- package/PropertySheets/CppAppConsumeCSharpModule.targets +0 -3
- package/PropertySheets/Debug.props +1 -0
- package/PropertySheets/External/Microsoft.ReactNative.CSharp.Dependencies.props +17 -0
- package/PropertySheets/External/Microsoft.ReactNative.CSharp.PackageReferences.props +12 -0
- package/PropertySheets/External/Microsoft.ReactNative.CSharp.ProjectReferences.props +20 -0
- package/PropertySheets/External/Microsoft.ReactNative.Common.props +33 -3
- package/PropertySheets/External/Microsoft.ReactNative.Common.targets +34 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.Common.props +28 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.props +25 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.targets +19 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.props +24 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.targets +20 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.props +14 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.targets +18 -0
- package/PropertySheets/External/Microsoft.ReactNative.Cpp.Dependencies.props +26 -0
- package/PropertySheets/External/Microsoft.ReactNative.Cpp.PackageReferences.props +12 -0
- package/PropertySheets/External/Microsoft.ReactNative.Cpp.ProjectReferences.props +22 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.props +3 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +26 -12
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.props +1 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.targets +13 -12
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props +4 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +23 -10
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props +11 -1
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.targets +18 -9
- package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +32 -0
- package/PropertySheets/FastBuild.targets +64 -0
- package/PropertySheets/FixupRoslynCscWarnings.targets +38 -0
- package/PropertySheets/Generated/PackageVersion.g.props +20 -0
- package/PropertySheets/HybridCRT.props +34 -0
- package/PropertySheets/JSEngine.props +17 -9
- package/PropertySheets/ManagedCodeGen/Microsoft.ReactNative.Managed.CodeGen.targets +1 -1
- package/PropertySheets/NewAPIDeclarations.props +25 -0
- package/PropertySheets/NuGet.CSharp.props +15 -0
- package/PropertySheets/NuGet.Cpp.props +32 -0
- package/PropertySheets/OutputMSBuildProperties.targets +31 -0
- package/PropertySheets/PackageVersionDefinitions.props +46 -0
- package/PropertySheets/React.Cpp.props +45 -13
- package/PropertySheets/ReactCommunity.cpp.props +2 -2
- package/PropertySheets/Release.props +8 -1
- package/PropertySheets/Warnings.props +8 -3
- package/PropertySheets/WinUI.props +30 -11
- package/PropertySheets/x64.props +3 -0
- package/PropertySheets/x86.props +3 -0
- package/README.md +6 -6
- package/ReactCommon/ReactCommon.vcxproj +110 -48
- package/ReactCommon/ReactCommon.vcxproj.filters +100 -41
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +1556 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +20 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +103 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.cpp +66 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +59 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +535 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/utils/jsi-utils.cpp +39 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/utils/jsi-utils.h +31 -0
- package/ReactCommon/cgmanifest.json +15 -0
- package/ReactCommon/packages.lock.json +30 -0
- package/ReactCommon/pch.h +11 -1
- package/Scripts/Analyze-Crash.ps1 +116 -0
- package/Scripts/EnableInternalWinAppSDKFeed.ps1 +21 -0
- package/Scripts/Install-WindowsSDKISO.ps1 +1 -1
- package/Scripts/IntegrationTests.ps1 +26 -11
- package/Scripts/JustMyXaml.ps1 +8 -8
- package/Scripts/Microsoft.ReactNative.Managed.nuspec +23 -30
- package/Scripts/Microsoft.ReactNative.nuspec +16 -17
- package/Scripts/Microsoft.ReactNative.targets +3 -2
- package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +22 -0
- package/Scripts/OfficeReact.Win32.nuspec +23 -9
- package/Scripts/OpenSSL.targets +1 -1
- package/Scripts/StripAdditionalPlatformsFromNuspec.ps1 +1 -1
- package/Scripts/TestServers.ps1 +2 -28
- package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +132 -0
- package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +110 -0
- package/Scripts/Tfs/Make-AnyCPU-RefAssemblies.ps1 +39 -0
- package/Scripts/Tfs/Start-TestServers.ps1 +2 -14
- package/Scripts/Tfs/Stop-TestServers.ps1 +0 -5
- package/Scripts/Tracing/Start-Tracing.ps1 +28 -0
- package/Scripts/Tracing/Stop-Tracing.ps1 +57 -0
- package/Scripts/Tracing/rnw.wprp +27 -0
- package/Scripts/UnitTest.ps1 +3 -3
- package/Scripts/rnw-dependencies.ps1 +485 -143
- package/Scripts/utils.js +1 -1
- package/Shared/AbiSafe.h +3 -3
- package/Shared/BaseFileReaderResource.cpp +89 -0
- package/Shared/BaseFileReaderResource.h +41 -0
- package/Shared/BaseScriptStoreImpl.cpp +69 -25
- package/Shared/BaseScriptStoreImpl.h +2 -2
- package/Shared/BatchingMessageQueueThread.h +3 -0
- package/Shared/ChakraRuntimeHolder.cpp +5 -3
- package/Shared/ChakraRuntimeHolder.h +4 -3
- package/Shared/CppRuntimeOptions.h +50 -0
- package/Shared/CreateInstance.h +25 -0
- package/Shared/CreateModules.h +46 -14
- package/Shared/CxxMessageQueue.cpp +1 -1
- package/Shared/DevServerHelper.h +33 -6
- package/Shared/DevSettings.h +30 -25
- package/Shared/DevSupportManager.cpp +64 -15
- package/Shared/DevSupportManager.h +27 -1
- package/Shared/Executors/WebSocketJSExecutor.cpp +17 -22
- package/Shared/Executors/WebSocketJSExecutor.h +2 -6
- package/Shared/Executors/WebSocketJSExecutorFactory.cpp +2 -1
- package/Shared/Hasher.cpp +64 -0
- package/Shared/Hasher.h +24 -0
- package/Shared/HermesRuntimeHolder.cpp +397 -17
- package/Shared/HermesRuntimeHolder.h +59 -12
- package/Shared/HermesSamplingProfiler.cpp +115 -0
- package/Shared/HermesSamplingProfiler.h +26 -0
- package/Shared/IBlobPersistor.h +30 -0
- package/Shared/IDevSupportManager.h +7 -2
- package/Shared/IFileReaderResource.h +36 -0
- package/Shared/IReactRootView.h +0 -1
- package/Shared/InspectorPackagerConnection.cpp +235 -0
- package/Shared/InspectorPackagerConnection.h +61 -0
- package/Shared/InstanceManager.cpp +40 -9
- package/Shared/InstanceManager.h +9 -5
- package/Shared/JSI/ChakraApi.cpp +436 -0
- package/Shared/JSI/ChakraApi.h +474 -0
- package/Shared/JSI/ChakraJsiRuntime_edgemode.cpp +100 -0
- package/Shared/JSI/ChakraRuntime.cpp +1128 -0
- package/Shared/JSI/ChakraRuntime.h +510 -0
- package/Shared/JSI/ChakraRuntimeArgs.h +45 -0
- package/Shared/JSI/ChakraRuntimeFactory.h +15 -0
- package/Shared/JSI/JSExecutorFactoryDelegate.h +12 -0
- package/Shared/JSI/JSExecutorFactorySettings.cpp +30 -0
- package/Shared/JSI/JSExecutorFactorySettings.h +21 -0
- package/Shared/JSI/RuntimeHolder.h +28 -0
- package/Shared/JSI/ScriptStore.h +77 -0
- package/Shared/JSI/V8RuntimeHolder.cpp +260 -0
- package/Shared/JSI/V8RuntimeHolder.h +37 -0
- package/Shared/Logging.cpp +1 -1
- package/Shared/MemoryMappedBuffer.cpp +2 -36
- package/Shared/MemoryMappedBuffer.h +1 -1
- package/Shared/Modules/BlobCollector.cpp +21 -0
- package/Shared/Modules/BlobCollector.h +23 -0
- package/Shared/Modules/BlobModule.cpp +191 -0
- package/Shared/Modules/BlobModule.h +91 -0
- package/Shared/Modules/CxxModuleUtilities.cpp +51 -0
- package/Shared/Modules/CxxModuleUtilities.h +40 -0
- package/Shared/Modules/ExceptionsManagerModule.cpp +57 -55
- package/Shared/Modules/FileReaderModule.cpp +218 -0
- package/Shared/Modules/FileReaderModule.h +80 -0
- package/Shared/Modules/HttpModule.cpp +329 -0
- package/Shared/Modules/HttpModule.h +92 -0
- package/Shared/Modules/I18nModule.cpp +3 -2
- package/Shared/Modules/IHttpModuleProxy.h +30 -0
- package/Shared/Modules/IRequestBodyHandler.h +54 -0
- package/Shared/Modules/IResponseHandler.h +27 -0
- package/Shared/Modules/IUriHandler.h +37 -0
- package/Shared/Modules/IWebSocketModuleContentHandler.h +28 -0
- package/Shared/Modules/IWebSocketModuleProxy.h +22 -0
- package/Shared/Modules/NetworkingModule.cpp +2 -5
- package/Shared/Modules/PlatformConstantsModule.cpp +6 -16
- package/Shared/Modules/SourceCodeModule.h +0 -3
- package/Shared/Modules/WebSocketModule.cpp +415 -106
- package/Shared/Modules/WebSocketModule.h +54 -15
- package/Shared/Modules/WebSocketTurboModule.h +71 -0
- package/Shared/Networking/DefaultBlobResource.cpp +331 -0
- package/Shared/Networking/DefaultBlobResource.h +133 -0
- package/Shared/Networking/IBlobResource.h +56 -0
- package/Shared/Networking/IHttpResource.h +229 -0
- package/Shared/Networking/IRedirectEventSource.h +18 -0
- package/Shared/Networking/IWebSocketResource.h +185 -0
- package/Shared/Networking/IWinRTHttpRequestFactory.h +22 -0
- package/Shared/Networking/OriginPolicy.h +15 -0
- package/Shared/Networking/OriginPolicyHttpFilter.cpp +798 -0
- package/Shared/Networking/OriginPolicyHttpFilter.h +123 -0
- package/Shared/Networking/RedirectHttpFilter.cpp +292 -0
- package/Shared/Networking/RedirectHttpFilter.h +97 -0
- package/Shared/Networking/WinRTHttpResource.cpp +692 -0
- package/Shared/Networking/WinRTHttpResource.h +110 -0
- package/Shared/Networking/WinRTTypes.h +33 -0
- package/Shared/Networking/WinRTWebSocketResource.cpp +461 -0
- package/Shared/Networking/WinRTWebSocketResource.h +129 -0
- package/Shared/OInstance.cpp +346 -247
- package/Shared/OInstance.h +31 -17
- package/Shared/PackagerConnection.cpp +7 -5
- package/Shared/PackagerConnection.h +2 -2
- package/Shared/RuntimeOptions.cpp +126 -0
- package/Shared/RuntimeOptions.h +32 -8
- package/Shared/SafeLoadLibrary.cpp +77 -0
- package/Shared/SafeLoadLibrary.h +19 -0
- package/Shared/Shared.vcxitems +566 -32
- package/Shared/Shared.vcxitems.filters +596 -99
- package/Shared/SystemChakraRuntime.h +38 -0
- package/Shared/Threading/BatchingQueueThread.cpp +73 -25
- package/Shared/Threading/BatchingQueueThread.h +30 -15
- package/Shared/Threading/MessageDispatchQueue.cpp +83 -4
- package/Shared/Threading/MessageDispatchQueue.h +31 -0
- package/Shared/Threading/MessageQueueThreadFactory.cpp +2 -2
- package/Shared/Threading/MessageQueueThreadFactory.h +3 -3
- package/Shared/TurboModuleManager.cpp +1 -1
- package/Shared/Utils/CppWinrtLessExceptions.h +10 -4
- package/Shared/Utils/WinRTConversions.cpp +22 -0
- package/Shared/Utils/WinRTConversions.h +15 -0
- package/Shared/Utils.cpp +58 -1
- package/Shared/Utils.h +3 -0
- package/Shared/V8JSIRuntimeHolder.cpp +13 -133
- package/Shared/V8JSIRuntimeHolder.h +14 -6
- package/Shared/WebSocketJSExecutorFactory.h +1 -0
- package/Shared/tracing/fbsystrace.h +3 -3
- package/Shared/tracing/tracing.cpp +105 -34
- package/Shared/tracing/tracing.h +20 -0
- package/codegen/.clang-format +2 -0
- package/codegen/NativeAccessibilityInfoSpec.g.h +27 -14
- package/codegen/NativeAccessibilityManagerSpec.g.h +89 -32
- package/codegen/NativeActionSheetManagerSpec.g.h +85 -7
- package/codegen/NativeAlertManagerSpec.g.h +34 -4
- package/codegen/NativeAnimatedModuleSpec.g.h +122 -83
- package/codegen/NativeAnimatedTurboModuleSpec.g.h +122 -83
- package/codegen/NativeAnimationsDebugModuleSpec.g.h +6 -5
- package/codegen/NativeAppStateSpec.g.h +31 -8
- package/codegen/NativeAppThemeSpec.g.h +68 -0
- package/codegen/NativeAppearanceSpec.g.h +18 -11
- package/codegen/NativeBlobModuleSpec.g.h +29 -15
- package/codegen/NativeBugReportingSpec.g.h +7 -12
- package/codegen/NativeClipboardSpec.g.h +7 -6
- package/codegen/NativeDevLoadingViewSpec.g.h +7 -6
- package/codegen/NativeDevMenuSpec.g.h +12 -11
- package/codegen/NativeDevSettingsSpec.g.h +24 -23
- package/codegen/NativeDevToolsSettingsManagerSpec.g.h +52 -0
- package/codegen/NativeDeviceEventManagerSpec.g.h +4 -3
- package/codegen/NativeDeviceInfoSpec.g.h +68 -1
- package/codegen/NativeDialogManagerAndroidSpec.g.h +57 -4
- package/codegen/NativeDialogManagerWindowsSpec.g.h +90 -0
- package/codegen/NativeExceptionsManagerSpec.g.h +60 -15
- package/codegen/NativeFileReaderModuleSpec.g.h +8 -7
- package/codegen/NativeFrameRateLoggerSpec.g.h +22 -10
- package/codegen/NativeHeadlessJsTaskSupportSpec.g.h +7 -6
- package/codegen/NativeI18nManagerSpec.g.h +23 -7
- package/codegen/NativeImageEditorSpec.g.h +63 -4
- package/codegen/NativeImageLoaderAndroidSpec.g.h +29 -15
- package/codegen/NativeImageLoaderIOSSpec.g.h +30 -16
- package/codegen/NativeImageStoreAndroidSpec.g.h +5 -4
- package/codegen/NativeImageStoreIOSSpec.g.h +35 -12
- package/codegen/NativeIntentAndroidSpec.g.h +17 -16
- package/codegen/NativeIntersectionObserverSpec.g.h +96 -0
- package/codegen/NativeJSCHeapCaptureSpec.g.h +5 -4
- package/codegen/NativeJSCSamplingProfilerSpec.g.h +5 -4
- package/codegen/NativeKeyboardObserverSpec.g.h +6 -5
- package/codegen/NativeLinkingManagerSpec.g.h +18 -17
- package/codegen/NativeLogBoxSpec.g.h +6 -5
- package/codegen/NativeModalManagerSpec.g.h +6 -5
- package/codegen/NativeMutationObserverSpec.g.h +90 -0
- package/codegen/NativeNetworkingAndroidSpec.g.h +14 -13
- package/codegen/NativeNetworkingIOSSpec.g.h +39 -13
- package/codegen/NativePerformanceObserverSpec.g.h +130 -0
- package/codegen/NativePerformanceSpec.g.h +52 -0
- package/codegen/NativePermissionsAndroidSpec.g.h +14 -13
- package/codegen/NativePlatformConstantsAndroidSpec.g.h +54 -3
- package/codegen/NativePlatformConstantsIOSSpec.g.h +44 -1
- package/codegen/NativePlatformConstantsWinSpec.g.h +53 -1
- package/codegen/NativePushNotificationManagerIOSSpec.g.h +112 -48
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +100 -0
- package/codegen/NativeRedBoxSpec.g.h +7 -6
- package/codegen/NativeSampleTurboModuleSpec.g.h +110 -36
- package/codegen/NativeSegmentFetcherSpec.g.h +8 -7
- package/codegen/NativeSettingsManagerSpec.g.h +29 -7
- package/codegen/NativeShareModuleSpec.g.h +29 -4
- package/codegen/NativeSoundManagerSpec.g.h +4 -3
- package/codegen/NativeSourceCodeSpec.g.h +13 -1
- package/codegen/NativeStatusBarManagerAndroidSpec.g.h +34 -10
- package/codegen/NativeStatusBarManagerIOSSpec.g.h +50 -15
- package/codegen/NativeTimingSpec.g.h +8 -7
- package/codegen/NativeToastAndroidSpec.g.h +37 -7
- package/codegen/NativeUIManagerSpec.g.h +94 -105
- package/codegen/NativeVibrationSpec.g.h +9 -8
- package/codegen/NativeWebSocketModuleSpec.g.h +28 -16
- package/codegen/react/components/rnwcore/ComponentDescriptors.h +31 -0
- package/codegen/react/components/rnwcore/EventEmitters.cpp +132 -0
- package/codegen/react/components/rnwcore/EventEmitters.h +169 -0
- package/codegen/react/components/rnwcore/Props.cpp +155 -0
- package/codegen/react/components/rnwcore/Props.h +392 -0
- package/codegen/react/components/rnwcore/ShadowNodes.cpp +24 -0
- package/codegen/react/components/rnwcore/ShadowNodes.h +109 -0
- package/codegen/react/components/rnwcore/States.cpp +16 -0
- package/codegen/react/components/rnwcore/States.h +139 -0
- package/codegen/rnwcoreJSI-generated.cpp +2939 -0
- package/codegen/rnwcoreJSI.h +10018 -0
- package/fmt/.clang-format +2 -0
- package/fmt/cgmanifest.json +15 -0
- package/fmt/fmt.vcxproj +153 -0
- package/fmt/fmt.vcxproj.filters +59 -0
- package/fmt/packages.lock.json +13 -0
- package/fmt/pch.cpp +4 -0
- package/fmt/pch.h +2 -0
- package/generate.js +6 -1
- package/include/Include.vcxitems +0 -1
- package/include/Include.vcxitems.filters +1 -4
- package/include/Shared/cdebug.h +43 -34
- package/index.js +319 -233
- package/index.windows.js +335 -253
- package/interface.js +9 -9
- package/jest/MockNativeMethods.js +21 -0
- package/jest/ReactNativeInternalFeatureFlagsMock.js +13 -0
- package/jest/__tests__/setup-test.js +18 -0
- package/jest/assetFileTransformer.js +32 -0
- package/jest/local-setup.js +28 -0
- package/jest/mockComponent.js +64 -0
- package/jest/mockModal.js +34 -0
- package/jest/mockNativeComponent.js +40 -0
- package/jest/mockScrollView.js +35 -0
- package/jest/react-native-env.js +16 -0
- package/jest/renderer.js +30 -0
- package/jest/setup.js +411 -0
- package/just-task.js +25 -35
- package/metro.config.js +3 -62
- package/package.json +75 -60
- package/react-native.config.js +47 -10
- package/rn-get-polyfills.js +2 -2
- package/src/private/core/setUpDOM.js +18 -0
- package/src/private/featureflags/NativeReactNativeFeatureFlags.js +44 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +150 -0
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +101 -0
- package/src/private/specs/components/ActivityIndicatorViewNativeComponent.js +53 -0
- package/src/private/specs/components/AndroidDrawerLayoutNativeComponent.js +124 -0
- package/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js +26 -0
- package/src/private/specs/components/AndroidSwipeRefreshLayoutNativeComponent.js +74 -0
- package/src/private/specs/components/AndroidSwitchNativeComponent.js +62 -0
- package/src/private/specs/components/DebuggingOverlayNativeComponent.js +61 -0
- package/src/private/specs/components/ProgressBarAndroidNativeComponent.js +36 -0
- package/src/private/specs/components/PullToRefreshViewNativeComponent.js +71 -0
- package/src/private/specs/components/RCTInputAccessoryViewNativeComponent.js +26 -0
- package/src/private/specs/components/RCTModalHostViewNativeComponent.js +139 -0
- package/src/private/specs/components/RCTSafeAreaViewNativeComponent.js +25 -0
- package/src/private/specs/components/SwitchNativeComponent.js +61 -0
- package/src/private/specs/components/UnimplementedNativeViewNativeComponent.js +26 -0
- package/src/private/specs/modules/NativeAccessibilityInfo.js +33 -0
- package/src/private/specs/modules/NativeAccessibilityManager.js +66 -0
- package/src/private/specs/modules/NativeActionSheetManager.js +54 -0
- package/src/private/specs/modules/NativeAlertManager.js +35 -0
- package/src/private/specs/modules/NativeAnimatedModule.js +77 -0
- package/src/private/specs/modules/NativeAnimatedTurboModule.js +78 -0
- package/src/private/specs/modules/NativeAnimationsDebugModule.js +20 -0
- package/src/private/specs/modules/NativeAppState.js +33 -0
- package/src/private/specs/modules/NativeAppTheme.js +33 -0
- package/src/private/specs/modules/NativeAppearance.js +36 -0
- package/src/private/specs/modules/NativeBlobModule.js +61 -0
- package/src/private/specs/modules/NativeBugReporting.js +20 -0
- package/src/private/specs/modules/NativeClipboard.js +21 -0
- package/src/private/specs/modules/NativeDevLoadingView.js +24 -0
- package/src/private/specs/modules/NativeDevMenu.js +23 -0
- package/src/private/specs/modules/NativeDevSettings.js +33 -0
- package/src/private/specs/modules/NativeDevToolsSettingsManager.js +24 -0
- package/src/private/specs/modules/NativeDeviceEventManager.js +19 -0
- package/src/private/specs/modules/NativeDeviceInfo.js +58 -0
- package/src/private/specs/modules/NativeDialogManagerAndroid.js +48 -0
- package/src/private/specs/modules/NativeDialogManagerWindows.js +51 -0
- package/src/private/specs/modules/NativeExceptionsManager.js +103 -0
- package/src/private/specs/modules/NativeFileReaderModule.js +22 -0
- package/src/private/specs/modules/NativeFrameRateLogger.js +22 -0
- package/src/private/specs/modules/NativeHeadlessJsTaskSupport.js +20 -0
- package/src/private/specs/modules/NativeI18nManager.js +28 -0
- package/src/private/specs/modules/NativeImageEditor.js +52 -0
- package/src/private/specs/modules/NativeImageLoaderAndroid.js +30 -0
- package/src/private/specs/modules/NativeImageLoaderIOS.js +37 -0
- package/src/private/specs/modules/NativeImageStoreAndroid.js +26 -0
- package/src/private/specs/modules/NativeImageStoreIOS.js +33 -0
- package/src/private/specs/modules/NativeIntentAndroid.js +30 -0
- package/src/private/specs/modules/NativeIntersectionObserver.js +41 -0
- package/src/private/specs/modules/NativeJSCHeapCapture.js +19 -0
- package/src/private/specs/modules/NativeJSCSamplingProfiler.js +19 -0
- package/src/private/specs/modules/NativeKeyboardObserver.js +20 -0
- package/src/private/specs/modules/NativeLinkingManager.js +27 -0
- package/src/private/specs/modules/NativeLogBox.js +20 -0
- package/src/private/specs/modules/NativeModalManager.js +21 -0
- package/src/private/specs/modules/NativeMutationObserver.js +58 -0
- package/src/private/specs/modules/NativeNetworkingAndroid.js +37 -0
- package/src/private/specs/modules/NativeNetworkingIOS.js +37 -0
- package/src/private/specs/modules/NativePermissionsAndroid.js +77 -0
- package/src/private/specs/modules/NativePlatformConstantsAndroid.js +44 -0
- package/src/private/specs/modules/NativePlatformConstantsIOS.js +37 -0
- package/src/private/specs/modules/NativePlatformConstantsWin.js +38 -0
- package/src/private/specs/modules/NativePushNotificationManagerIOS.js +103 -0
- package/src/private/specs/modules/NativeRedBox.js +20 -0
- package/src/private/specs/modules/NativeSampleTurboModule.js +53 -0
- package/src/private/specs/modules/NativeSegmentFetcher.js +28 -0
- package/src/private/specs/modules/NativeSettingsManager.js +25 -0
- package/src/private/specs/modules/NativeShareModule.js +23 -0
- package/src/private/specs/modules/NativeSoundManager.js +22 -0
- package/src/private/specs/modules/NativeSourceCode.js +36 -0
- package/src/private/specs/modules/NativeStatusBarManagerAndroid.js +68 -0
- package/src/private/specs/modules/NativeStatusBarManagerIOS.js +89 -0
- package/src/private/specs/modules/NativeTiming.js +26 -0
- package/src/private/specs/modules/NativeToastAndroid.js +38 -0
- package/src/private/specs/modules/NativeUIManager.js +118 -0
- package/src/private/specs/modules/NativeVibration.js +24 -0
- package/src/private/specs/modules/NativeWebSocketModule.js +34 -0
- package/src/private/webapis/dom/geometry/DOMRect.js +82 -0
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +188 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +192 -0
- package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +72 -0
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +275 -0
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +363 -0
- package/src/private/webapis/dom/nodes/ReadOnlyText.js +30 -0
- package/src/private/webapis/dom/nodes/utilities/Traversal.js +54 -0
- package/src/private/webapis/dom/oldstylecollections/ArrayLikeUtils.js +46 -0
- package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +76 -0
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +82 -0
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +104 -0
- package/src/private/webapis/performance/EventCounts.js +78 -0
- package/src/private/webapis/performance/MemoryInfo.js +54 -0
- package/src/private/webapis/performance/NativePerformance.js +33 -0
- package/src/private/webapis/performance/NativePerformanceObserver.js +61 -0
- package/src/private/webapis/performance/Performance.js +339 -0
- package/src/private/webapis/performance/PerformanceEntry.js +53 -0
- package/src/private/webapis/performance/PerformanceEventTiming.js +55 -0
- package/src/private/webapis/performance/PerformanceObserver.js +337 -0
- package/src/private/webapis/performance/RawPerformanceEntry.js +87 -0
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +91 -0
- package/src/private/webapis/performance/__mocks__/NativePerformance.js +67 -0
- package/src/private/webapis/performance/__mocks__/NativePerformanceObserver.js +128 -0
- package/stubs/double-conversion/double-conversion.h +23 -6
- package/stubs/glog/logging.h +7 -0
- package/template/.clang-format +4 -0
- package/template/cpp-app/proj/MyApp.sln +21 -52
- package/template/cpp-app/proj/MyApp.vcxproj +12 -57
- package/template/cpp-app/proj/MyApp.vcxproj.filters +1 -2
- package/template/cpp-app/src/App.cpp +23 -10
- package/template/cpp-app/src/App.h +5 -9
- package/template/cpp-app/src/MainPage.cpp +1 -5
- package/template/cpp-app/src/MainPage.h +0 -2
- package/template/cpp-app/src/MainPage.idl +3 -1
- package/template/cpp-app/src/PropertySheet.props +3 -3
- package/template/cpp-app/src/ReactPackageProvider.cpp +1 -4
- package/template/cpp-app/src/ReactPackageProvider.h +0 -2
- package/template/cpp-app/src/pch.h +6 -9
- package/template/cpp-lib/proj/MyLib.sln +21 -52
- package/template/cpp-lib/proj/MyLib.vcxproj +19 -50
- package/template/cpp-lib/proj/MyLib.vcxproj.filters +1 -2
- package/template/cpp-lib/src/PropertySheet.props +3 -3
- package/template/cpp-lib/src/ReactNativeModule.h +0 -4
- package/template/cpp-lib/src/ReactPackageProvider.cpp +1 -4
- package/template/cpp-lib/src/ReactPackageProvider.h +0 -3
- package/template/cpp-lib/src/pch.h +4 -9
- package/template/cs-app/proj/MyApp.csproj +18 -47
- package/template/cs-app/proj/MyApp.sln +21 -60
- package/template/cs-app/src/App.xaml.cs +22 -11
- package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
- package/template/cs-app/src/MainPage.xaml.cs +8 -7
- package/template/cs-lib/proj/MyLib.csproj +17 -35
- package/template/cs-lib/proj/MyLib.sln +21 -60
- package/template/metro.config.js +22 -8
- package/template/metro.devMode.config.js +33 -18
- package/template/shared-app/proj/ExperimentalFeatures.props +40 -0
- package/template/shared-app/proj/NuGet_Config +19 -0
- package/template/shared-app/src/MainPage.xaml +1 -1
- package/template/shared-lib/proj/ExperimentalFeatures.props +40 -0
- package/template/shared-lib/proj/NuGet_Config +17 -0
- package/templates/.clang-format +4 -0
- package/templates/cpp-app/jest.config.windows.js +3 -0
- package/templates/cpp-app/metro.config.js +54 -0
- package/templates/cpp-app/template.config.js +134 -0
- package/templates/cpp-app/windows/ExperimentalFeatures.props +11 -0
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +13 -0
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +10 -0
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +164 -0
- package/templates/cpp-app/windows/MyApp/MyApp.h +3 -0
- package/templates/cpp-app/windows/MyApp/MyApp.ico +0 -0
- package/templates/cpp-app/windows/MyApp/MyApp.rc +0 -0
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +143 -0
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj.filters +58 -0
- package/templates/cpp-app/windows/MyApp/_gitignore +1 -0
- package/templates/cpp-app/windows/MyApp/pch.cpp +1 -0
- package/templates/cpp-app/windows/MyApp/pch.h +38 -0
- package/templates/cpp-app/windows/MyApp/resource.h +17 -0
- package/templates/cpp-app/windows/MyApp/small.ico +0 -0
- package/templates/cpp-app/windows/MyApp/targetver.h +8 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/LockScreenLogo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/SplashScreen.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Square150x150Logo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Square44x44Logo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/StoreLogo.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Wide310x150Logo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/MyApp.Package.wapproj +78 -0
- package/templates/cpp-app/windows/MyApp.Package/Package.appxmanifest +49 -0
- package/templates/cpp-app/windows/MyApp.sln +176 -0
- package/templates/cpp-app/windows/_gitignore +41 -0
- package/templates/cpp-lib/example/metro.config.js +74 -0
- package/templates/cpp-lib/template.config.js +235 -0
- package/templates/cpp-lib/windows/ExperimentalFeatures.props +11 -0
- package/templates/cpp-lib/windows/MyLib/MyLib.cpp +18 -0
- package/templates/cpp-lib/windows/MyLib/MyLib.def +3 -0
- package/templates/cpp-lib/windows/MyLib/MyLib.h +31 -0
- package/templates/cpp-lib/windows/MyLib/MyLib.rc +0 -0
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +148 -0
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj.filters +44 -0
- package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.cpp +20 -0
- package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.h +24 -0
- package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.idl +9 -0
- package/templates/cpp-lib/windows/MyLib/pch.cpp +1 -0
- package/templates/cpp-lib/windows/MyLib/pch.h +30 -0
- package/templates/cpp-lib/windows/MyLib/resource.h +5 -0
- package/templates/cpp-lib/windows/MyLib/targetver.h +8 -0
- package/templates/cpp-lib/windows/MyLib.sln +156 -0
- package/templates/cpp-lib/windows/_gitignore +41 -0
- package/templates/old/generateWrapper.js +67 -0
- package/templates/old/uwp-cpp-app/template.config.js +15 -0
- package/templates/old/uwp-cpp-lib/template.config.js +15 -0
- package/templates/old/uwp-cs-app/template.config.js +15 -0
- package/templates/old/uwp-cs-lib/template.config.js +15 -0
- package/templates/templateUtils.js +137 -0
- package/types/experimental.d.ts +145 -0
- package/types/index.d.ts +217 -0
- package/types/modules/BatchedBridge.d.ts +32 -0
- package/types/modules/Codegen.d.ts +74 -0
- package/types/modules/Devtools.d.ts +32 -0
- package/types/modules/LaunchScreen.d.ts +18 -0
- package/types/modules/globals.d.ts +599 -0
- package/types/private/TimerMixin.d.ts +19 -0
- package/types/private/Utilities.d.ts +10 -0
- package/types/public/DeprecatedPropertiesAlias.d.ts +185 -0
- package/types/public/Insets.d.ts +15 -0
- package/types/public/ReactNativeRenderer.d.ts +144 -0
- package/types/public/ReactNativeTypes.d.ts +143 -0
- package/CHANGELOG.json +0 -10261
- package/CHANGELOG.md +0 -3715
- package/Chakra/ChakraCoreDebugger.h +0 -147
- package/Chakra/ChakraExecutor.cpp +0 -802
- package/Chakra/ChakraExecutor.h +0 -163
- package/Chakra/ChakraNativeModules.cpp +0 -67
- package/Chakra/ChakraNativeModules.h +0 -36
- package/Folly/TEMP_UntilFollyUpdate/portability/Builtins.h +0 -153
- package/Folly/packages.config +0 -4
- package/JSI/Desktop/ChakraJsiRuntime_core.cpp +0 -328
- package/JSI/Desktop/JSI.Desktop.vcxproj +0 -97
- package/JSI/Desktop/JSI.Desktop.vcxproj.filters +0 -19
- package/JSI/Desktop/packages.config +0 -6
- package/JSI/Shared/ChakraApi.cpp +0 -458
- package/JSI/Shared/ChakraApi.h +0 -478
- package/JSI/Shared/ChakraRuntime.cpp +0 -972
- package/JSI/Shared/ChakraRuntime.h +0 -501
- package/JSI/Shared/ChakraRuntimeArgs.h +0 -50
- package/JSI/Shared/ChakraRuntimeFactory.h +0 -14
- package/JSI/Shared/JSI.Shared.vcxitems +0 -29
- package/JSI/Shared/JSI.Shared.vcxitems.filters +0 -42
- package/JSI/Shared/RuntimeHolder.h +0 -21
- package/JSI/Shared/ScriptStore.h +0 -79
- package/JSI/Universal/ChakraJsiRuntime_edgemode.cpp +0 -90
- package/JSI/Universal/JSI.Universal.vcxproj +0 -100
- package/JSI/Universal/JSI.Universal.vcxproj.filters +0 -16
- package/Libraries/AppTheme/AppTheme.d.ts +0 -25
- package/Libraries/AppTheme/AppTheme.d.ts.map +0 -1
- package/Libraries/AppTheme/AppTheme.js.map +0 -1
- package/Libraries/AppTheme/AppThemeTypes.d.ts.map +0 -1
- package/Libraries/AppTheme/AppThemeTypes.js +0 -8
- package/Libraries/AppTheme/AppThemeTypes.js.map +0 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js +0 -158
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.ios.js +0 -273
- package/Libraries/Components/DatePicker/DatePicker.d.ts +0 -11
- package/Libraries/Components/DatePicker/DatePicker.d.ts.map +0 -1
- package/Libraries/Components/DatePicker/DatePicker.js +0 -96
- package/Libraries/Components/DatePicker/DatePicker.js.map +0 -1
- package/Libraries/Components/DatePicker/DatePickerIOS.android.js +0 -46
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +0 -189
- package/Libraries/Components/DatePicker/DatePickerIOS.windows.js +0 -8
- package/Libraries/Components/DatePicker/DatePickerProps.d.ts +0 -33
- package/Libraries/Components/DatePicker/DatePickerProps.d.ts.map +0 -1
- package/Libraries/Components/DatePicker/DatePickerProps.js +0 -16
- package/Libraries/Components/DatePicker/DatePickerProps.js.map +0 -1
- package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +0 -60
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -89
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.windows.js +0 -8
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
- package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +0 -22
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +0 -12
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.windows.js +0 -8
- package/Libraries/Components/Flyout/Flyout.d.ts.map +0 -1
- package/Libraries/Components/Flyout/Flyout.js.map +0 -1
- package/Libraries/Components/Flyout/FlyoutProps.d.ts +0 -22
- package/Libraries/Components/Flyout/FlyoutProps.d.ts.map +0 -1
- package/Libraries/Components/Flyout/FlyoutProps.js +0 -3
- package/Libraries/Components/Flyout/FlyoutProps.js.map +0 -1
- package/Libraries/Components/Glyph/Glyph.d.ts.map +0 -1
- package/Libraries/Components/Glyph/Glyph.js.map +0 -1
- package/Libraries/Components/Glyph/GlyphProps.d.ts +0 -17
- package/Libraries/Components/Glyph/GlyphProps.d.ts.map +0 -1
- package/Libraries/Components/Glyph/GlyphProps.js +0 -8
- package/Libraries/Components/Glyph/GlyphProps.js.map +0 -1
- package/Libraries/Components/Keyboard/KeyboardExt.d.ts.map +0 -1
- package/Libraries/Components/Keyboard/KeyboardExtProps.d.ts.map +0 -1
- package/Libraries/Components/MaskedView/MaskedViewIOS.android.js +0 -13
- package/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +0 -93
- package/Libraries/Components/MaskedView/MaskedViewIOS.windows.js +0 -9
- package/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +0 -21
- package/Libraries/Components/Picker/AndroidDialogPickerNativeComponent.js +0 -82
- package/Libraries/Components/Picker/AndroidDialogPickerViewConfig.js +0 -30
- package/Libraries/Components/Picker/AndroidDropdownPickerNativeComponent.js +0 -69
- package/Libraries/Components/Picker/Picker.js +0 -165
- package/Libraries/Components/Picker/Picker.windows.js +0 -170
- package/Libraries/Components/Picker/PickerAndroid.android.js +0 -145
- package/Libraries/Components/Picker/PickerAndroid.ios.js +0 -12
- package/Libraries/Components/Picker/PickerAndroid.windows.js +0 -8
- package/Libraries/Components/Picker/PickerIOS.android.js +0 -14
- package/Libraries/Components/Picker/PickerIOS.ios.js +0 -164
- package/Libraries/Components/Picker/PickerIOS.windows.js +0 -8
- package/Libraries/Components/Picker/PickerProps.d.ts +0 -30
- package/Libraries/Components/Picker/PickerProps.d.ts.map +0 -1
- package/Libraries/Components/Picker/PickerProps.js +0 -8
- package/Libraries/Components/Picker/PickerProps.js.map +0 -1
- package/Libraries/Components/Picker/PickerWindows.d.ts +0 -38
- package/Libraries/Components/Picker/PickerWindows.d.ts.map +0 -1
- package/Libraries/Components/Picker/PickerWindows.js +0 -118
- package/Libraries/Components/Picker/PickerWindows.js.map +0 -1
- package/Libraries/Components/Picker/RCTPickerNativeComponent.js +0 -72
- package/Libraries/Components/Picker/RCTPickerViewConfig.js +0 -41
- package/Libraries/Components/Popup/Popup.d.ts.map +0 -1
- package/Libraries/Components/Popup/Popup.js.map +0 -1
- package/Libraries/Components/Popup/PopupProps.d.ts +0 -27
- package/Libraries/Components/Popup/PopupProps.d.ts.map +0 -1
- package/Libraries/Components/Popup/PopupProps.js +0 -8
- package/Libraries/Components/Popup/PopupProps.js.map +0 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.ios.js +0 -12
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.windows.js +0 -8
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +0 -46
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +0 -77
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.windows.js +0 -8
- package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +0 -35
- package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +0 -63
- package/Libraries/Components/ScrollResponder.js +0 -772
- package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +0 -75
- package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -46
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -46
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.windows.js +0 -8
- package/Libraries/Components/Slider/Slider.js +0 -273
- package/Libraries/Components/Slider/SliderNativeComponent.js +0 -60
- package/Libraries/Components/StaticContainer.react.js +0 -51
- package/Libraries/Components/StatusBar/StatusBarIOS.js +0 -21
- package/Libraries/Components/TextInput/AndroidTextInputViewConfig.js +0 -114
- package/Libraries/Components/TextInput/RCTSinglelineTextInputViewConfig.js +0 -134
- package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +0 -37
- package/Libraries/Components/ToastAndroid/ToastAndroid.windows.js +0 -37
- package/Libraries/Components/Touchable/__mocks__/ensureComponentIsNative.js +0 -12
- package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -26
- package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -347
- package/Libraries/Components/View/ReactNativeViewViewConfig.windows.js +0 -377
- package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
- package/Libraries/Components/View/ViewWindows.d.ts +0 -20
- package/Libraries/Components/View/ViewWindows.d.ts.map +0 -1
- package/Libraries/Components/View/ViewWindows.js +0 -30
- package/Libraries/Components/View/ViewWindows.js.map +0 -1
- package/Libraries/Components/View/ViewWindowsProps.d.ts +0 -30
- package/Libraries/Components/View/ViewWindowsProps.d.ts.map +0 -1
- package/Libraries/Components/View/ViewWindowsProps.js +0 -8
- package/Libraries/Components/View/ViewWindowsProps.js.map +0 -1
- package/Libraries/Core/setUpSystrace.js +0 -21
- package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +0 -76
- package/Libraries/DeprecatedPropTypes/DeprecatedEdgeInsetsPropType.js +0 -28
- package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.js +0 -82
- package/Libraries/DeprecatedPropTypes/DeprecatedImageSourcePropType.js +0 -40
- package/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes.js +0 -76
- package/Libraries/DeprecatedPropTypes/DeprecatedLayoutPropTypes.js +0 -233
- package/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js +0 -24
- package/Libraries/DeprecatedPropTypes/DeprecatedShadowPropTypesIOS.js +0 -30
- package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +0 -32
- package/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +0 -622
- package/Libraries/DeprecatedPropTypes/DeprecatedTextPropTypes.js +0 -158
- package/Libraries/DeprecatedPropTypes/DeprecatedTextStylePropTypes.js +0 -157
- package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +0 -99
- package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +0 -44
- package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.windows.js +0 -71
- package/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +0 -408
- package/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js +0 -68
- package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +0 -86
- package/Libraries/Image/ImagePickerIOS.js +0 -105
- package/Libraries/Image/ImageViewViewConfig.js +0 -68
- package/Libraries/Image/NativeImagePickerIOS.js +0 -40
- package/Libraries/Interaction/Batchinator.js +0 -76
- package/Libraries/Interaction/BridgeSpyStallHandler.js +0 -62
- package/Libraries/Interaction/InteractionMixin.js +0 -55
- package/Libraries/Interaction/InteractionStallDebugger.js +0 -23
- package/Libraries/Network/RCTNetworkingWinShared.js +0 -69
- package/Libraries/Performance/PureComponentDebug.js +0 -73
- package/Libraries/Performance/QuickPerformanceLogger.js +0 -101
- package/Libraries/ReactNative/DummyUIManager.js +0 -122
- package/Libraries/ReactNative/queryLayoutByID.js +0 -58
- package/Libraries/Reliability/UserFlow.js +0 -136
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -21758
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -7714
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8009
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -22404
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -7938
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -8230
- package/Libraries/Settings/Settings.android.js +0 -33
- package/Libraries/Settings/Settings.windows.js +0 -28
- package/Libraries/Storage/AsyncStorage.js +0 -361
- package/Libraries/Storage/NativeAsyncLocalStorage.js +0 -43
- package/Libraries/Storage/NativeAsyncSQLiteDBStorage.js +0 -43
- package/Libraries/StyleSheet/StyleSheetValidation.js +0 -100
- package/Libraries/Text/TextInjection.js +0 -17
- package/Libraries/Utilities/JSDevSupportModule.js +0 -40
- package/Libraries/Utilities/MatrixMath.js +0 -748
- package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -20
- package/Libraries/Utilities/NativeJSDevSupport.js +0 -25
- package/Libraries/Utilities/buildStyleInterpolator.js +0 -209
- package/Libraries/Utilities/clamp.js +0 -23
- package/Libraries/Utilities/deprecatedPropType.js +0 -38
- package/Libraries/Utilities/groupByEveryN.js +0 -51
- package/Libraries/Utilities/mergeIntoFast.js +0 -26
- package/Libraries/Utilities/registerGeneratedViewConfig.js +0 -83
- package/Libraries/Utilities/setAndForwardRef.js +0 -71
- package/Libraries/Utilities/truncate.js +0 -51
- package/Libraries/promiseRejectionIsError.js +0 -24
- package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -60
- package/Libraries/vendor/emitter/_EventEmitter.js +0 -173
- package/Libraries/vendor/emitter/_EventSubscription.js +0 -40
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -101
- package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +0 -112
- package/Microsoft.ReactNative/Base/CoreNativeModules.h +0 -34
- package/Microsoft.ReactNative/Modules/TimingModule.cpp +0 -215
- package/Microsoft.ReactNative/Modules/TimingModule.h +0 -91
- package/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp +0 -321
- package/Microsoft.ReactNative/Modules/WebSocketModuleUwp.h +0 -28
- package/Microsoft.ReactNative/ReactHost/ReactContext.cpp +0 -190
- package/Microsoft.ReactNative/ReactHost/ReactContext.h +0 -73
- package/Microsoft.ReactNative/Views/DatePickerViewManager.cpp +0 -176
- package/Microsoft.ReactNative/Views/DatePickerViewManager.h +0 -28
- package/Microsoft.ReactNative/Views/PickerViewManager.cpp +0 -212
- package/Microsoft.ReactNative/Views/PickerViewManager.h +0 -29
- package/Microsoft.ReactNative/Views/ReactRootControl.cpp +0 -489
- package/Microsoft.ReactNative/Views/ReactRootControl.h +0 -154
- package/Microsoft.ReactNative/packages.config +0 -12
- package/Microsoft.ReactNative.Cxx/JSI/JsiApi.h +0 -31
- package/PropertySheets/ARM.props +0 -13
- package/PropertySheets/Application/ARM.props +0 -13
- package/PropertySheets/DynamicLibrary/ARM.props +0 -13
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.SourceReferences.targets +0 -20
- package/PropertySheets/StaticLibrary/ARM.props +0 -13
- package/ReactCommon/Yoga.cpp +0 -4424
- package/ReactCommon/packages.config +0 -4
- package/Scripts/Microsoft.ChakraCore.ARM64.nuspec +0 -50
- package/Scripts/Microsoft.ChakraCore.ARM64.targets +0 -15
- package/Scripts/Microsoft.ReactNative.Cxx.NugetSignConfig.xml +0 -6
- package/Scripts/Microsoft.ReactNative.Managed.CodeGen.NugetSignConfig.xml +0 -6
- package/Scripts/Microsoft.ReactNative.Managed.CodeGen.SignConfig.xml +0 -12
- package/Scripts/Microsoft.ReactNative.Managed.NugetSignConfig.xml +0 -6
- package/Scripts/Microsoft.ReactNative.Managed.SignConfig.xml +0 -26
- package/Scripts/Microsoft.ReactNative.NugetSignConfig.xml +0 -6
- package/Scripts/Microsoft.ReactNative.SignConfig.xml +0 -32
- package/Scripts/Tfs/Install-VSFeatures.ps1 +0 -112
- package/Scripts/Tfs/Layout-Headers.ps1 +0 -155
- package/Scripts/copyRNLibraries.js +0 -87
- package/Shared/AsyncStorage/AsyncStorageManager.cpp +0 -149
- package/Shared/AsyncStorage/AsyncStorageManager.h +0 -71
- package/Shared/AsyncStorage/FollyDynamicConverter.cpp +0 -51
- package/Shared/AsyncStorage/FollyDynamicConverter.h +0 -24
- package/Shared/AsyncStorage/KeyValueStorage.cpp +0 -248
- package/Shared/AsyncStorage/KeyValueStorage.h +0 -50
- package/Shared/AsyncStorage/StorageFileIO.cpp +0 -160
- package/Shared/AsyncStorage/StorageFileIO.h +0 -40
- package/Shared/AsyncStorageModule.h +0 -25
- package/Shared/IHttpResource.h +0 -34
- package/Shared/IUIManager.h +0 -90
- package/Shared/IWebSocketResource.h +0 -184
- package/Shared/MemoryTracker.cpp +0 -157
- package/Shared/MemoryTracker.h +0 -141
- package/Shared/Modules/AsyncStorageModule.cpp +0 -91
- package/Shared/Modules/AsyncStorageModuleWin32.cpp +0 -495
- package/Shared/Modules/AsyncStorageModuleWin32.h +0 -75
- package/Shared/WinRTWebSocketResource.cpp +0 -397
- package/Shared/WinRTWebSocketResource.h +0 -138
- package/Shared/cdebug.cpp +0 -7
- package/Shared/etw/build.bat +0 -4
- package/Shared/etw/react_native_windows.h +0 -1275
- package/Shared/etw/react_native_windows.man +0 -86
- package/Shared/etw/react_native_windows_etw_res.dll +0 -0
- package/Shared/etw/register.bat +0 -3
- package/codegen/NativeAsyncLocalStorageSpec.g.h +0 -63
- package/codegen/NativeAsyncSQLiteDBStorageSpec.g.h +0 -63
- package/codegen/NativeDatePickerAndroidSpec.g.h +0 -33
- package/codegen/NativeDevSplitBundleLoaderSpec.g.h +0 -33
- package/codegen/NativeImagePickerIOSSpec.g.h +0 -63
- package/codegen/NativeJSDevSupportSpec.g.h +0 -39
- package/include/Shared/AsyncStorageModuleWin32Config.h +0 -15
- package/include/Shared/ViewManager.h +0 -34
- package/template/cpp-app/keys/MyApp_TemporaryKey.pfx +0 -0
- package/template/cpp-app/proj/packages.config +0 -6
- package/template/cpp-lib/proj/packages.config +0 -6
- package/template/cs-app/keys/MyApp_TemporaryKey.pfx +0 -0
- package/template/shared-app/proj/BuildFlags.props +0 -10
- package/template/shared-app/proj/NuGet.Config +0 -13
- package/template/shared-lib/proj/NuGet.Config +0 -13
- package/typings-index.d.ts +0 -23
- package/typings-index.d.ts.map +0 -1
- package/typings-index.js +0 -42
- package/typings-index.js.map +0 -1
- /package/{JSI/Shared → Shared/JSI}/ByteArrayBuffer.h +0 -0
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict-local
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
const DeprecatedTextInputPropTypes = require('../../DeprecatedPropTypes/DeprecatedTextInputPropTypes');
|
|
14
|
-
const Platform = require('../../Utilities/Platform');
|
|
15
|
-
const React = require('react');
|
|
16
|
-
const StyleSheet = require('../../StyleSheet/StyleSheet');
|
|
17
|
-
const Text = require('../../Text/Text');
|
|
18
|
-
const TextAncestor = require('../../Text/TextAncestor');
|
|
19
|
-
const TextInputState = require('./TextInputState');
|
|
20
|
-
const TouchableWithoutFeedback = require('../Touchable/TouchableWithoutFeedback');
|
|
21
|
-
|
|
22
|
-
const invariant = require('invariant');
|
|
23
|
-
const nullthrows = require('nullthrows');
|
|
24
|
-
const setAndForwardRef = require('../../Utilities/setAndForwardRef');
|
|
25
|
-
|
|
26
|
-
import type {TextStyleProp, ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
|
27
|
-
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
|
28
|
-
import type {ViewProps} from '../View/ViewPropTypes';
|
|
29
|
-
import type {SyntheticEvent, ScrollEvent} from '../../Types/CoreEventTypes';
|
|
30
|
-
import type {PressEvent} from '../../Types/CoreEventTypes';
|
|
31
11
|
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
|
32
|
-
import type {
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
import type {
|
|
13
|
+
PressEvent,
|
|
14
|
+
ScrollEvent,
|
|
15
|
+
SyntheticEvent,
|
|
16
|
+
} from '../../Types/CoreEventTypes';
|
|
17
|
+
import type {ViewProps} from '../View/ViewPropTypes';
|
|
18
|
+
import type {TextInputType} from './TextInput.flow';
|
|
19
|
+
|
|
20
|
+
import usePressability from '../../Pressability/usePressability';
|
|
21
|
+
import flattenStyle from '../../StyleSheet/flattenStyle';
|
|
22
|
+
import StyleSheet, {
|
|
23
|
+
type ColorValue,
|
|
24
|
+
type TextStyleProp,
|
|
25
|
+
type ViewStyleProp,
|
|
26
|
+
} from '../../StyleSheet/StyleSheet';
|
|
27
|
+
import Text from '../../Text/Text';
|
|
28
|
+
import TextAncestor from '../../Text/TextAncestor';
|
|
29
|
+
import Platform from '../../Utilities/Platform';
|
|
30
|
+
import useMergeRefs from '../../Utilities/useMergeRefs';
|
|
31
|
+
import TextInputState from './TextInputState';
|
|
32
|
+
import invariant from 'invariant';
|
|
33
|
+
import nullthrows from 'nullthrows';
|
|
34
|
+
import * as React from 'react';
|
|
35
|
+
import {useCallback, useLayoutEffect, useRef, useState} from 'react';
|
|
35
36
|
|
|
36
37
|
type ReactRefSetter<T> = {current: null | T, ...} | ((ref: null | T) => mixed);
|
|
38
|
+
type TextInputInstance = React.ElementRef<HostComponent<mixed>> & {
|
|
39
|
+
+clear: () => void,
|
|
40
|
+
+isFocused: () => boolean,
|
|
41
|
+
+getNativeRef: () => ?React.ElementRef<HostComponent<mixed>>,
|
|
42
|
+
+setSelection: (start: number, end: number) => void,
|
|
43
|
+
};
|
|
37
44
|
|
|
38
45
|
let AndroidTextInput;
|
|
39
46
|
let AndroidTextInputCommands;
|
|
@@ -44,17 +51,17 @@ let RCTMultilineTextInputNativeCommands;
|
|
|
44
51
|
|
|
45
52
|
if (Platform.OS === 'android') {
|
|
46
53
|
AndroidTextInput = require('./AndroidTextInputNativeComponent').default;
|
|
47
|
-
AndroidTextInputCommands =
|
|
48
|
-
.Commands;
|
|
54
|
+
AndroidTextInputCommands =
|
|
55
|
+
require('./AndroidTextInputNativeComponent').Commands;
|
|
49
56
|
} else if (Platform.OS === 'ios') {
|
|
50
|
-
RCTSinglelineTextInputView =
|
|
51
|
-
.default;
|
|
52
|
-
RCTSinglelineTextInputNativeCommands =
|
|
53
|
-
.Commands;
|
|
54
|
-
RCTMultilineTextInputView =
|
|
55
|
-
.default;
|
|
56
|
-
RCTMultilineTextInputNativeCommands =
|
|
57
|
-
.Commands;
|
|
57
|
+
RCTSinglelineTextInputView =
|
|
58
|
+
require('./RCTSingelineTextInputNativeComponent').default;
|
|
59
|
+
RCTSinglelineTextInputNativeCommands =
|
|
60
|
+
require('./RCTSingelineTextInputNativeComponent').Commands;
|
|
61
|
+
RCTMultilineTextInputView =
|
|
62
|
+
require('./RCTMultilineTextInputNativeComponent').default;
|
|
63
|
+
RCTMultilineTextInputNativeCommands =
|
|
64
|
+
require('./RCTMultilineTextInputNativeComponent').Commands;
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
export type ChangeEvent = SyntheticEvent<
|
|
@@ -130,6 +137,9 @@ type DataDetectorTypesType =
|
|
|
130
137
|
| 'link'
|
|
131
138
|
| 'address'
|
|
132
139
|
| 'calendarEvent'
|
|
140
|
+
| 'trackingNumber'
|
|
141
|
+
| 'flightNumber'
|
|
142
|
+
| 'lookupSuggestion'
|
|
133
143
|
| 'none'
|
|
134
144
|
| 'all';
|
|
135
145
|
|
|
@@ -141,10 +151,10 @@ export type KeyboardType =
|
|
|
141
151
|
| 'phone-pad'
|
|
142
152
|
| 'number-pad'
|
|
143
153
|
| 'decimal-pad'
|
|
154
|
+
| 'url'
|
|
144
155
|
// iOS-only
|
|
145
156
|
| 'ascii-capable'
|
|
146
157
|
| 'numbers-and-punctuation'
|
|
147
|
-
| 'url'
|
|
148
158
|
| 'name-phone-pad'
|
|
149
159
|
| 'twitter'
|
|
150
160
|
| 'web-search'
|
|
@@ -153,6 +163,16 @@ export type KeyboardType =
|
|
|
153
163
|
// Android-only
|
|
154
164
|
| 'visible-password';
|
|
155
165
|
|
|
166
|
+
export type InputMode =
|
|
167
|
+
| 'none'
|
|
168
|
+
| 'text'
|
|
169
|
+
| 'decimal'
|
|
170
|
+
| 'numeric'
|
|
171
|
+
| 'tel'
|
|
172
|
+
| 'search'
|
|
173
|
+
| 'email'
|
|
174
|
+
| 'url';
|
|
175
|
+
|
|
156
176
|
export type ReturnKeyType =
|
|
157
177
|
// Cross Platform
|
|
158
178
|
| 'done'
|
|
@@ -171,6 +191,8 @@ export type ReturnKeyType =
|
|
|
171
191
|
| 'route'
|
|
172
192
|
| 'yahoo';
|
|
173
193
|
|
|
194
|
+
export type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';
|
|
195
|
+
|
|
174
196
|
export type AutoCapitalize = 'none' | 'sentences' | 'words' | 'characters';
|
|
175
197
|
|
|
176
198
|
export type TextContentType =
|
|
@@ -181,6 +203,15 @@ export type TextContentType =
|
|
|
181
203
|
| 'addressState'
|
|
182
204
|
| 'countryName'
|
|
183
205
|
| 'creditCardNumber'
|
|
206
|
+
| 'creditCardExpiration'
|
|
207
|
+
| 'creditCardExpirationMonth'
|
|
208
|
+
| 'creditCardExpirationYear'
|
|
209
|
+
| 'creditCardSecurityCode'
|
|
210
|
+
| 'creditCardType'
|
|
211
|
+
| 'creditCardName'
|
|
212
|
+
| 'creditCardGivenName'
|
|
213
|
+
| 'creditCardMiddleName'
|
|
214
|
+
| 'creditCardFamilyName'
|
|
184
215
|
| 'emailAddress'
|
|
185
216
|
| 'familyName'
|
|
186
217
|
| 'fullStreetAddress'
|
|
@@ -201,31 +232,27 @@ export type TextContentType =
|
|
|
201
232
|
| 'username'
|
|
202
233
|
| 'password'
|
|
203
234
|
| 'newPassword'
|
|
204
|
-
| 'oneTimeCode'
|
|
235
|
+
| 'oneTimeCode'
|
|
236
|
+
| 'birthdate'
|
|
237
|
+
| 'birthdateDay'
|
|
238
|
+
| 'birthdateMonth'
|
|
239
|
+
| 'birthdateYear';
|
|
240
|
+
|
|
241
|
+
export type enterKeyHintType =
|
|
242
|
+
// Cross Platform
|
|
243
|
+
| 'done'
|
|
244
|
+
| 'go'
|
|
245
|
+
| 'next'
|
|
246
|
+
| 'search'
|
|
247
|
+
| 'send'
|
|
248
|
+
// Android-only
|
|
249
|
+
| 'previous'
|
|
250
|
+
// iOS-only
|
|
251
|
+
| 'enter';
|
|
205
252
|
|
|
206
253
|
type PasswordRules = string;
|
|
207
254
|
|
|
208
255
|
type IOSProps = $ReadOnly<{|
|
|
209
|
-
/**
|
|
210
|
-
* If `false`, disables spell-check style (i.e. red underlines).
|
|
211
|
-
* The default value is inherited from `autoCorrect`.
|
|
212
|
-
* @platform ios
|
|
213
|
-
*/
|
|
214
|
-
spellCheck?: ?boolean,
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Determines the color of the keyboard.
|
|
218
|
-
* @platform ios
|
|
219
|
-
*/
|
|
220
|
-
keyboardAppearance?: ?('default' | 'light' | 'dark'),
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* If `true`, the keyboard disables the return key when there is no text and
|
|
224
|
-
* automatically enables it when there is text. The default value is `false`.
|
|
225
|
-
* @platform ios
|
|
226
|
-
*/
|
|
227
|
-
enablesReturnKeyAutomatically?: ?boolean,
|
|
228
|
-
|
|
229
256
|
/**
|
|
230
257
|
* When the clear button should appear on the right side of the text view.
|
|
231
258
|
* This property is supported only for single-line TextInput component.
|
|
@@ -261,6 +288,13 @@ type IOSProps = $ReadOnly<{|
|
|
|
261
288
|
| ?DataDetectorTypesType
|
|
262
289
|
| $ReadOnlyArray<DataDetectorTypesType>,
|
|
263
290
|
|
|
291
|
+
/**
|
|
292
|
+
* If `true`, the keyboard disables the return key when there is no text and
|
|
293
|
+
* automatically enables it when there is text. The default value is `false`.
|
|
294
|
+
* @platform ios
|
|
295
|
+
*/
|
|
296
|
+
enablesReturnKeyAutomatically?: ?boolean,
|
|
297
|
+
|
|
264
298
|
/**
|
|
265
299
|
* An optional identifier which links a custom InputAccessoryView to
|
|
266
300
|
* this text input. The InputAccessoryView is rendered above the
|
|
@@ -270,11 +304,10 @@ type IOSProps = $ReadOnly<{|
|
|
|
270
304
|
inputAccessoryViewID?: ?string,
|
|
271
305
|
|
|
272
306
|
/**
|
|
273
|
-
*
|
|
274
|
-
* expected semantic meaning for the content that users enter.
|
|
307
|
+
* Determines the color of the keyboard.
|
|
275
308
|
* @platform ios
|
|
276
309
|
*/
|
|
277
|
-
|
|
310
|
+
keyboardAppearance?: ?('default' | 'light' | 'dark'),
|
|
278
311
|
|
|
279
312
|
/**
|
|
280
313
|
* Provide rules for your password.
|
|
@@ -299,61 +332,49 @@ type IOSProps = $ReadOnly<{|
|
|
|
299
332
|
* @platform ios
|
|
300
333
|
*/
|
|
301
334
|
scrollEnabled?: ?boolean,
|
|
302
|
-
|}>;
|
|
303
335
|
|
|
304
|
-
type AndroidProps = $ReadOnly<{|
|
|
305
336
|
/**
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
* *Android Only*
|
|
310
|
-
*
|
|
311
|
-
* The following values work on Android only:
|
|
312
|
-
*
|
|
313
|
-
* - `username`
|
|
314
|
-
* - `password`
|
|
315
|
-
* - `email`
|
|
316
|
-
* - `name`
|
|
317
|
-
* - `tel`
|
|
318
|
-
* - `street-address`
|
|
319
|
-
* - `postal-code`
|
|
320
|
-
* - `cc-number`
|
|
321
|
-
* - `cc-csc`
|
|
322
|
-
* - `cc-exp`
|
|
323
|
-
* - `cc-exp-month`
|
|
324
|
-
* - `cc-exp-year`
|
|
325
|
-
* - `off`
|
|
326
|
-
*
|
|
327
|
-
* @platform android
|
|
337
|
+
* If `false`, disables spell-check style (i.e. red underlines).
|
|
338
|
+
* The default value is inherited from `autoCorrect`.
|
|
339
|
+
* @platform ios
|
|
328
340
|
*/
|
|
329
|
-
|
|
330
|
-
| 'cc-csc'
|
|
331
|
-
| 'cc-exp'
|
|
332
|
-
| 'cc-exp-month'
|
|
333
|
-
| 'cc-exp-year'
|
|
334
|
-
| 'cc-number'
|
|
335
|
-
| 'email'
|
|
336
|
-
| 'name'
|
|
337
|
-
| 'password'
|
|
338
|
-
| 'postal-code'
|
|
339
|
-
| 'street-address'
|
|
340
|
-
| 'tel'
|
|
341
|
-
| 'username'
|
|
342
|
-
| 'off'
|
|
343
|
-
),
|
|
341
|
+
spellCheck?: ?boolean,
|
|
344
342
|
|
|
345
343
|
/**
|
|
346
|
-
*
|
|
347
|
-
*
|
|
344
|
+
* Give the keyboard and the system information about the
|
|
345
|
+
* expected semantic meaning for the content that users enter.
|
|
346
|
+
* `autoComplete` property accomplishes same behavior and is recommended as its supported by both platforms.
|
|
347
|
+
* Avoid using both `autoComplete` and `textContentType`, you can use `Platform.select` for differing platform behaviors.
|
|
348
|
+
* For backwards compatibility, when both set, `textContentType` takes precedence on iOS.
|
|
349
|
+
* @platform ios
|
|
348
350
|
*/
|
|
349
|
-
|
|
351
|
+
textContentType?: ?TextContentType,
|
|
350
352
|
|
|
351
353
|
/**
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
+
* Set line break strategy on iOS.
|
|
355
|
+
* @platform ios
|
|
356
|
+
*/
|
|
357
|
+
lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'),
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* If `false`, the iOS system will not insert an extra space after a paste operation
|
|
361
|
+
* neither delete one or two spaces after a cut or delete operation.
|
|
362
|
+
*
|
|
363
|
+
* The default value is `true`.
|
|
364
|
+
*
|
|
365
|
+
* @platform ios
|
|
366
|
+
*/
|
|
367
|
+
smartInsertDelete?: ?boolean,
|
|
368
|
+
|}>;
|
|
369
|
+
|
|
370
|
+
type AndroidProps = $ReadOnly<{|
|
|
371
|
+
/**
|
|
372
|
+
* When provided it will set the color of the cursor (or "caret") in the component.
|
|
373
|
+
* Unlike the behavior of `selectionColor` the cursor color will be set independently
|
|
374
|
+
* from the color of the text selection box.
|
|
354
375
|
* @platform android
|
|
355
376
|
*/
|
|
356
|
-
|
|
377
|
+
cursorColor?: ?ColorValue,
|
|
357
378
|
|
|
358
379
|
/**
|
|
359
380
|
* When `false`, if there is a small amount of space available around a text input
|
|
@@ -365,18 +386,13 @@ type AndroidProps = $ReadOnly<{|
|
|
|
365
386
|
*/
|
|
366
387
|
disableFullscreenUI?: ?boolean,
|
|
367
388
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* The color of the `TextInput` underline.
|
|
377
|
-
* @platform android
|
|
378
|
-
*/
|
|
379
|
-
underlineColorAndroid?: ?ColorValue,
|
|
389
|
+
importantForAutofill?: ?(
|
|
390
|
+
| 'auto'
|
|
391
|
+
| 'no'
|
|
392
|
+
| 'noExcludeDescendants'
|
|
393
|
+
| 'yes'
|
|
394
|
+
| 'yesExcludeDescendants'
|
|
395
|
+
),
|
|
380
396
|
|
|
381
397
|
/**
|
|
382
398
|
* If defined, the provided image resource will be rendered on the left.
|
|
@@ -397,19 +413,44 @@ type AndroidProps = $ReadOnly<{|
|
|
|
397
413
|
*/
|
|
398
414
|
inlineImagePadding?: ?number,
|
|
399
415
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
416
|
+
/**
|
|
417
|
+
* Sets the number of lines for a `TextInput`. Use it with multiline set to
|
|
418
|
+
* `true` to be able to fill the lines.
|
|
419
|
+
* @platform android
|
|
420
|
+
*/
|
|
421
|
+
numberOfLines?: ?number,
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Sets the return key to the label. Use it instead of `returnKeyType`.
|
|
425
|
+
* @platform android
|
|
426
|
+
*/
|
|
427
|
+
returnKeyLabel?: ?string,
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Sets the number of rows for a `TextInput`. Use it with multiline set to
|
|
431
|
+
* `true` to be able to fill the lines.
|
|
432
|
+
* @platform android
|
|
433
|
+
*/
|
|
434
|
+
rows?: ?number,
|
|
407
435
|
|
|
408
436
|
/**
|
|
409
437
|
* When `false`, it will prevent the soft keyboard from showing when the field is focused.
|
|
410
438
|
* Defaults to `true`.
|
|
411
439
|
*/
|
|
412
440
|
showSoftInputOnFocus?: ?boolean,
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced`
|
|
444
|
+
* The default value is `simple`.
|
|
445
|
+
* @platform android
|
|
446
|
+
*/
|
|
447
|
+
textBreakStrategy?: ?('simple' | 'highQuality' | 'balanced'),
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* The color of the `TextInput` underline.
|
|
451
|
+
* @platform android
|
|
452
|
+
*/
|
|
453
|
+
underlineColorAndroid?: ?ColorValue,
|
|
413
454
|
|}>;
|
|
414
455
|
|
|
415
456
|
export type Props = $ReadOnly<{|
|
|
@@ -427,6 +468,137 @@ export type Props = $ReadOnly<{|
|
|
|
427
468
|
*/
|
|
428
469
|
autoCapitalize?: ?AutoCapitalize,
|
|
429
470
|
|
|
471
|
+
/**
|
|
472
|
+
* Specifies autocomplete hints for the system, so it can provide autofill.
|
|
473
|
+
* On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
|
|
474
|
+
* To disable autocomplete, set autoComplete to off.
|
|
475
|
+
*
|
|
476
|
+
* The following values work across platforms:
|
|
477
|
+
*
|
|
478
|
+
* - `additional-name`
|
|
479
|
+
* - `address-line1`
|
|
480
|
+
* - `address-line2`
|
|
481
|
+
* - `birthdate-day` (iOS 17+)
|
|
482
|
+
* - `birthdate-full` (iOS 17+)
|
|
483
|
+
* - `birthdate-month` (iOS 17+)
|
|
484
|
+
* - `birthdate-year` (iOS 17+)
|
|
485
|
+
* - `cc-number`
|
|
486
|
+
* - `cc-csc` (iOS 17+)
|
|
487
|
+
* - `cc-exp` (iOS 17+)
|
|
488
|
+
* - `cc-exp-day` (iOS 17+)
|
|
489
|
+
* - `cc-exp-month` (iOS 17+)
|
|
490
|
+
* - `cc-exp-year` (iOS 17+)
|
|
491
|
+
* - `country`
|
|
492
|
+
* - `current-password`
|
|
493
|
+
* - `email`
|
|
494
|
+
* - `family-name`
|
|
495
|
+
* - `given-name`
|
|
496
|
+
* - `honorific-prefix`
|
|
497
|
+
* - `honorific-suffix`
|
|
498
|
+
* - `name`
|
|
499
|
+
* - `new-password`
|
|
500
|
+
* - `off`
|
|
501
|
+
* - `one-time-code`
|
|
502
|
+
* - `postal-code`
|
|
503
|
+
* - `street-address`
|
|
504
|
+
* - `tel`
|
|
505
|
+
* - `username`
|
|
506
|
+
*
|
|
507
|
+
* The following values work on iOS only:
|
|
508
|
+
*
|
|
509
|
+
* - `cc-name` (iOS 17+)
|
|
510
|
+
* - `cc-given-name` (iOS 17+)
|
|
511
|
+
* - `cc-middle-name` (iOS 17+)
|
|
512
|
+
* - `cc-family-name` (iOS 17+)
|
|
513
|
+
* - `cc-type` (iOS 17+)
|
|
514
|
+
* - `nickname`
|
|
515
|
+
* - `organization`
|
|
516
|
+
* - `organization-title`
|
|
517
|
+
* - `url`
|
|
518
|
+
*
|
|
519
|
+
* The following values work on Android only:
|
|
520
|
+
*
|
|
521
|
+
* - `gender`
|
|
522
|
+
* - `name-family`
|
|
523
|
+
* - `name-given`
|
|
524
|
+
* - `name-middle`
|
|
525
|
+
* - `name-middle-initial`
|
|
526
|
+
* - `name-prefix`
|
|
527
|
+
* - `name-suffix`
|
|
528
|
+
* - `password`
|
|
529
|
+
* - `password-new`
|
|
530
|
+
* - `postal-address`
|
|
531
|
+
* - `postal-address-country`
|
|
532
|
+
* - `postal-address-extended`
|
|
533
|
+
* - `postal-address-extended-postal-code`
|
|
534
|
+
* - `postal-address-locality`
|
|
535
|
+
* - `postal-address-region`
|
|
536
|
+
* - `sms-otp`
|
|
537
|
+
* - `tel-country-code`
|
|
538
|
+
* - `tel-national`
|
|
539
|
+
* - `tel-device`
|
|
540
|
+
* - `username-new`
|
|
541
|
+
*/
|
|
542
|
+
autoComplete?: ?(
|
|
543
|
+
| 'additional-name'
|
|
544
|
+
| 'address-line1'
|
|
545
|
+
| 'address-line2'
|
|
546
|
+
| 'birthdate-day'
|
|
547
|
+
| 'birthdate-full'
|
|
548
|
+
| 'birthdate-month'
|
|
549
|
+
| 'birthdate-year'
|
|
550
|
+
| 'cc-csc'
|
|
551
|
+
| 'cc-exp'
|
|
552
|
+
| 'cc-exp-day'
|
|
553
|
+
| 'cc-exp-month'
|
|
554
|
+
| 'cc-exp-year'
|
|
555
|
+
| 'cc-number'
|
|
556
|
+
| 'cc-name'
|
|
557
|
+
| 'cc-given-name'
|
|
558
|
+
| 'cc-middle-name'
|
|
559
|
+
| 'cc-family-name'
|
|
560
|
+
| 'cc-type'
|
|
561
|
+
| 'country'
|
|
562
|
+
| 'current-password'
|
|
563
|
+
| 'email'
|
|
564
|
+
| 'family-name'
|
|
565
|
+
| 'gender'
|
|
566
|
+
| 'given-name'
|
|
567
|
+
| 'honorific-prefix'
|
|
568
|
+
| 'honorific-suffix'
|
|
569
|
+
| 'name'
|
|
570
|
+
| 'name-family'
|
|
571
|
+
| 'name-given'
|
|
572
|
+
| 'name-middle'
|
|
573
|
+
| 'name-middle-initial'
|
|
574
|
+
| 'name-prefix'
|
|
575
|
+
| 'name-suffix'
|
|
576
|
+
| 'new-password'
|
|
577
|
+
| 'nickname'
|
|
578
|
+
| 'one-time-code'
|
|
579
|
+
| 'organization'
|
|
580
|
+
| 'organization-title'
|
|
581
|
+
| 'password'
|
|
582
|
+
| 'password-new'
|
|
583
|
+
| 'postal-address'
|
|
584
|
+
| 'postal-address-country'
|
|
585
|
+
| 'postal-address-extended'
|
|
586
|
+
| 'postal-address-extended-postal-code'
|
|
587
|
+
| 'postal-address-locality'
|
|
588
|
+
| 'postal-address-region'
|
|
589
|
+
| 'postal-code'
|
|
590
|
+
| 'street-address'
|
|
591
|
+
| 'sms-otp'
|
|
592
|
+
| 'tel'
|
|
593
|
+
| 'tel-country-code'
|
|
594
|
+
| 'tel-national'
|
|
595
|
+
| 'tel-device'
|
|
596
|
+
| 'url'
|
|
597
|
+
| 'username'
|
|
598
|
+
| 'username-new'
|
|
599
|
+
| 'off'
|
|
600
|
+
),
|
|
601
|
+
|
|
430
602
|
/**
|
|
431
603
|
* If `false`, disables auto-correct. The default value is `true`.
|
|
432
604
|
*/
|
|
@@ -445,19 +617,67 @@ export type Props = $ReadOnly<{|
|
|
|
445
617
|
allowFontScaling?: ?boolean,
|
|
446
618
|
|
|
447
619
|
/**
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
620
|
+
* If `true`, caret is hidden. The default value is `false`.
|
|
621
|
+
*
|
|
622
|
+
* On Android devices manufactured by Xiaomi with Android Q,
|
|
623
|
+
* when keyboardType equals 'email-address'this will be set
|
|
624
|
+
* in native to 'true' to prevent a system related crash. This
|
|
625
|
+
* will cause cursor to be disabled as a side-effect.
|
|
626
|
+
*
|
|
453
627
|
*/
|
|
454
|
-
|
|
628
|
+
caretHidden?: ?boolean,
|
|
629
|
+
|
|
630
|
+
/*
|
|
631
|
+
* If `true`, contextMenuHidden is hidden. The default value is `false`.
|
|
632
|
+
*/
|
|
633
|
+
contextMenuHidden?: ?boolean,
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Provides an initial value that will change when the user starts typing.
|
|
637
|
+
* Useful for simple use-cases where you do not want to deal with listening
|
|
638
|
+
* to events and updating the value prop to keep the controlled state in sync.
|
|
639
|
+
*/
|
|
640
|
+
defaultValue?: ?Stringish,
|
|
455
641
|
|
|
456
642
|
/**
|
|
457
643
|
* If `false`, text is not editable. The default value is `true`.
|
|
458
644
|
*/
|
|
459
645
|
editable?: ?boolean,
|
|
460
646
|
|
|
647
|
+
forwardedRef?: ?ReactRefSetter<TextInputInstance>,
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* `enterKeyHint` defines what action label (or icon) to present for the enter key on virtual keyboards.
|
|
651
|
+
*
|
|
652
|
+
* The following values is supported:
|
|
653
|
+
*
|
|
654
|
+
* - `enter`
|
|
655
|
+
* - `done`
|
|
656
|
+
* - `go`
|
|
657
|
+
* - `next`
|
|
658
|
+
* - `previous`
|
|
659
|
+
* - `search`
|
|
660
|
+
* - `send`
|
|
661
|
+
*/
|
|
662
|
+
enterKeyHint?: ?enterKeyHintType,
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* `inputMode` works like the `inputmode` attribute in HTML, it determines which
|
|
666
|
+
* keyboard to open, e.g.`numeric` and has precedence over keyboardType
|
|
667
|
+
*
|
|
668
|
+
* Support the following values:
|
|
669
|
+
*
|
|
670
|
+
* - `none`
|
|
671
|
+
* - `text`
|
|
672
|
+
* - `decimal`
|
|
673
|
+
* - `numeric`
|
|
674
|
+
* - `tel`
|
|
675
|
+
* - `search`
|
|
676
|
+
* - `email`
|
|
677
|
+
* - `url`
|
|
678
|
+
*/
|
|
679
|
+
inputMode?: ?InputMode,
|
|
680
|
+
|
|
461
681
|
/**
|
|
462
682
|
* Determines which keyboard to open, e.g.`numeric`.
|
|
463
683
|
*
|
|
@@ -469,6 +689,7 @@ export type Props = $ReadOnly<{|
|
|
|
469
689
|
* - `decimal-pad`
|
|
470
690
|
* - `email-address`
|
|
471
691
|
* - `phone-pad`
|
|
692
|
+
* - `url`
|
|
472
693
|
*
|
|
473
694
|
* *iOS Only*
|
|
474
695
|
*
|
|
@@ -476,7 +697,6 @@ export type Props = $ReadOnly<{|
|
|
|
476
697
|
*
|
|
477
698
|
* - `ascii-capable`
|
|
478
699
|
* - `numbers-and-punctuation`
|
|
479
|
-
* - `url`
|
|
480
700
|
* - `name-phone-pad`
|
|
481
701
|
* - `twitter`
|
|
482
702
|
* - `web-search`
|
|
@@ -491,38 +711,13 @@ export type Props = $ReadOnly<{|
|
|
|
491
711
|
keyboardType?: ?KeyboardType,
|
|
492
712
|
|
|
493
713
|
/**
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* The following values work across platforms:
|
|
500
|
-
*
|
|
501
|
-
* - `done`
|
|
502
|
-
* - `go`
|
|
503
|
-
* - `next`
|
|
504
|
-
* - `search`
|
|
505
|
-
* - `send`
|
|
506
|
-
*
|
|
507
|
-
* *Android Only*
|
|
508
|
-
*
|
|
509
|
-
* The following values work on Android only:
|
|
510
|
-
*
|
|
511
|
-
* - `none`
|
|
512
|
-
* - `previous`
|
|
513
|
-
*
|
|
514
|
-
* *iOS Only*
|
|
515
|
-
*
|
|
516
|
-
* The following values work on iOS only:
|
|
517
|
-
*
|
|
518
|
-
* - `default`
|
|
519
|
-
* - `emergency-call`
|
|
520
|
-
* - `google`
|
|
521
|
-
* - `join`
|
|
522
|
-
* - `route`
|
|
523
|
-
* - `yahoo`
|
|
714
|
+
* Specifies largest possible scale a font can reach when `allowFontScaling` is enabled.
|
|
715
|
+
* Possible values:
|
|
716
|
+
* `null/undefined` (default): inherit from the parent node or the global default (0)
|
|
717
|
+
* `0`: no max, ignore parent/global default
|
|
718
|
+
* `>= 1`: sets the maxFontSizeMultiplier of this node to this value
|
|
524
719
|
*/
|
|
525
|
-
|
|
720
|
+
maxFontSizeMultiplier?: ?number,
|
|
526
721
|
|
|
527
722
|
/**
|
|
528
723
|
* Limits the maximum number of characters that can be entered. Use this
|
|
@@ -542,14 +737,19 @@ export type Props = $ReadOnly<{|
|
|
|
542
737
|
onBlur?: ?(e: BlurEvent) => mixed,
|
|
543
738
|
|
|
544
739
|
/**
|
|
545
|
-
* Callback that is called when the text input
|
|
740
|
+
* Callback that is called when the text input's text changes.
|
|
546
741
|
*/
|
|
547
|
-
|
|
742
|
+
onChange?: ?(e: ChangeEvent) => mixed,
|
|
548
743
|
|
|
549
744
|
/**
|
|
745
|
+
* DANGER: this API is not stable and will change in the future.
|
|
746
|
+
*
|
|
747
|
+
* Callback will be called on the main thread and may result in dropped frames.
|
|
550
748
|
* Callback that is called when the text input's text changes.
|
|
749
|
+
*
|
|
750
|
+
* @platform ios
|
|
551
751
|
*/
|
|
552
|
-
|
|
752
|
+
unstable_onChangeSync?: ?(e: ChangeEvent) => mixed,
|
|
553
753
|
|
|
554
754
|
/**
|
|
555
755
|
* Callback that is called when the text input's text changes.
|
|
@@ -557,6 +757,17 @@ export type Props = $ReadOnly<{|
|
|
|
557
757
|
*/
|
|
558
758
|
onChangeText?: ?(text: string) => mixed,
|
|
559
759
|
|
|
760
|
+
/**
|
|
761
|
+
* DANGER: this API is not stable and will change in the future.
|
|
762
|
+
*
|
|
763
|
+
* Callback will be called on the main thread and may result in dropped frames.
|
|
764
|
+
* Callback that is called when the text input's text changes.
|
|
765
|
+
* Changed text is passed as an argument to the callback handler.
|
|
766
|
+
*
|
|
767
|
+
* @platform ios
|
|
768
|
+
*/
|
|
769
|
+
unstable_onChangeTextSync?: ?(text: string) => mixed,
|
|
770
|
+
|
|
560
771
|
/**
|
|
561
772
|
* Callback that is called when the text input's content size changes.
|
|
562
773
|
* This will be called with
|
|
@@ -571,6 +782,40 @@ export type Props = $ReadOnly<{|
|
|
|
571
782
|
*/
|
|
572
783
|
onEndEditing?: ?(e: EditingEvent) => mixed,
|
|
573
784
|
|
|
785
|
+
/**
|
|
786
|
+
* Callback that is called when the text input is focused.
|
|
787
|
+
*/
|
|
788
|
+
onFocus?: ?(e: FocusEvent) => mixed,
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Callback that is called when a key is pressed.
|
|
792
|
+
* This will be called with `{ nativeEvent: { key: keyValue } }`
|
|
793
|
+
* where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
|
|
794
|
+
* the typed-in character otherwise including `' '` for space.
|
|
795
|
+
* Fires before `onChange` callbacks.
|
|
796
|
+
*/
|
|
797
|
+
onKeyPress?: ?(e: KeyPressEvent) => mixed,
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* DANGER: this API is not stable and will change in the future.
|
|
801
|
+
*
|
|
802
|
+
* Callback will be called on the main thread and may result in dropped frames.
|
|
803
|
+
*
|
|
804
|
+
* Callback that is called when a key is pressed.
|
|
805
|
+
* This will be called with `{ nativeEvent: { key: keyValue } }`
|
|
806
|
+
* where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
|
|
807
|
+
* the typed-in character otherwise including `' '` for space.
|
|
808
|
+
* Fires before `onChange` callbacks.
|
|
809
|
+
*
|
|
810
|
+
* @platform ios
|
|
811
|
+
*/
|
|
812
|
+
unstable_onKeyPressSync?: ?(e: KeyPressEvent) => mixed,
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Called when a single tap gesture is detected.
|
|
816
|
+
*/
|
|
817
|
+
onPress?: ?(event: PressEvent) => mixed,
|
|
818
|
+
|
|
574
819
|
/**
|
|
575
820
|
* Called when a touch is engaged.
|
|
576
821
|
*/
|
|
@@ -594,15 +839,6 @@ export type Props = $ReadOnly<{|
|
|
|
594
839
|
*/
|
|
595
840
|
onSubmitEditing?: ?(e: EditingEvent) => mixed,
|
|
596
841
|
|
|
597
|
-
/**
|
|
598
|
-
* Callback that is called when a key is pressed.
|
|
599
|
-
* This will be called with `{ nativeEvent: { key: keyValue } }`
|
|
600
|
-
* where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
|
|
601
|
-
* the typed-in character otherwise including `' '` for space.
|
|
602
|
-
* Fires before `onChange` callbacks.
|
|
603
|
-
*/
|
|
604
|
-
onKeyPress?: ?(e: KeyPressEvent) => mixed,
|
|
605
|
-
|
|
606
842
|
/**
|
|
607
843
|
* Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.
|
|
608
844
|
* May also contain other properties from ScrollEvent but on Android contentSize
|
|
@@ -620,16 +856,52 @@ export type Props = $ReadOnly<{|
|
|
|
620
856
|
*/
|
|
621
857
|
placeholderTextColor?: ?ColorValue,
|
|
622
858
|
|
|
859
|
+
/** `readOnly` works like the `readonly` attribute in HTML.
|
|
860
|
+
* If `true`, text is not editable. The default value is `false`.
|
|
861
|
+
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly
|
|
862
|
+
* for more details.
|
|
863
|
+
*/
|
|
864
|
+
readOnly?: ?boolean,
|
|
865
|
+
|
|
623
866
|
/**
|
|
624
|
-
*
|
|
625
|
-
*
|
|
867
|
+
* Determines how the return key should look. On Android you can also use
|
|
868
|
+
* `returnKeyLabel`.
|
|
869
|
+
*
|
|
870
|
+
* *Cross platform*
|
|
871
|
+
*
|
|
872
|
+
* The following values work across platforms:
|
|
873
|
+
*
|
|
874
|
+
* - `done`
|
|
875
|
+
* - `go`
|
|
876
|
+
* - `next`
|
|
877
|
+
* - `search`
|
|
878
|
+
* - `send`
|
|
879
|
+
*
|
|
880
|
+
* *Android Only*
|
|
881
|
+
*
|
|
882
|
+
* The following values work on Android only:
|
|
883
|
+
*
|
|
884
|
+
* - `none`
|
|
885
|
+
* - `previous`
|
|
886
|
+
*
|
|
887
|
+
* *iOS Only*
|
|
888
|
+
*
|
|
889
|
+
* The following values work on iOS only:
|
|
890
|
+
*
|
|
891
|
+
* - `default`
|
|
892
|
+
* - `emergency-call`
|
|
893
|
+
* - `google`
|
|
894
|
+
* - `join`
|
|
895
|
+
* - `route`
|
|
896
|
+
* - `yahoo`
|
|
626
897
|
*/
|
|
627
|
-
|
|
898
|
+
returnKeyType?: ?ReturnKeyType,
|
|
628
899
|
|
|
629
900
|
/**
|
|
630
|
-
*
|
|
901
|
+
* If `true`, the text input obscures the text entered so that sensitive text
|
|
902
|
+
* like passwords stay secure. The default value is `false`. Does not work with 'multiline={true}'.
|
|
631
903
|
*/
|
|
632
|
-
|
|
904
|
+
secureTextEntry?: ?boolean,
|
|
633
905
|
|
|
634
906
|
/**
|
|
635
907
|
* The start and end of the text input's selection. Set start and end to
|
|
@@ -641,22 +913,15 @@ export type Props = $ReadOnly<{|
|
|
|
641
913
|
|}>,
|
|
642
914
|
|
|
643
915
|
/**
|
|
644
|
-
* The
|
|
645
|
-
* component, which means the native value will be forced to match this
|
|
646
|
-
* value prop if provided. For most uses, this works great, but in some
|
|
647
|
-
* cases this may cause flickering - one common cause is preventing edits
|
|
648
|
-
* by keeping value the same. In addition to simply setting the same value,
|
|
649
|
-
* either set `editable={false}`, or set/update `maxLength` to prevent
|
|
650
|
-
* unwanted edits without flicker.
|
|
916
|
+
* The highlight and cursor color of the text input.
|
|
651
917
|
*/
|
|
652
|
-
|
|
918
|
+
selectionColor?: ?ColorValue,
|
|
653
919
|
|
|
654
920
|
/**
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
* to events and updating the value prop to keep the controlled state in sync.
|
|
921
|
+
* The text selection handle color.
|
|
922
|
+
* @platform android
|
|
658
923
|
*/
|
|
659
|
-
|
|
924
|
+
selectionHandleColor?: ?ColorValue,
|
|
660
925
|
|
|
661
926
|
/**
|
|
662
927
|
* If `true`, all text will automatically be selected on focus.
|
|
@@ -669,9 +934,34 @@ export type Props = $ReadOnly<{|
|
|
|
669
934
|
* multiline fields. Note that for multiline fields, setting `blurOnSubmit`
|
|
670
935
|
* to `true` means that pressing return will blur the field and trigger the
|
|
671
936
|
* `onSubmitEditing` event instead of inserting a newline into the field.
|
|
937
|
+
*
|
|
938
|
+
* @deprecated
|
|
939
|
+
* Note that `submitBehavior` now takes the place of `blurOnSubmit` and will
|
|
940
|
+
* override any behavior defined by `blurOnSubmit`.
|
|
941
|
+
* @see submitBehavior
|
|
672
942
|
*/
|
|
673
943
|
blurOnSubmit?: ?boolean,
|
|
674
944
|
|
|
945
|
+
/**
|
|
946
|
+
* When the return key is pressed,
|
|
947
|
+
*
|
|
948
|
+
* For single line inputs:
|
|
949
|
+
*
|
|
950
|
+
* - `'newline`' defaults to `'blurAndSubmit'`
|
|
951
|
+
* - `undefined` defaults to `'blurAndSubmit'`
|
|
952
|
+
*
|
|
953
|
+
* For multiline inputs:
|
|
954
|
+
*
|
|
955
|
+
* - `'newline'` adds a newline
|
|
956
|
+
* - `undefined` defaults to `'newline'`
|
|
957
|
+
*
|
|
958
|
+
* For both single line and multiline inputs:
|
|
959
|
+
*
|
|
960
|
+
* - `'submit'` will only send a submit event and not blur the input
|
|
961
|
+
* - `'blurAndSubmit`' will both blur the input and send a submit event
|
|
962
|
+
*/
|
|
963
|
+
submitBehavior?: ?SubmitBehavior,
|
|
964
|
+
|
|
675
965
|
/**
|
|
676
966
|
* Note that not all Text styles are supported, an incomplete list of what is not supported includes:
|
|
677
967
|
*
|
|
@@ -692,30 +982,15 @@ export type Props = $ReadOnly<{|
|
|
|
692
982
|
style?: ?TextStyleProp,
|
|
693
983
|
|
|
694
984
|
/**
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*/
|
|
703
|
-
caretHidden?: ?boolean,
|
|
704
|
-
|
|
705
|
-
/*
|
|
706
|
-
* If `true`, contextMenuHidden is hidden. The default value is `false`.
|
|
985
|
+
* The value to show for the text input. `TextInput` is a controlled
|
|
986
|
+
* component, which means the native value will be forced to match this
|
|
987
|
+
* value prop if provided. For most uses, this works great, but in some
|
|
988
|
+
* cases this may cause flickering - one common cause is preventing edits
|
|
989
|
+
* by keeping value the same. In addition to simply setting the same value,
|
|
990
|
+
* either set `editable={false}`, or set/update `maxLength` to prevent
|
|
991
|
+
* unwanted edits without flicker.
|
|
707
992
|
*/
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
forwardedRef?: ?ReactRefSetter<
|
|
711
|
-
React.ElementRef<HostComponent<mixed>> & ImperativeMethods,
|
|
712
|
-
>,
|
|
713
|
-
|}>;
|
|
714
|
-
|
|
715
|
-
type ImperativeMethods = $ReadOnly<{|
|
|
716
|
-
clear: () => void,
|
|
717
|
-
isFocused: () => boolean,
|
|
718
|
-
getNativeRef: () => ?React.ElementRef<HostComponent<mixed>>,
|
|
993
|
+
value?: ?Stringish,
|
|
719
994
|
|}>;
|
|
720
995
|
|
|
721
996
|
const emptyFunctionThatReturnsTrue = () => true;
|
|
@@ -774,8 +1049,8 @@ const emptyFunctionThatReturnsTrue = () => true;
|
|
|
774
1049
|
* return (
|
|
775
1050
|
* <TextInput
|
|
776
1051
|
* {...this.props} // Inherit any props passed to it; e.g., multiline, numberOfLines below
|
|
777
|
-
* editable
|
|
778
|
-
* maxLength
|
|
1052
|
+
* editable={true}
|
|
1053
|
+
* maxLength={40}
|
|
779
1054
|
* />
|
|
780
1055
|
* );
|
|
781
1056
|
* }
|
|
@@ -799,8 +1074,8 @@ const emptyFunctionThatReturnsTrue = () => true;
|
|
|
799
1074
|
* borderBottomWidth: 1 }}
|
|
800
1075
|
* >
|
|
801
1076
|
* <UselessTextInput
|
|
802
|
-
* multiline
|
|
803
|
-
* numberOfLines
|
|
1077
|
+
* multiline={true}
|
|
1078
|
+
* numberOfLines={4}
|
|
804
1079
|
* onChangeText={(text) => this.setState({text})}
|
|
805
1080
|
* value={this.state.text}
|
|
806
1081
|
* />
|
|
@@ -832,22 +1107,31 @@ const emptyFunctionThatReturnsTrue = () => true;
|
|
|
832
1107
|
*
|
|
833
1108
|
*/
|
|
834
1109
|
function InternalTextInput(props: Props): React.Node {
|
|
1110
|
+
const {
|
|
1111
|
+
'aria-busy': ariaBusy,
|
|
1112
|
+
'aria-checked': ariaChecked,
|
|
1113
|
+
'aria-disabled': ariaDisabled,
|
|
1114
|
+
'aria-expanded': ariaExpanded,
|
|
1115
|
+
'aria-selected': ariaSelected,
|
|
1116
|
+
accessibilityState,
|
|
1117
|
+
id,
|
|
1118
|
+
tabIndex,
|
|
1119
|
+
selection: propsSelection,
|
|
1120
|
+
selectionColor,
|
|
1121
|
+
selectionHandleColor,
|
|
1122
|
+
cursorColor,
|
|
1123
|
+
...otherProps
|
|
1124
|
+
} = props;
|
|
1125
|
+
|
|
835
1126
|
const inputRef = useRef<null | React.ElementRef<HostComponent<mixed>>>(null);
|
|
836
1127
|
|
|
837
|
-
//
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
// a controlled component will pass in the *previous* selection, even if the controlled
|
|
841
|
-
// component didn't mean to modify the selection at all.
|
|
842
|
-
// Therefore, we ignore selections and pass them through until the selection event has
|
|
843
|
-
// been sent.
|
|
844
|
-
// Note that this mitigation is NOT needed for Fabric.
|
|
845
|
-
let selection: ?Selection =
|
|
846
|
-
props.selection == null
|
|
1128
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1129
|
+
const selection: ?Selection =
|
|
1130
|
+
propsSelection == null
|
|
847
1131
|
? null
|
|
848
1132
|
: {
|
|
849
|
-
start:
|
|
850
|
-
end:
|
|
1133
|
+
start: propsSelection.start,
|
|
1134
|
+
end: propsSelection.end ?? propsSelection.start,
|
|
851
1135
|
};
|
|
852
1136
|
|
|
853
1137
|
const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
|
|
@@ -859,34 +1143,29 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
859
1143
|
|}>({selection, mostRecentEventCount});
|
|
860
1144
|
|
|
861
1145
|
const lastNativeSelection = lastNativeSelectionState.selection;
|
|
862
|
-
const lastNativeSelectionEventCount =
|
|
863
|
-
lastNativeSelectionState.mostRecentEventCount;
|
|
864
|
-
|
|
865
|
-
if (lastNativeSelectionEventCount < mostRecentEventCount) {
|
|
866
|
-
selection = null;
|
|
867
|
-
}
|
|
868
1146
|
|
|
869
|
-
let viewCommands
|
|
1147
|
+
let viewCommands;
|
|
870
1148
|
if (AndroidTextInputCommands) {
|
|
871
1149
|
viewCommands = AndroidTextInputCommands;
|
|
872
1150
|
} else {
|
|
873
|
-
viewCommands =
|
|
874
|
-
|
|
875
|
-
|
|
1151
|
+
viewCommands =
|
|
1152
|
+
props.multiline === true
|
|
1153
|
+
? RCTMultilineTextInputNativeCommands
|
|
1154
|
+
: RCTSinglelineTextInputNativeCommands;
|
|
876
1155
|
}
|
|
877
1156
|
|
|
878
1157
|
const text =
|
|
879
1158
|
typeof props.value === 'string'
|
|
880
1159
|
? props.value
|
|
881
1160
|
: typeof props.defaultValue === 'string'
|
|
882
|
-
|
|
883
|
-
|
|
1161
|
+
? props.defaultValue
|
|
1162
|
+
: '';
|
|
884
1163
|
|
|
885
1164
|
// This is necessary in case native updates the text and JS decides
|
|
886
1165
|
// that the update should be ignored and we should stick with the value
|
|
887
1166
|
// that we have in JS.
|
|
888
1167
|
useLayoutEffect(() => {
|
|
889
|
-
const nativeUpdate = {};
|
|
1168
|
+
const nativeUpdate: {text?: string, selection?: Selection} = {};
|
|
890
1169
|
|
|
891
1170
|
if (lastNativeText !== props.value && typeof props.value === 'string') {
|
|
892
1171
|
nativeUpdate.text = props.value;
|
|
@@ -944,72 +1223,96 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
944
1223
|
}
|
|
945
1224
|
}, [inputRef]);
|
|
946
1225
|
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
inputRef.current,
|
|
951
|
-
mostRecentEventCount,
|
|
952
|
-
'',
|
|
953
|
-
0,
|
|
954
|
-
0,
|
|
955
|
-
);
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
// TODO: Fix this returning true on null === null, when no input is focused
|
|
960
|
-
function isFocused(): boolean {
|
|
961
|
-
return TextInputState.currentlyFocusedInput() === inputRef.current;
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
function getNativeRef(): ?React.ElementRef<HostComponent<mixed>> {
|
|
965
|
-
return inputRef.current;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
const _setNativeRef = setAndForwardRef({
|
|
969
|
-
getForwardedRef: () => props.forwardedRef,
|
|
970
|
-
setLocalRef: ref => {
|
|
971
|
-
inputRef.current = ref;
|
|
1226
|
+
const setLocalRef = useCallback(
|
|
1227
|
+
(instance: TextInputInstance | null) => {
|
|
1228
|
+
inputRef.current = instance;
|
|
972
1229
|
|
|
973
1230
|
/*
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
if (
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1231
|
+
Hi reader from the future. I'm sorry for this.
|
|
1232
|
+
|
|
1233
|
+
This is a hack. Ideally we would forwardRef to the underlying
|
|
1234
|
+
host component. However, since TextInput has it's own methods that can be
|
|
1235
|
+
called as well, if we used the standard forwardRef then these
|
|
1236
|
+
methods wouldn't be accessible and thus be a breaking change.
|
|
1237
|
+
|
|
1238
|
+
We have a couple of options of how to handle this:
|
|
1239
|
+
- Return a new ref with everything we methods from both. This is problematic
|
|
1240
|
+
because we need React to also know it is a host component which requires
|
|
1241
|
+
internals of the class implementation of the ref.
|
|
1242
|
+
- Break the API and have some other way to call one set of the methods or
|
|
1243
|
+
the other. This is our long term approach as we want to eventually
|
|
1244
|
+
get the methods on host components off the ref. So instead of calling
|
|
1245
|
+
ref.measure() you might call ReactNative.measure(ref). This would hopefully
|
|
1246
|
+
let the ref for TextInput then have the methods like `.clear`. Or we do it
|
|
1247
|
+
the other way and make it TextInput.clear(textInputRef) which would be fine
|
|
1248
|
+
too. Either way though is a breaking change that is longer term.
|
|
1249
|
+
- Mutate this ref. :( Gross, but accomplishes what we need in the meantime
|
|
1250
|
+
before we can get to the long term breaking change.
|
|
1251
|
+
*/
|
|
1252
|
+
if (instance != null) {
|
|
1253
|
+
// $FlowFixMe[incompatible-use] - See the explanation above.
|
|
1254
|
+
Object.assign(instance, {
|
|
1255
|
+
clear(): void {
|
|
1256
|
+
if (inputRef.current != null) {
|
|
1257
|
+
viewCommands.setTextAndSelection(
|
|
1258
|
+
inputRef.current,
|
|
1259
|
+
mostRecentEventCount,
|
|
1260
|
+
'',
|
|
1261
|
+
0,
|
|
1262
|
+
0,
|
|
1263
|
+
);
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
// TODO: Fix this returning true on null === null, when no input is focused
|
|
1267
|
+
isFocused(): boolean {
|
|
1268
|
+
return TextInputState.currentlyFocusedInput() === inputRef.current;
|
|
1269
|
+
},
|
|
1270
|
+
getNativeRef(): ?React.ElementRef<HostComponent<mixed>> {
|
|
1271
|
+
return inputRef.current;
|
|
1272
|
+
},
|
|
1273
|
+
setSelection(start: number, end: number): void {
|
|
1274
|
+
if (inputRef.current != null) {
|
|
1275
|
+
viewCommands.setTextAndSelection(
|
|
1276
|
+
inputRef.current,
|
|
1277
|
+
mostRecentEventCount,
|
|
1278
|
+
null,
|
|
1279
|
+
start,
|
|
1280
|
+
end,
|
|
1281
|
+
);
|
|
1282
|
+
}
|
|
1283
|
+
},
|
|
1284
|
+
});
|
|
999
1285
|
}
|
|
1000
1286
|
},
|
|
1001
|
-
|
|
1287
|
+
[mostRecentEventCount, viewCommands],
|
|
1288
|
+
);
|
|
1002
1289
|
|
|
1003
|
-
const
|
|
1004
|
-
if (props.editable || props.editable === undefined) {
|
|
1005
|
-
nullthrows(inputRef.current).focus();
|
|
1006
|
-
}
|
|
1007
|
-
};
|
|
1290
|
+
const ref = useMergeRefs<TextInputInstance>(setLocalRef, props.forwardedRef);
|
|
1008
1291
|
|
|
1009
1292
|
const _onChange = (event: ChangeEvent) => {
|
|
1010
|
-
const
|
|
1293
|
+
const currentText = event.nativeEvent.text;
|
|
1011
1294
|
props.onChange && props.onChange(event);
|
|
1012
|
-
props.onChangeText && props.onChangeText(
|
|
1295
|
+
props.onChangeText && props.onChangeText(currentText);
|
|
1296
|
+
|
|
1297
|
+
if (inputRef.current == null) {
|
|
1298
|
+
// calling `props.onChange` or `props.onChangeText`
|
|
1299
|
+
// may clean up the input itself. Exits here.
|
|
1300
|
+
return;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
setLastNativeText(currentText);
|
|
1304
|
+
// This must happen last, after we call setLastNativeText.
|
|
1305
|
+
// Different ordering can cause bugs when editing AndroidTextInputs
|
|
1306
|
+
// with multiple Fragments.
|
|
1307
|
+
// We must update this so that controlled input updates work.
|
|
1308
|
+
setMostRecentEventCount(event.nativeEvent.eventCount);
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1311
|
+
const _onChangeSync = (event: ChangeEvent) => {
|
|
1312
|
+
const currentText = event.nativeEvent.text;
|
|
1313
|
+
props.unstable_onChangeSync && props.unstable_onChangeSync(event);
|
|
1314
|
+
props.unstable_onChangeTextSync &&
|
|
1315
|
+
props.unstable_onChangeTextSync(currentText);
|
|
1013
1316
|
|
|
1014
1317
|
if (inputRef.current == null) {
|
|
1015
1318
|
// calling `props.onChange` or `props.onChangeText`
|
|
@@ -1017,7 +1320,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1017
1320
|
return;
|
|
1018
1321
|
}
|
|
1019
1322
|
|
|
1020
|
-
setLastNativeText(
|
|
1323
|
+
setLastNativeText(currentText);
|
|
1021
1324
|
// This must happen last, after we call setLastNativeText.
|
|
1022
1325
|
// Different ordering can cause bugs when editing AndroidTextInputs
|
|
1023
1326
|
// with multiple Fragments.
|
|
@@ -1059,81 +1362,211 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1059
1362
|
};
|
|
1060
1363
|
|
|
1061
1364
|
let textInput = null;
|
|
1062
|
-
let additionalTouchableProps: {|
|
|
1063
|
-
rejectResponderTermination?: $PropertyType<
|
|
1064
|
-
Props,
|
|
1065
|
-
'rejectResponderTermination',
|
|
1066
|
-
>,
|
|
1067
|
-
// This is a hack to let Flow know we want an exact object
|
|
1068
|
-
|} = {...null};
|
|
1069
|
-
|
|
1070
|
-
// The default value for `blurOnSubmit` is true for single-line fields and
|
|
1071
|
-
// false for multi-line fields.
|
|
1072
|
-
const blurOnSubmit = props.blurOnSubmit ?? !props.multiline;
|
|
1073
1365
|
|
|
1074
|
-
|
|
1075
|
-
const RCTTextInputView = props.multiline
|
|
1076
|
-
? RCTMultilineTextInputView
|
|
1077
|
-
: RCTSinglelineTextInputView;
|
|
1366
|
+
const multiline = props.multiline ?? false;
|
|
1078
1367
|
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1368
|
+
let submitBehavior: SubmitBehavior;
|
|
1369
|
+
if (props.submitBehavior != null) {
|
|
1370
|
+
// `submitBehavior` is set explicitly
|
|
1371
|
+
if (!multiline && props.submitBehavior === 'newline') {
|
|
1372
|
+
// For single line text inputs, `'newline'` is not a valid option
|
|
1373
|
+
submitBehavior = 'blurAndSubmit';
|
|
1374
|
+
} else {
|
|
1375
|
+
submitBehavior = props.submitBehavior;
|
|
1376
|
+
}
|
|
1377
|
+
} else if (multiline) {
|
|
1378
|
+
if (props.blurOnSubmit === true) {
|
|
1379
|
+
submitBehavior = 'blurAndSubmit';
|
|
1380
|
+
} else {
|
|
1381
|
+
submitBehavior = 'newline';
|
|
1382
|
+
}
|
|
1383
|
+
} else {
|
|
1384
|
+
// Single line
|
|
1385
|
+
if (props.blurOnSubmit !== false) {
|
|
1386
|
+
submitBehavior = 'blurAndSubmit';
|
|
1387
|
+
} else {
|
|
1388
|
+
submitBehavior = 'submit';
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1082
1391
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1392
|
+
const accessible = props.accessible !== false;
|
|
1393
|
+
const focusable = props.focusable !== false;
|
|
1394
|
+
|
|
1395
|
+
const {
|
|
1396
|
+
editable,
|
|
1397
|
+
hitSlop,
|
|
1398
|
+
onPress,
|
|
1399
|
+
onPressIn,
|
|
1400
|
+
onPressOut,
|
|
1401
|
+
rejectResponderTermination,
|
|
1402
|
+
} = props;
|
|
1403
|
+
|
|
1404
|
+
const config = React.useMemo(
|
|
1405
|
+
() => ({
|
|
1406
|
+
hitSlop,
|
|
1407
|
+
onPress: (event: PressEvent) => {
|
|
1408
|
+
onPress?.(event);
|
|
1409
|
+
if (editable !== false) {
|
|
1410
|
+
if (inputRef.current != null) {
|
|
1411
|
+
inputRef.current.focus();
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
onPressIn: onPressIn,
|
|
1416
|
+
onPressOut: onPressOut,
|
|
1417
|
+
cancelable: Platform.OS === 'ios' ? !rejectResponderTermination : null,
|
|
1418
|
+
}),
|
|
1419
|
+
[
|
|
1420
|
+
editable,
|
|
1421
|
+
hitSlop,
|
|
1422
|
+
onPress,
|
|
1423
|
+
onPressIn,
|
|
1424
|
+
onPressOut,
|
|
1425
|
+
rejectResponderTermination,
|
|
1426
|
+
],
|
|
1427
|
+
);
|
|
1428
|
+
|
|
1429
|
+
// Hide caret during test runs due to a flashing caret
|
|
1430
|
+
// makes screenshot tests flakey
|
|
1431
|
+
let caretHidden = props.caretHidden;
|
|
1432
|
+
if (Platform.isTesting) {
|
|
1433
|
+
caretHidden = true;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
// TextInput handles onBlur and onFocus events
|
|
1437
|
+
// so omitting onBlur and onFocus pressability handlers here.
|
|
1438
|
+
const {onBlur, onFocus, ...eventHandlers} = usePressability(config) || {};
|
|
1439
|
+
|
|
1440
|
+
let _accessibilityState;
|
|
1441
|
+
if (
|
|
1442
|
+
accessibilityState != null ||
|
|
1443
|
+
ariaBusy != null ||
|
|
1444
|
+
ariaChecked != null ||
|
|
1445
|
+
ariaDisabled != null ||
|
|
1446
|
+
ariaExpanded != null ||
|
|
1447
|
+
ariaSelected != null
|
|
1448
|
+
) {
|
|
1449
|
+
_accessibilityState = {
|
|
1450
|
+
busy: ariaBusy ?? accessibilityState?.busy,
|
|
1451
|
+
checked: ariaChecked ?? accessibilityState?.checked,
|
|
1452
|
+
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
1453
|
+
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
1454
|
+
selected: ariaSelected ?? accessibilityState?.selected,
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
const style = flattenStyle<TextStyleProp>(props.style);
|
|
1459
|
+
|
|
1460
|
+
if (Platform.OS === 'ios') {
|
|
1461
|
+
const RCTTextInputView =
|
|
1462
|
+
props.multiline === true
|
|
1463
|
+
? RCTMultilineTextInputView
|
|
1464
|
+
: RCTSinglelineTextInputView;
|
|
1465
|
+
|
|
1466
|
+
const useMultilineDefaultStyle =
|
|
1467
|
+
props.multiline === true &&
|
|
1468
|
+
(style == null ||
|
|
1469
|
+
(style.padding == null &&
|
|
1470
|
+
style.paddingVertical == null &&
|
|
1471
|
+
style.paddingTop == null));
|
|
1472
|
+
|
|
1473
|
+
const useOnChangeSync =
|
|
1474
|
+
(props.unstable_onChangeSync || props.unstable_onChangeTextSync) &&
|
|
1475
|
+
!(props.onChange || props.onChangeText);
|
|
1085
1476
|
|
|
1086
1477
|
textInput = (
|
|
1087
1478
|
<RCTTextInputView
|
|
1088
|
-
|
|
1089
|
-
{
|
|
1090
|
-
|
|
1479
|
+
// $FlowFixMe[incompatible-type] - Figure out imperative + forward refs.
|
|
1480
|
+
ref={ref}
|
|
1481
|
+
{...otherProps}
|
|
1482
|
+
{...eventHandlers}
|
|
1483
|
+
accessibilityState={_accessibilityState}
|
|
1484
|
+
accessible={accessible}
|
|
1485
|
+
submitBehavior={submitBehavior}
|
|
1486
|
+
caretHidden={caretHidden}
|
|
1091
1487
|
dataDetectorTypes={props.dataDetectorTypes}
|
|
1488
|
+
focusable={tabIndex !== undefined ? !tabIndex : focusable}
|
|
1092
1489
|
mostRecentEventCount={mostRecentEventCount}
|
|
1490
|
+
nativeID={id ?? props.nativeID}
|
|
1093
1491
|
onBlur={_onBlur}
|
|
1492
|
+
onKeyPressSync={props.unstable_onKeyPressSync}
|
|
1094
1493
|
onChange={_onChange}
|
|
1494
|
+
onChangeSync={useOnChangeSync === true ? _onChangeSync : null}
|
|
1095
1495
|
onContentSizeChange={props.onContentSizeChange}
|
|
1096
1496
|
onFocus={_onFocus}
|
|
1097
1497
|
onScroll={_onScroll}
|
|
1098
1498
|
onSelectionChange={_onSelectionChange}
|
|
1099
1499
|
onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
|
|
1100
1500
|
selection={selection}
|
|
1101
|
-
style={
|
|
1501
|
+
style={StyleSheet.compose(
|
|
1502
|
+
useMultilineDefaultStyle ? styles.multilineDefault : null,
|
|
1503
|
+
style,
|
|
1504
|
+
)}
|
|
1102
1505
|
text={text}
|
|
1103
1506
|
/>
|
|
1104
1507
|
);
|
|
1105
1508
|
} else if (Platform.OS === 'android') {
|
|
1106
|
-
const style = [props.style];
|
|
1107
1509
|
const autoCapitalize = props.autoCapitalize || 'sentences';
|
|
1510
|
+
const _accessibilityLabelledBy =
|
|
1511
|
+
props?.['aria-labelledby'] ?? props?.accessibilityLabelledBy;
|
|
1512
|
+
const placeholder = props.placeholder ?? '';
|
|
1108
1513
|
let children = props.children;
|
|
1109
1514
|
const childCount = React.Children.count(children);
|
|
1110
1515
|
invariant(
|
|
1111
|
-
!(props.value && childCount),
|
|
1516
|
+
!(props.value != null && childCount),
|
|
1112
1517
|
'Cannot specify both value and children.',
|
|
1113
1518
|
);
|
|
1114
1519
|
if (childCount > 1) {
|
|
1115
1520
|
children = <Text>{children}</Text>;
|
|
1116
1521
|
}
|
|
1117
|
-
|
|
1522
|
+
// For consistency with iOS set cursor/selectionHandle color as selectionColor
|
|
1523
|
+
const colorProps = {
|
|
1524
|
+
selectionColor,
|
|
1525
|
+
selectionHandleColor:
|
|
1526
|
+
selectionHandleColor === undefined
|
|
1527
|
+
? selectionColor
|
|
1528
|
+
: selectionHandleColor,
|
|
1529
|
+
cursorColor: cursorColor === undefined ? selectionColor : cursorColor,
|
|
1530
|
+
};
|
|
1118
1531
|
textInput = (
|
|
1119
|
-
/* $FlowFixMe the types for AndroidTextInput don't match up
|
|
1120
|
-
|
|
1532
|
+
/* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match up
|
|
1533
|
+
* exactly with the props for TextInput. This will need to get fixed */
|
|
1534
|
+
/* $FlowFixMe[incompatible-type] the types for AndroidTextInput don't
|
|
1535
|
+
* match up exactly with the props for TextInput. This will need to get
|
|
1536
|
+
* fixed */
|
|
1537
|
+
/* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput don't
|
|
1538
|
+
* match up exactly with the props for TextInput. This will need to get
|
|
1539
|
+
* fixed */
|
|
1121
1540
|
<AndroidTextInput
|
|
1122
|
-
|
|
1123
|
-
{
|
|
1541
|
+
// $FlowFixMe[incompatible-type] - Figure out imperative + forward refs.
|
|
1542
|
+
ref={ref}
|
|
1543
|
+
{...otherProps}
|
|
1544
|
+
{...colorProps}
|
|
1545
|
+
{...eventHandlers}
|
|
1546
|
+
accessibilityState={_accessibilityState}
|
|
1547
|
+
accessibilityLabelledBy={_accessibilityLabelledBy}
|
|
1548
|
+
accessible={accessible}
|
|
1124
1549
|
autoCapitalize={autoCapitalize}
|
|
1125
|
-
|
|
1550
|
+
submitBehavior={submitBehavior}
|
|
1551
|
+
caretHidden={caretHidden}
|
|
1126
1552
|
children={children}
|
|
1127
1553
|
disableFullscreenUI={props.disableFullscreenUI}
|
|
1554
|
+
focusable={tabIndex !== undefined ? !tabIndex : focusable}
|
|
1128
1555
|
mostRecentEventCount={mostRecentEventCount}
|
|
1556
|
+
nativeID={id ?? props.nativeID}
|
|
1557
|
+
numberOfLines={props.rows ?? props.numberOfLines}
|
|
1129
1558
|
onBlur={_onBlur}
|
|
1130
1559
|
onChange={_onChange}
|
|
1131
1560
|
onFocus={_onFocus}
|
|
1132
|
-
/* $FlowFixMe the types for AndroidTextInput don't match
|
|
1133
|
-
* with the props for TextInput. This will need to get fixed
|
|
1561
|
+
/* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match
|
|
1562
|
+
* up exactly with the props for TextInput. This will need to get fixed
|
|
1563
|
+
*/
|
|
1564
|
+
/* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput
|
|
1565
|
+
* don't match up exactly with the props for TextInput. This will need
|
|
1566
|
+
* to get fixed */
|
|
1134
1567
|
onScroll={_onScroll}
|
|
1135
1568
|
onSelectionChange={_onSelectionChange}
|
|
1136
|
-
|
|
1569
|
+
placeholder={placeholder}
|
|
1137
1570
|
style={style}
|
|
1138
1571
|
text={text}
|
|
1139
1572
|
textBreakStrategy={props.textBreakStrategy}
|
|
@@ -1141,55 +1574,185 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1141
1574
|
);
|
|
1142
1575
|
}
|
|
1143
1576
|
return (
|
|
1144
|
-
<TextAncestor.Provider value={true}>
|
|
1145
|
-
<TouchableWithoutFeedback
|
|
1146
|
-
onLayout={props.onLayout}
|
|
1147
|
-
onPress={_onPress}
|
|
1148
|
-
onPressIn={props.onPressIn}
|
|
1149
|
-
onPressOut={props.onPressOut}
|
|
1150
|
-
accessible={props.accessible}
|
|
1151
|
-
accessibilityLabel={props.accessibilityLabel}
|
|
1152
|
-
accessibilityRole={props.accessibilityRole}
|
|
1153
|
-
accessibilityState={props.accessibilityState}
|
|
1154
|
-
nativeID={props.nativeID}
|
|
1155
|
-
testID={props.testID}
|
|
1156
|
-
{...additionalTouchableProps}>
|
|
1157
|
-
{textInput}
|
|
1158
|
-
</TouchableWithoutFeedback>
|
|
1159
|
-
</TextAncestor.Provider>
|
|
1577
|
+
<TextAncestor.Provider value={true}>{textInput}</TextAncestor.Provider>
|
|
1160
1578
|
);
|
|
1161
1579
|
}
|
|
1162
1580
|
|
|
1581
|
+
const enterKeyHintToReturnTypeMap = {
|
|
1582
|
+
enter: 'default',
|
|
1583
|
+
done: 'done',
|
|
1584
|
+
go: 'go',
|
|
1585
|
+
next: 'next',
|
|
1586
|
+
previous: 'previous',
|
|
1587
|
+
search: 'search',
|
|
1588
|
+
send: 'send',
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
const inputModeToKeyboardTypeMap = {
|
|
1592
|
+
none: 'default',
|
|
1593
|
+
text: 'default',
|
|
1594
|
+
decimal: 'decimal-pad',
|
|
1595
|
+
numeric: 'number-pad',
|
|
1596
|
+
tel: 'phone-pad',
|
|
1597
|
+
search: Platform.OS === 'ios' ? 'web-search' : 'default',
|
|
1598
|
+
email: 'email-address',
|
|
1599
|
+
url: 'url',
|
|
1600
|
+
};
|
|
1601
|
+
|
|
1602
|
+
// Map HTML autocomplete values to Android autoComplete values
|
|
1603
|
+
const autoCompleteWebToAutoCompleteAndroidMap = {
|
|
1604
|
+
'address-line1': 'postal-address-region',
|
|
1605
|
+
'address-line2': 'postal-address-locality',
|
|
1606
|
+
bday: 'birthdate-full',
|
|
1607
|
+
'bday-day': 'birthdate-day',
|
|
1608
|
+
'bday-month': 'birthdate-month',
|
|
1609
|
+
'bday-year': 'birthdate-year',
|
|
1610
|
+
'cc-csc': 'cc-csc',
|
|
1611
|
+
'cc-exp': 'cc-exp',
|
|
1612
|
+
'cc-exp-month': 'cc-exp-month',
|
|
1613
|
+
'cc-exp-year': 'cc-exp-year',
|
|
1614
|
+
'cc-number': 'cc-number',
|
|
1615
|
+
country: 'postal-address-country',
|
|
1616
|
+
'current-password': 'password',
|
|
1617
|
+
email: 'email',
|
|
1618
|
+
'honorific-prefix': 'name-prefix',
|
|
1619
|
+
'honorific-suffix': 'name-suffix',
|
|
1620
|
+
name: 'name',
|
|
1621
|
+
'additional-name': 'name-middle',
|
|
1622
|
+
'family-name': 'name-family',
|
|
1623
|
+
'given-name': 'name-given',
|
|
1624
|
+
'new-password': 'password-new',
|
|
1625
|
+
off: 'off',
|
|
1626
|
+
'one-time-code': 'sms-otp',
|
|
1627
|
+
'postal-code': 'postal-code',
|
|
1628
|
+
sex: 'gender',
|
|
1629
|
+
'street-address': 'street-address',
|
|
1630
|
+
tel: 'tel',
|
|
1631
|
+
'tel-country-code': 'tel-country-code',
|
|
1632
|
+
'tel-national': 'tel-national',
|
|
1633
|
+
username: 'username',
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1636
|
+
// Map HTML autocomplete values to iOS textContentType values
|
|
1637
|
+
const autoCompleteWebToTextContentTypeMap = {
|
|
1638
|
+
'address-line1': 'streetAddressLine1',
|
|
1639
|
+
'address-line2': 'streetAddressLine2',
|
|
1640
|
+
bday: 'birthdate',
|
|
1641
|
+
'bday-day': 'birthdateDay',
|
|
1642
|
+
'bday-month': 'birthdateMonth',
|
|
1643
|
+
'bday-year': 'birthdateYear',
|
|
1644
|
+
'cc-csc': 'creditCardSecurityCode',
|
|
1645
|
+
'cc-exp-month': 'creditCardExpirationMonth',
|
|
1646
|
+
'cc-exp-year': 'creditCardExpirationYear',
|
|
1647
|
+
'cc-exp': 'creditCardExpiration',
|
|
1648
|
+
'cc-given-name': 'creditCardGivenName',
|
|
1649
|
+
'cc-additional-name': 'creditCardMiddleName',
|
|
1650
|
+
'cc-family-name': 'creditCardFamilyName',
|
|
1651
|
+
'cc-name': 'creditCardName',
|
|
1652
|
+
'cc-number': 'creditCardNumber',
|
|
1653
|
+
'cc-type': 'creditCardType',
|
|
1654
|
+
'current-password': 'password',
|
|
1655
|
+
country: 'countryName',
|
|
1656
|
+
email: 'emailAddress',
|
|
1657
|
+
name: 'name',
|
|
1658
|
+
'additional-name': 'middleName',
|
|
1659
|
+
'family-name': 'familyName',
|
|
1660
|
+
'given-name': 'givenName',
|
|
1661
|
+
nickname: 'nickname',
|
|
1662
|
+
'honorific-prefix': 'namePrefix',
|
|
1663
|
+
'honorific-suffix': 'nameSuffix',
|
|
1664
|
+
'new-password': 'newPassword',
|
|
1665
|
+
off: 'none',
|
|
1666
|
+
'one-time-code': 'oneTimeCode',
|
|
1667
|
+
organization: 'organizationName',
|
|
1668
|
+
'organization-title': 'jobTitle',
|
|
1669
|
+
'postal-code': 'postalCode',
|
|
1670
|
+
'street-address': 'fullStreetAddress',
|
|
1671
|
+
tel: 'telephoneNumber',
|
|
1672
|
+
url: 'URL',
|
|
1673
|
+
username: 'username',
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1163
1676
|
const ExportedForwardRef: React.AbstractComponent<
|
|
1164
1677
|
React.ElementConfig<typeof InternalTextInput>,
|
|
1165
|
-
|
|
1678
|
+
TextInputInstance,
|
|
1679
|
+
// $FlowFixMe[incompatible-call]
|
|
1166
1680
|
> = React.forwardRef(function TextInput(
|
|
1167
1681
|
{
|
|
1168
1682
|
allowFontScaling = true,
|
|
1169
1683
|
rejectResponderTermination = true,
|
|
1170
1684
|
underlineColorAndroid = 'transparent',
|
|
1685
|
+
autoComplete,
|
|
1686
|
+
textContentType,
|
|
1687
|
+
readOnly,
|
|
1688
|
+
editable,
|
|
1689
|
+
enterKeyHint,
|
|
1690
|
+
returnKeyType,
|
|
1691
|
+
inputMode,
|
|
1692
|
+
showSoftInputOnFocus,
|
|
1693
|
+
keyboardType,
|
|
1171
1694
|
...restProps
|
|
1172
1695
|
},
|
|
1173
|
-
forwardedRef: ReactRefSetter<
|
|
1174
|
-
React.ElementRef<HostComponent<mixed>> & ImperativeMethods,
|
|
1175
|
-
>,
|
|
1696
|
+
forwardedRef: ReactRefSetter<TextInputInstance>,
|
|
1176
1697
|
) {
|
|
1698
|
+
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
1699
|
+
let style = flattenStyle(restProps.style);
|
|
1700
|
+
|
|
1701
|
+
if (style?.verticalAlign != null) {
|
|
1702
|
+
// $FlowFixMe[prop-missing]
|
|
1703
|
+
// $FlowFixMe[cannot-write]
|
|
1704
|
+
style.textAlignVertical =
|
|
1705
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
1706
|
+
verticalAlignToTextAlignVerticalMap[style.verticalAlign];
|
|
1707
|
+
// $FlowFixMe[prop-missing]
|
|
1708
|
+
// $FlowFixMe[cannot-write]
|
|
1709
|
+
delete style.verticalAlign;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1177
1712
|
return (
|
|
1178
1713
|
<InternalTextInput
|
|
1179
1714
|
allowFontScaling={allowFontScaling}
|
|
1180
1715
|
rejectResponderTermination={rejectResponderTermination}
|
|
1181
1716
|
underlineColorAndroid={underlineColorAndroid}
|
|
1717
|
+
editable={readOnly !== undefined ? !readOnly : editable}
|
|
1718
|
+
returnKeyType={
|
|
1719
|
+
enterKeyHint ? enterKeyHintToReturnTypeMap[enterKeyHint] : returnKeyType
|
|
1720
|
+
}
|
|
1721
|
+
keyboardType={
|
|
1722
|
+
inputMode ? inputModeToKeyboardTypeMap[inputMode] : keyboardType
|
|
1723
|
+
}
|
|
1724
|
+
showSoftInputOnFocus={
|
|
1725
|
+
inputMode == null ? showSoftInputOnFocus : inputMode !== 'none'
|
|
1726
|
+
}
|
|
1727
|
+
autoComplete={
|
|
1728
|
+
Platform.OS === 'android'
|
|
1729
|
+
? // $FlowFixMe[invalid-computed-prop]
|
|
1730
|
+
// $FlowFixMe[prop-missing]
|
|
1731
|
+
autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ??
|
|
1732
|
+
autoComplete
|
|
1733
|
+
: undefined
|
|
1734
|
+
}
|
|
1735
|
+
textContentType={
|
|
1736
|
+
textContentType != null
|
|
1737
|
+
? textContentType
|
|
1738
|
+
: Platform.OS === 'ios' &&
|
|
1739
|
+
autoComplete &&
|
|
1740
|
+
autoComplete in autoCompleteWebToTextContentTypeMap
|
|
1741
|
+
? // $FlowFixMe[invalid-computed-prop]
|
|
1742
|
+
// $FlowFixMe[prop-missing]
|
|
1743
|
+
autoCompleteWebToTextContentTypeMap[autoComplete]
|
|
1744
|
+
: textContentType
|
|
1745
|
+
}
|
|
1182
1746
|
{...restProps}
|
|
1183
1747
|
forwardedRef={forwardedRef}
|
|
1748
|
+
style={style}
|
|
1184
1749
|
/>
|
|
1185
1750
|
);
|
|
1186
1751
|
});
|
|
1187
1752
|
|
|
1188
|
-
|
|
1189
|
-
// $FlowFixMe
|
|
1190
|
-
ExportedForwardRef.propTypes = DeprecatedTextInputPropTypes;
|
|
1753
|
+
ExportedForwardRef.displayName = 'TextInput';
|
|
1191
1754
|
|
|
1192
|
-
// $FlowFixMe
|
|
1755
|
+
// $FlowFixMe[prop-missing]
|
|
1193
1756
|
ExportedForwardRef.State = {
|
|
1194
1757
|
currentlyFocusedInput: TextInputState.currentlyFocusedInput,
|
|
1195
1758
|
|
|
@@ -1198,18 +1761,17 @@ ExportedForwardRef.State = {
|
|
|
1198
1761
|
blurTextInput: TextInputState.blurTextInput,
|
|
1199
1762
|
};
|
|
1200
1763
|
|
|
1201
|
-
type TextInputComponentStatics = $ReadOnly<{|
|
|
1764
|
+
export type TextInputComponentStatics = $ReadOnly<{|
|
|
1202
1765
|
State: $ReadOnly<{|
|
|
1203
1766
|
currentlyFocusedInput: typeof TextInputState.currentlyFocusedInput,
|
|
1204
1767
|
currentlyFocusedField: typeof TextInputState.currentlyFocusedField,
|
|
1205
1768
|
focusTextInput: typeof TextInputState.focusTextInput,
|
|
1206
1769
|
blurTextInput: typeof TextInputState.blurTextInput,
|
|
1207
1770
|
|}>,
|
|
1208
|
-
propTypes: typeof DeprecatedTextInputPropTypes,
|
|
1209
1771
|
|}>;
|
|
1210
1772
|
|
|
1211
1773
|
const styles = StyleSheet.create({
|
|
1212
|
-
|
|
1774
|
+
multilineDefault: {
|
|
1213
1775
|
// This default top inset makes RCTMultilineTextInputView seem as close as possible
|
|
1214
1776
|
// to single-line RCTSinglelineTextInputView defaults, using the system defaults
|
|
1215
1777
|
// of font size 17 and a height of 31 points.
|
|
@@ -1217,11 +1779,12 @@ const styles = StyleSheet.create({
|
|
|
1217
1779
|
},
|
|
1218
1780
|
});
|
|
1219
1781
|
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1782
|
+
const verticalAlignToTextAlignVerticalMap = {
|
|
1783
|
+
auto: 'auto',
|
|
1784
|
+
top: 'top',
|
|
1785
|
+
bottom: 'bottom',
|
|
1786
|
+
middle: 'center',
|
|
1787
|
+
};
|
|
1788
|
+
|
|
1789
|
+
// $FlowFixMe[unclear-type] Unclear type. Using `any` type is not safe.
|
|
1790
|
+
module.exports = ((ExportedForwardRef: any): TextInputType);
|