react-native-windows 0.79.4 → 0.80.0-preview.2
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 +12 -3
- package/Directory.Build.props +5 -2
- package/Libraries/Alert/Alert.d.ts +4 -1
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Alert/Alert.windows.js +3 -0
- package/Libraries/Alert/RCTAlertManager.js +17 -0
- package/Libraries/Animated/Animated.js.flow +1 -3
- package/Libraries/Animated/AnimatedEvent.js +4 -3
- package/Libraries/Animated/AnimatedExports.js +2 -2
- package/Libraries/Animated/AnimatedExports.js.flow +140 -0
- package/Libraries/Animated/AnimatedImplementation.js +2 -123
- package/Libraries/Animated/Easing.js +13 -15
- package/Libraries/Animated/animations/Animation.js +8 -4
- package/Libraries/Animated/components/AnimatedFlatList.js +7 -6
- package/Libraries/Animated/components/AnimatedScrollView.js +48 -42
- package/Libraries/Animated/components/AnimatedSectionList.js +11 -7
- package/Libraries/Animated/createAnimatedComponent.js +105 -57
- package/Libraries/Animated/nodes/AnimatedNode.js +4 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +46 -26
- package/Libraries/Animated/nodes/AnimatedValue.js +16 -7
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
- package/Libraries/AppState/AppState.js +7 -2
- package/Libraries/BatchedBridge/MessageQueue.js +2 -2
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Blob/BlobManager.js +1 -0
- package/Libraries/Blob/FileReader.js +219 -8
- package/Libraries/Blob/URL.js +37 -12
- package/Libraries/Blob/URLSearchParams.js +106 -31
- package/Libraries/Blob/URLSearchParams.js.flow +12 -7
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +1 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -0
- package/Libraries/Components/Button.d.ts +3 -0
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.windows.js +27 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
- package/Libraries/{NewAppScreen/components/Colors.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +6 -10
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
- package/Libraries/Components/Flyout/Flyout.js +11 -0
- package/Libraries/Components/Keyboard/Keyboard.js +5 -3
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
- package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
- package/Libraries/Components/Popup/Popup.js +11 -0
- package/Libraries/Components/Pressable/Pressable.js +20 -4
- package/Libraries/Components/Pressable/Pressable.windows.js +20 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +25 -3
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +29 -20
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
- package/Libraries/Components/RefreshControl/RefreshControl.windows.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +3 -3
- package/Libraries/Components/ScrollView/ScrollView.js +132 -122
- package/Libraries/Components/ScrollView/ScrollView.windows.js +131 -122
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/Switch/Switch.d.ts +3 -0
- package/Libraries/Components/Switch/Switch.js +8 -4
- package/Libraries/Components/Switch/Switch.windows.js +17 -4
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
- package/Libraries/Components/TextInput/TextInput.d.ts +70 -33
- package/Libraries/Components/TextInput/TextInput.flow.js +100 -51
- package/Libraries/Components/TextInput/TextInput.flow.windows.js +1246 -0
- package/Libraries/Components/TextInput/TextInput.js +88 -1027
- package/Libraries/Components/TextInput/TextInput.windows.js +104 -1092
- package/Libraries/Components/TextInput/TextInputState.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.windows.js +1 -1
- package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +2 -1
- package/Libraries/{Modal/ModalInjection.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -5
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
- package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
- package/Libraries/Components/Touchable/Touchable.js +5 -5
- package/Libraries/Components/Touchable/Touchable.windows.js +5 -5
- package/Libraries/Components/Touchable/TouchableBounce.js +14 -7
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +14 -7
- package/Libraries/Components/Touchable/TouchableHighlight.js +10 -7
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +10 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -6
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +6 -6
- package/Libraries/Components/Touchable/TouchableOpacity.js +13 -6
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +13 -6
- package/Libraries/Components/View/View.js +18 -21
- package/Libraries/Components/View/View.windows.js +39 -41
- package/Libraries/Components/View/ViewAccessibility.d.ts +8 -0
- package/Libraries/Components/View/ViewAccessibility.js +25 -1
- package/Libraries/Components/View/ViewAccessibility.windows.js +9 -1
- package/Libraries/Components/View/ViewPropTypes.js +49 -3
- package/Libraries/Components/View/ViewPropTypes.windows.js +50 -2
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +5 -5
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +3 -3
- package/Libraries/EventEmitter/NativeEventEmitter.js +9 -4
- package/Libraries/Image/AssetSourceResolver.js +17 -4
- package/Libraries/Image/AssetSourceResolver.windows.js +17 -4
- package/Libraries/Image/Image.d.ts +26 -10
- package/Libraries/Image/Image.js +17 -0
- package/Libraries/Image/Image.js.flow +5 -5
- package/Libraries/Image/Image.windows.js +13 -1
- package/Libraries/Image/ImageBackground.js +2 -0
- package/Libraries/Image/ImageInjection.js +1 -1
- package/Libraries/Image/ImageProps.js +22 -17
- package/Libraries/Image/ImageSource.js +3 -1
- package/Libraries/Image/ImageSourceUtils.js +4 -2
- package/Libraries/Image/ImageTypes.flow.js +1 -1
- package/Libraries/Interaction/InteractionManager.d.ts +13 -0
- package/Libraries/Interaction/InteractionManager.js +1 -1
- package/Libraries/Interaction/PanResponder.js +3 -3
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -2
- package/Libraries/Lists/FlatList.js +8 -11
- package/Libraries/Lists/SectionList.js +39 -42
- package/Libraries/Lists/SectionListModern.js +25 -34
- package/Libraries/Lists/VirtualizedList.js +1 -0
- package/Libraries/Lists/VirtualizedSectionList.js +1 -0
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
- package/Libraries/Modal/Modal.js +33 -7
- package/Libraries/Modal/Modal.windows.js +33 -10
- package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +3 -0
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js +17 -0
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.windows.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +781 -10
- package/Libraries/Performance/Systrace.js +7 -7
- package/Libraries/Pressability/Pressability.js +1 -1
- package/Libraries/Pressability/Pressability.windows.js +1 -1
- package/Libraries/ReactNative/AppContainer-dev.js +5 -4
- package/Libraries/ReactNative/AppRegistry.flow.js +49 -0
- package/Libraries/ReactNative/AppRegistry.js +2 -322
- package/Libraries/ReactNative/AppRegistry.js.flow +23 -0
- package/Libraries/ReactNative/AppRegistryImpl.js +316 -0
- package/Libraries/ReactNative/FabricUIManager.js +10 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -4
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -4
- package/Libraries/ReactNative/RendererImplementation.js +10 -5
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
- package/Libraries/ReactNative/renderApplication.js +9 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +3 -3
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -3
- package/Libraries/Settings/Settings.ios.js +1 -0
- package/Libraries/Settings/Settings.js +13 -19
- package/Libraries/Settings/SettingsFallback.js +33 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +6 -0
- package/Libraries/StyleSheet/Rect.js +1 -0
- package/Libraries/StyleSheet/StyleSheet.js +31 -200
- package/Libraries/StyleSheet/StyleSheet.js.flow +188 -0
- package/Libraries/StyleSheet/StyleSheetExports.js +210 -0
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +112 -0
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +130 -52
- package/Libraries/StyleSheet/flattenStyle.js +14 -4
- package/Libraries/StyleSheet/private/_TransformStyle.js +49 -21
- package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
- package/Libraries/Text/Text.d.ts +2 -5
- package/Libraries/Text/Text.js +3 -3
- package/Libraries/Text/Text.windows.js +3 -3
- package/Libraries/Text/TextNativeComponent.js +0 -4
- package/Libraries/Text/TextProps.js +5 -33
- package/Libraries/Text/TextProps.windows.js +5 -32
- package/Libraries/Types/CodegenTypesNamespace.d.ts +45 -0
- package/Libraries/{Blob/__mocks__/BlobModule.js → Types/CodegenTypesNamespace.js} +4 -6
- package/Libraries/Types/CoreEventTypes.d.ts +6 -1
- package/Libraries/Types/CoreEventTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.windows.js +1 -1
- package/Libraries/Utilities/Appearance.js +2 -0
- package/Libraries/Utilities/BackHandler.js +17 -0
- package/Libraries/Utilities/DeviceInfo.js +2 -0
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/Platform.js +17 -0
- package/Libraries/Utilities/PlatformTypes.js +11 -3
- package/Libraries/Utilities/ReactNativeTestTools.js +2 -2
- package/Libraries/Utilities/codegenNativeCommands.d.ts +18 -0
- package/Libraries/Utilities/codegenNativeComponent.d.ts +26 -0
- package/Libraries/WebSocket/WebSocket.js +313 -8
- package/Libraries/vendor/core/ErrorUtils.js +28 -2
- package/Libraries/vendor/emitter/EventEmitter.js +6 -2
- package/Microsoft.ReactNative/CompositionSwitcher.idl +8 -0
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +0 -6
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +197 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +34 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +12 -0
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +36 -33
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +81 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +5 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +148 -14
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.cpp +29 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +17 -34
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +9 -3
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +2 -0
- package/Microsoft.ReactNative/Fabric/ImageManager.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +16 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +1 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +9 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +1 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +4 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +36 -96
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.h +1 -1
- package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.h +3 -0
- package/Microsoft.ReactNative/TurboModulesProvider.h +1 -1
- package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.h +1 -1
- package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +4 -4
- package/PropertySheets/React.Cpp.props +4 -0
- package/README.md +2 -2
- package/ReactCommon/ReactCommon.vcxproj +9 -4
- package/ReactCommon/ReactCommon.vcxproj.filters +6 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +253 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +5 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +4 -8
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +184 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +22 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +2 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleWithJSIBindings.cpp +27 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +3 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp +308 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp +42 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/css/CSSTokenizer.h +7 -51
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +10 -5
- package/Scripts/creaternwapp.cmd +9 -3
- package/Shared/Shared.vcxitems +3 -2
- package/Shared/Shared.vcxitems.filters +2 -1
- package/codegen/NativeAnimatedModuleSpec.g.h +2 -0
- package/codegen/NativeAnimatedTurboModuleSpec.g.h +2 -0
- package/codegen/NativePerformanceSpec.g.h +14 -0
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +151 -127
- package/codegen/NativeSampleTurboModuleSpec.g.h +14 -8
- package/codegen/react/components/rnwcore/EventEmitters.cpp +48 -48
- package/codegen/rnwcoreJSI-generated.cpp +159 -129
- package/codegen/rnwcoreJSI.h +534 -408
- package/index.js +51 -331
- package/index.windows.js +70 -352
- package/interface.js +0 -4
- package/jest/resolver.js +31 -0
- package/jest/setup.js +6 -2
- package/package.json +29 -28
- package/src/private/animated/NativeAnimatedHelper.js +21 -8
- package/src/private/animated/createAnimatedPropsHook.js +11 -16
- package/src/private/animated/createAnimatedPropsMemoHook.js +1 -2
- package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
- package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
- package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
- package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +4 -4
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
- package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.windows.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
- package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
- package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +82 -80
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +12 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +17 -13
- package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
- package/src/private/styles/composeStyles.js +12 -5
- package/src/private/types/HostComponent.js +1 -1
- package/src/private/types/HostInstance.js +67 -1
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -5
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +5 -18
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +6 -0
- package/src/private/webapis/performance/Performance.js +1 -3
- package/src/private/webapis/performance/PerformanceEntry.js +6 -1
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
- package/src/types/globals.d.ts +42 -0
- package/stubs/double-conversion/double-conversion.h +3 -1
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +4 -0
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +4 -0
- package/types/index.d.ts +6 -3
- package/types/public/ReactNativeTypes.d.ts +2 -2
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
- package/Libraries/Blob/FileReader_new.js +0 -231
- package/Libraries/Blob/FileReader_old.js +0 -186
- package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
- package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
- package/Libraries/Events/CustomEvent.js +0 -32
- package/Libraries/Events/EventPolyfill.js +0 -239
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
- package/Libraries/Network/XMLHttpRequest_new.js +0 -794
- package/Libraries/Network/XMLHttpRequest_old.js +0 -701
- package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -41
- package/Libraries/NewAppScreen/components/DebugInstructions.windows.js +0 -30
- package/Libraries/NewAppScreen/components/Header.js +0 -77
- package/Libraries/NewAppScreen/components/HermesBadge.js +0 -53
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -148
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -39
- package/Libraries/NewAppScreen/components/ReloadInstructions.windows.js +0 -31
- package/Libraries/NewAppScreen/components/logo.png +0 -0
- package/Libraries/NewAppScreen/index.js +0 -25
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
- package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
- package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
- package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
- package/Libraries/WebSocket/WebSocketEvent.js +0 -30
- package/Libraries/WebSocket/WebSocket_new.js +0 -325
- package/Libraries/WebSocket/WebSocket_old.js +0 -297
- package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
- package/jest/__tests__/setup-test.js +0 -18
- package/src/private/components/VScrollViewNativeComponents.js +0 -25
- package/src/private/utilities/ensureInstance.js +0 -21
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
- package/types/modules/LaunchScreen.d.ts +0 -18
- /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
- /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
|
@@ -14,6 +14,21 @@
|
|
|
14
14
|
|
|
15
15
|
namespace winrt::Microsoft::ReactNative::implementation {
|
|
16
16
|
|
|
17
|
+
// Helper function to check if any parent has NoHideDescendants
|
|
18
|
+
bool IsHiddenByParent(const winrt::Microsoft::ReactNative::ComponentView &view) {
|
|
19
|
+
auto parent = view.Parent();
|
|
20
|
+
while (parent) {
|
|
21
|
+
auto parentProps = std::static_pointer_cast<const facebook::react::ViewProps>(
|
|
22
|
+
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(parent)->props());
|
|
23
|
+
if (parentProps &&
|
|
24
|
+
parentProps->importantForAccessibility == facebook::react::ImportantForAccessibility::NoHideDescendants) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
parent = parent.Parent();
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
17
32
|
CompositionDynamicAutomationProvider::CompositionDynamicAutomationProvider(
|
|
18
33
|
const winrt::Microsoft::ReactNative::Composition::ComponentView &componentView) noexcept
|
|
19
34
|
: m_view{componentView} {
|
|
@@ -521,16 +536,25 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPropertyValue(PROPERT
|
|
|
521
536
|
}
|
|
522
537
|
case UIA_IsContentElementPropertyId: {
|
|
523
538
|
pRetVal->vt = VT_BOOL;
|
|
524
|
-
|
|
525
|
-
|
|
539
|
+
// Check if this element or any parent has NoHideDescendants
|
|
540
|
+
bool isHidden =
|
|
541
|
+
props->importantForAccessibility == facebook::react::ImportantForAccessibility::NoHideDescendants ||
|
|
542
|
+
IsHiddenByParent(strongView);
|
|
543
|
+
pRetVal->boolVal = (!isHidden && props->accessible &&
|
|
544
|
+
(props->accessibilityRole != "none" || props->role != facebook::react::Role::None))
|
|
526
545
|
? VARIANT_TRUE
|
|
527
546
|
: VARIANT_FALSE;
|
|
528
547
|
break;
|
|
529
548
|
}
|
|
549
|
+
|
|
530
550
|
case UIA_IsControlElementPropertyId: {
|
|
531
551
|
pRetVal->vt = VT_BOOL;
|
|
532
|
-
|
|
533
|
-
|
|
552
|
+
// Check if this element or any parent has NoHideDescendants
|
|
553
|
+
bool isHidden =
|
|
554
|
+
props->importantForAccessibility == facebook::react::ImportantForAccessibility::NoHideDescendants ||
|
|
555
|
+
IsHiddenByParent(strongView);
|
|
556
|
+
pRetVal->boolVal = (!isHidden && props->accessible &&
|
|
557
|
+
(props->accessibilityRole != "none" || props->role != facebook::react::Role::None))
|
|
534
558
|
? VARIANT_TRUE
|
|
535
559
|
: VARIANT_FALSE;
|
|
536
560
|
break;
|
|
@@ -588,6 +612,12 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPropertyValue(PROPERT
|
|
|
588
612
|
pRetVal->bstrVal = SysAllocString(itemtype.c_str());
|
|
589
613
|
break;
|
|
590
614
|
}
|
|
615
|
+
case UIA_FullDescriptionPropertyId: {
|
|
616
|
+
pRetVal->vt = VT_BSTR;
|
|
617
|
+
auto desc = ::Microsoft::Common::Unicode::Utf8ToUtf16(props->accessibilityDescription.value_or(""));
|
|
618
|
+
pRetVal->bstrVal = SysAllocString(desc.c_str());
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
591
621
|
}
|
|
592
622
|
return hr;
|
|
593
623
|
}
|
|
@@ -819,6 +819,18 @@ void ComponentView::updateAccessibilityProps(
|
|
|
819
819
|
oldViewProps.accessibilityItemType,
|
|
820
820
|
newViewProps.accessibilityItemType);
|
|
821
821
|
|
|
822
|
+
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
823
|
+
EnsureUiaProvider(),
|
|
824
|
+
UIA_FullDescriptionPropertyId,
|
|
825
|
+
oldViewProps.accessibilityDescription,
|
|
826
|
+
newViewProps.accessibilityDescription);
|
|
827
|
+
|
|
828
|
+
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
829
|
+
EnsureUiaProvider(),
|
|
830
|
+
UIA_ValueValuePropertyId,
|
|
831
|
+
oldViewProps.accessibilityValue.text,
|
|
832
|
+
newViewProps.accessibilityValue.text);
|
|
833
|
+
|
|
822
834
|
if ((oldViewProps.accessibilityState.has_value() && oldViewProps.accessibilityState->selected.has_value()) !=
|
|
823
835
|
((newViewProps.accessibilityState.has_value() && newViewProps.accessibilityState->selected.has_value()))) {
|
|
824
836
|
auto compProvider =
|
|
@@ -63,8 +63,12 @@ void ParagraphComponentView::updateProps(
|
|
|
63
63
|
updateTextAlignment(newViewProps.textAttributes.alignment);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
if (oldViewProps.paragraphAttributes.ellipsizeMode != newViewProps.paragraphAttributes.ellipsizeMode) {
|
|
67
|
+
m_textLayout = nullptr;
|
|
68
|
+
}
|
|
69
|
+
|
|
66
70
|
if (oldViewProps.paragraphAttributes.adjustsFontSizeToFit != newViewProps.paragraphAttributes.adjustsFontSizeToFit) {
|
|
67
|
-
|
|
71
|
+
m_textLayout = nullptr;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
Super::updateProps(props, oldProps);
|
|
@@ -100,7 +104,7 @@ void ParagraphComponentView::FinalizeUpdates(
|
|
|
100
104
|
|
|
101
105
|
facebook::react::SharedViewEventEmitter ParagraphComponentView::eventEmitterAtPoint(
|
|
102
106
|
facebook::react::Point pt) noexcept {
|
|
103
|
-
if (m_attributedStringBox.getValue().getFragments().size()) {
|
|
107
|
+
if (m_attributedStringBox.getValue().getFragments().size() && m_textLayout) {
|
|
104
108
|
BOOL isTrailingHit = false;
|
|
105
109
|
BOOL isInside = false;
|
|
106
110
|
DWRITE_HIT_TEST_METRICS metrics;
|
|
@@ -123,35 +127,8 @@ facebook::react::SharedViewEventEmitter ParagraphComponentView::eventEmitterAtPo
|
|
|
123
127
|
|
|
124
128
|
void ParagraphComponentView::updateTextAlignment(
|
|
125
129
|
const std::optional<facebook::react::TextAlignment> &fbAlignment) noexcept {
|
|
130
|
+
// Reset text layout to force recreation with new alignment
|
|
126
131
|
m_textLayout = nullptr;
|
|
127
|
-
if (!m_textLayout)
|
|
128
|
-
return;
|
|
129
|
-
|
|
130
|
-
DWRITE_TEXT_ALIGNMENT alignment = DWRITE_TEXT_ALIGNMENT_LEADING;
|
|
131
|
-
if (fbAlignment) {
|
|
132
|
-
switch (*fbAlignment) {
|
|
133
|
-
case facebook::react::TextAlignment::Center:
|
|
134
|
-
alignment = DWRITE_TEXT_ALIGNMENT_CENTER;
|
|
135
|
-
break;
|
|
136
|
-
case facebook::react::TextAlignment::Justified:
|
|
137
|
-
alignment = DWRITE_TEXT_ALIGNMENT_JUSTIFIED;
|
|
138
|
-
break;
|
|
139
|
-
case facebook::react::TextAlignment::Left:
|
|
140
|
-
alignment = DWRITE_TEXT_ALIGNMENT_LEADING;
|
|
141
|
-
break;
|
|
142
|
-
case facebook::react::TextAlignment::Right:
|
|
143
|
-
alignment = DWRITE_TEXT_ALIGNMENT_TRAILING;
|
|
144
|
-
break;
|
|
145
|
-
// TODO use LTR values
|
|
146
|
-
case facebook::react::TextAlignment::Natural:
|
|
147
|
-
alignment = DWRITE_TEXT_ALIGNMENT_LEADING;
|
|
148
|
-
break;
|
|
149
|
-
default:
|
|
150
|
-
assert(false);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// TODO
|
|
154
|
-
// m_textFormat->SetTextAlignment(alignment);
|
|
155
132
|
}
|
|
156
133
|
|
|
157
134
|
void ParagraphComponentView::OnRenderingDeviceLost() noexcept {
|
|
@@ -163,7 +140,6 @@ void ParagraphComponentView::updateVisualBrush() noexcept {
|
|
|
163
140
|
|
|
164
141
|
// TODO
|
|
165
142
|
// updateTextAlignment(paragraphProps.textAttributes.alignment);
|
|
166
|
-
|
|
167
143
|
if (!m_textLayout) {
|
|
168
144
|
facebook::react::LayoutConstraints constraints;
|
|
169
145
|
constraints.maximumSize.width =
|
|
@@ -174,6 +150,35 @@ void ParagraphComponentView::updateVisualBrush() noexcept {
|
|
|
174
150
|
facebook::react::WindowsTextLayoutManager::GetTextLayout(
|
|
175
151
|
m_attributedStringBox, m_paragraphAttributes, constraints, m_textLayout);
|
|
176
152
|
|
|
153
|
+
// Apply text alignment after creating the text layout
|
|
154
|
+
if (m_textLayout) {
|
|
155
|
+
const auto &props = paragraphProps();
|
|
156
|
+
DWRITE_TEXT_ALIGNMENT alignment = DWRITE_TEXT_ALIGNMENT_LEADING;
|
|
157
|
+
if (props.textAttributes.alignment) {
|
|
158
|
+
switch (*props.textAttributes.alignment) {
|
|
159
|
+
case facebook::react::TextAlignment::Center:
|
|
160
|
+
alignment = DWRITE_TEXT_ALIGNMENT_CENTER;
|
|
161
|
+
break;
|
|
162
|
+
case facebook::react::TextAlignment::Justified:
|
|
163
|
+
alignment = DWRITE_TEXT_ALIGNMENT_JUSTIFIED;
|
|
164
|
+
break;
|
|
165
|
+
case facebook::react::TextAlignment::Left:
|
|
166
|
+
alignment = DWRITE_TEXT_ALIGNMENT_LEADING;
|
|
167
|
+
break;
|
|
168
|
+
case facebook::react::TextAlignment::Right:
|
|
169
|
+
alignment = DWRITE_TEXT_ALIGNMENT_TRAILING;
|
|
170
|
+
break;
|
|
171
|
+
case facebook::react::TextAlignment::Natural:
|
|
172
|
+
alignment = DWRITE_TEXT_ALIGNMENT_LEADING;
|
|
173
|
+
break;
|
|
174
|
+
default:
|
|
175
|
+
alignment = DWRITE_TEXT_ALIGNMENT_LEADING;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
winrt::check_hresult(m_textLayout->SetTextAlignment(alignment));
|
|
180
|
+
}
|
|
181
|
+
|
|
177
182
|
requireNewBrush = true;
|
|
178
183
|
}
|
|
179
184
|
|
|
@@ -275,9 +280,7 @@ void ParagraphComponentView::DrawText() noexcept {
|
|
|
275
280
|
d2dDeviceContext->Clear(
|
|
276
281
|
viewProps()->backgroundColor ? theme()->D2DColor(*viewProps()->backgroundColor)
|
|
277
282
|
: D2D1::ColorF(D2D1::ColorF::Black, 0.0f));
|
|
278
|
-
|
|
279
283
|
const auto &props = paragraphProps();
|
|
280
|
-
|
|
281
284
|
RenderText(
|
|
282
285
|
*d2dDeviceContext,
|
|
283
286
|
*m_textLayout,
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
#pragma warning(pop)
|
|
16
16
|
|
|
17
17
|
#include <windows.ui.composition.interop.h>
|
|
18
|
+
#include <winrt/Windows.UI.ViewManagement.Core.h>
|
|
18
19
|
|
|
19
20
|
#include <AutoDraw.h>
|
|
20
21
|
#include <Fabric/DWriteHelpers.h>
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
27
28
|
|
|
28
29
|
constexpr float c_scrollerLineDelta = 16.0f;
|
|
30
|
+
constexpr auto c_maxSnapPoints = 1000;
|
|
29
31
|
|
|
30
32
|
enum class ScrollbarHitRegion : int {
|
|
31
33
|
Unknown = -1,
|
|
@@ -739,6 +741,15 @@ void ScrollViewComponentView::updateBackgroundColor(const facebook::react::Share
|
|
|
739
741
|
}
|
|
740
742
|
}
|
|
741
743
|
|
|
744
|
+
winrt::Windows::Foundation::Collections::IVector<float> ScrollViewComponentView::CreateSnapToOffsets(
|
|
745
|
+
const std::vector<float> &offsets) {
|
|
746
|
+
auto snapToOffsets = winrt::single_threaded_vector<float>();
|
|
747
|
+
for (const auto &offset : offsets) {
|
|
748
|
+
snapToOffsets.Append(offset);
|
|
749
|
+
}
|
|
750
|
+
return snapToOffsets;
|
|
751
|
+
}
|
|
752
|
+
|
|
742
753
|
void ScrollViewComponentView::updateProps(
|
|
743
754
|
facebook::react::Props::Shared const &props,
|
|
744
755
|
facebook::react::Props::Shared const &oldProps) noexcept {
|
|
@@ -804,6 +815,17 @@ void ScrollViewComponentView::updateProps(
|
|
|
804
815
|
if (oldViewProps.zoomScale != newViewProps.zoomScale) {
|
|
805
816
|
m_scrollVisual.Scale({newViewProps.zoomScale, newViewProps.zoomScale, newViewProps.zoomScale});
|
|
806
817
|
}
|
|
818
|
+
|
|
819
|
+
if (oldViewProps.snapToStart != newViewProps.snapToStart || oldViewProps.snapToEnd != newViewProps.snapToEnd ||
|
|
820
|
+
oldViewProps.snapToOffsets != newViewProps.snapToOffsets) {
|
|
821
|
+
if (oldViewProps.snapToInterval != newViewProps.snapToInterval) {
|
|
822
|
+
updateSnapPoints();
|
|
823
|
+
} else {
|
|
824
|
+
const auto snapToOffsets = CreateSnapToOffsets(newViewProps.snapToOffsets);
|
|
825
|
+
m_scrollVisual.SetSnapPoints(
|
|
826
|
+
newViewProps.snapToStart, newViewProps.snapToEnd, snapToOffsets.GetView(), SnapAlignment::Center);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
807
829
|
}
|
|
808
830
|
|
|
809
831
|
void ScrollViewComponentView::updateState(
|
|
@@ -853,6 +875,9 @@ void ScrollViewComponentView::updateContentVisualSize() noexcept {
|
|
|
853
875
|
m_verticalScrollbarComponent->ContentSize(contentSize);
|
|
854
876
|
m_horizontalScrollbarComponent->ContentSize(contentSize);
|
|
855
877
|
m_scrollVisual.ContentSize(contentSize);
|
|
878
|
+
|
|
879
|
+
// Update snap points if snapToInterval is being used, as content size affects the number of snap points
|
|
880
|
+
updateSnapPoints();
|
|
856
881
|
}
|
|
857
882
|
|
|
858
883
|
void ScrollViewComponentView::prepareForRecycle() noexcept {}
|
|
@@ -1276,6 +1301,16 @@ winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ScrollViewComp
|
|
|
1276
1301
|
auto now = std::chrono::steady_clock::now();
|
|
1277
1302
|
auto elapsed = std::chrono::duration_cast<std::chrono::duration<double>>(now - m_lastScrollEventTime).count();
|
|
1278
1303
|
|
|
1304
|
+
// Dismiss keyboard if mode is "on-drag"
|
|
1305
|
+
auto keyboardDismissMode =
|
|
1306
|
+
std::static_pointer_cast<const facebook::react::ScrollViewProps>(viewProps())->keyboardDismissMode;
|
|
1307
|
+
if (keyboardDismissMode == facebook::react::ScrollViewKeyboardDismissMode::OnDrag) {
|
|
1308
|
+
auto coreInputView = winrt::Windows::UI::ViewManagement::Core::CoreInputView::GetForCurrentView();
|
|
1309
|
+
if (coreInputView) {
|
|
1310
|
+
coreInputView.TryHide();
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1279
1314
|
if (m_allowNextScrollNoMatterWhat ||
|
|
1280
1315
|
(m_scrollEventThrottle < std::max(std::chrono::duration<double>(0.017).count(), elapsed))) {
|
|
1281
1316
|
updateStateWithContentOffset();
|
|
@@ -1415,4 +1450,50 @@ void ScrollViewComponentView::updateShowsVerticalScrollIndicator(bool value) noe
|
|
|
1415
1450
|
void ScrollViewComponentView::updateDecelerationRate(float value) noexcept {
|
|
1416
1451
|
m_scrollVisual.SetDecelerationRate({value, value, value});
|
|
1417
1452
|
}
|
|
1453
|
+
|
|
1454
|
+
SnapAlignment ScrollViewComponentView::convertSnapToAlignment(
|
|
1455
|
+
facebook::react::ScrollViewSnapToAlignment alignment) noexcept {
|
|
1456
|
+
switch (alignment) {
|
|
1457
|
+
case facebook::react::ScrollViewSnapToAlignment::Center:
|
|
1458
|
+
return SnapAlignment::Center;
|
|
1459
|
+
case facebook::react::ScrollViewSnapToAlignment::End:
|
|
1460
|
+
return SnapAlignment::End;
|
|
1461
|
+
case facebook::react::ScrollViewSnapToAlignment::Start:
|
|
1462
|
+
default:
|
|
1463
|
+
return SnapAlignment::Start;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
void ScrollViewComponentView::updateSnapPoints() noexcept {
|
|
1468
|
+
const auto &viewProps = *std::static_pointer_cast<const facebook::react::ScrollViewProps>(this->viewProps());
|
|
1469
|
+
const auto snapToOffsets = CreateSnapToOffsets(viewProps.snapToOffsets);
|
|
1470
|
+
// Typically used in combination with snapToAlignment and decelerationRate="fast"
|
|
1471
|
+
auto snapAlignment = SnapAlignment::Center;
|
|
1472
|
+
auto decelerationRate = viewProps.decelerationRate;
|
|
1473
|
+
|
|
1474
|
+
// snapToOffsets has priority over snapToInterval (matches React Native behavior)
|
|
1475
|
+
if (viewProps.snapToInterval > 0 && decelerationRate >= 0.99) {
|
|
1476
|
+
snapAlignment = convertSnapToAlignment(viewProps.snapToAlignment);
|
|
1477
|
+
// Generate snap points based on interval
|
|
1478
|
+
// Calculate the content size to determine how many intervals to create
|
|
1479
|
+
float contentLength = viewProps.horizontal
|
|
1480
|
+
? std::max(m_contentSize.width, m_layoutMetrics.frame.size.width) * m_layoutMetrics.pointScaleFactor
|
|
1481
|
+
: std::max(m_contentSize.height, m_layoutMetrics.frame.size.height) * m_layoutMetrics.pointScaleFactor;
|
|
1482
|
+
|
|
1483
|
+
float interval = static_cast<float>(viewProps.snapToInterval) * m_layoutMetrics.pointScaleFactor;
|
|
1484
|
+
|
|
1485
|
+
// Ensure we have a reasonable minimum interval to avoid infinite loops or excessive memory usage
|
|
1486
|
+
if (interval >= 1.0f && contentLength > 0) {
|
|
1487
|
+
// Generate offsets at each interval, but limit the number of snap points to avoid excessive memory usage
|
|
1488
|
+
int snapPointCount = 0;
|
|
1489
|
+
|
|
1490
|
+
for (float offset = 0; offset <= contentLength && snapPointCount < c_maxSnapPoints; offset += interval) {
|
|
1491
|
+
snapToOffsets.Append(offset);
|
|
1492
|
+
snapPointCount++;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
m_scrollVisual.SetSnapPoints(viewProps.snapToStart, viewProps.snapToEnd, snapToOffsets.GetView(), snapAlignment);
|
|
1498
|
+
}
|
|
1418
1499
|
} // namespace winrt::Microsoft::ReactNative::Composition::implementation
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
20
20
|
|
|
21
|
+
using namespace Microsoft::ReactNative::Composition::Experimental;
|
|
22
|
+
|
|
21
23
|
struct ScrollBarComponent;
|
|
22
24
|
|
|
23
25
|
struct ScrollViewComponentView : ScrollViewComponentViewT<ScrollViewComponentView, ViewComponentView> {
|
|
@@ -121,6 +123,7 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
|
|
|
121
123
|
private:
|
|
122
124
|
void updateDecelerationRate(float value) noexcept;
|
|
123
125
|
void updateContentVisualSize() noexcept;
|
|
126
|
+
void updateSnapPoints() noexcept;
|
|
124
127
|
bool scrollToEnd(bool animate) noexcept;
|
|
125
128
|
bool scrollToStart(bool animate) noexcept;
|
|
126
129
|
bool scrollDown(float delta, bool animate) noexcept;
|
|
@@ -134,6 +137,8 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
|
|
|
134
137
|
winrt::Microsoft::ReactNative::Composition::Experimental::IScrollPositionChangedArgs const &args) noexcept;
|
|
135
138
|
void updateShowsHorizontalScrollIndicator(bool value) noexcept;
|
|
136
139
|
void updateShowsVerticalScrollIndicator(bool value) noexcept;
|
|
140
|
+
SnapAlignment convertSnapToAlignment(facebook::react::ScrollViewSnapToAlignment alignment) noexcept;
|
|
141
|
+
winrt::Windows::Foundation::Collections::IVector<float> CreateSnapToOffsets(const std::vector<float> &offsets);
|
|
137
142
|
|
|
138
143
|
facebook::react::Size m_contentSize;
|
|
139
144
|
winrt::Microsoft::ReactNative::Composition::Experimental::IScrollVisual m_scrollVisual{nullptr};
|
package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp
CHANGED
|
@@ -320,20 +320,30 @@ struct CompTextHost : public winrt::implements<CompTextHost, ITextHost> {
|
|
|
320
320
|
return (*m_outer->windowsTextInputProps().textAttributes.foregroundColor).AsColorRefNoAlpha();
|
|
321
321
|
// cr = 0x000000FF;
|
|
322
322
|
break;
|
|
323
|
-
|
|
324
323
|
case COLOR_WINDOW:
|
|
325
324
|
if (m_outer->viewProps()->backgroundColor)
|
|
326
325
|
return (*m_outer->viewProps()->backgroundColor).AsColorRefNoAlpha();
|
|
327
326
|
break;
|
|
328
|
-
// case COLOR_HIGHLIGHT:
|
|
329
|
-
// cr = RGB(0, 0, 255);
|
|
330
|
-
// cr = 0x0000ffFF;
|
|
331
|
-
// break;
|
|
332
327
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
328
|
+
case COLOR_HIGHLIGHT:
|
|
329
|
+
if (m_outer->windowsTextInputProps().selectionColor)
|
|
330
|
+
return (*m_outer->windowsTextInputProps().selectionColor).AsColorRefNoAlpha();
|
|
331
|
+
break;
|
|
332
|
+
|
|
333
|
+
case COLOR_HIGHLIGHTTEXT:
|
|
334
|
+
// For selected text color, we use the same color as the selection background
|
|
335
|
+
// or the text color if selection color is not specified
|
|
336
|
+
if (m_outer->windowsTextInputProps().selectionColor) {
|
|
337
|
+
// Calculate appropriate text color based on selection background
|
|
338
|
+
auto selectionColor = (*m_outer->windowsTextInputProps().selectionColor).AsColorRefNoAlpha();
|
|
339
|
+
// Use white text for dark selection, black text for light selection
|
|
340
|
+
int r = GetRValue(selectionColor);
|
|
341
|
+
int g = GetGValue(selectionColor);
|
|
342
|
+
int b = GetBValue(selectionColor);
|
|
343
|
+
int brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
|
344
|
+
return brightness > 125 ? RGB(0, 0, 0) : RGB(255, 255, 255);
|
|
345
|
+
}
|
|
346
|
+
break;
|
|
337
347
|
|
|
338
348
|
// case COLOR_GRAYTEXT:
|
|
339
349
|
// cr = RGB(128, 128, 128);
|
|
@@ -749,6 +759,24 @@ void WindowsTextInputComponentView::OnPointerReleased(
|
|
|
749
759
|
auto hr = m_textServices->TxSendMessage(msg, static_cast<WPARAM>(wParam), static_cast<LPARAM>(lParam), &lresult);
|
|
750
760
|
args.Handled(hr != S_FALSE);
|
|
751
761
|
}
|
|
762
|
+
|
|
763
|
+
// Emits the OnPressOut event
|
|
764
|
+
if (m_eventEmitter && !m_comingFromJS) {
|
|
765
|
+
auto emitter = std::static_pointer_cast<const facebook::react::WindowsTextInputEventEmitter>(m_eventEmitter);
|
|
766
|
+
float offsetX = position.X - m_layoutMetrics.frame.origin.x;
|
|
767
|
+
float offsetY = position.Y - m_layoutMetrics.frame.origin.y;
|
|
768
|
+
float neutralX = m_layoutMetrics.frame.origin.x;
|
|
769
|
+
float neutralY = m_layoutMetrics.frame.origin.y;
|
|
770
|
+
|
|
771
|
+
facebook::react::GestureResponderEvent pressOutArgs;
|
|
772
|
+
pressOutArgs.target = m_tag;
|
|
773
|
+
pressOutArgs.pagePoint = {position.X, position.Y};
|
|
774
|
+
pressOutArgs.offsetPoint = {offsetX, offsetY}; //{LocationX,LocationY}
|
|
775
|
+
pressOutArgs.timestamp = static_cast<double>(pp.Timestamp()) / 1000.0;
|
|
776
|
+
pressOutArgs.identifier = pp.PointerId();
|
|
777
|
+
|
|
778
|
+
emitter->onPressOut(pressOutArgs);
|
|
779
|
+
}
|
|
752
780
|
}
|
|
753
781
|
|
|
754
782
|
void WindowsTextInputComponentView::OnPointerMoved(
|
|
@@ -783,6 +811,29 @@ void WindowsTextInputComponentView::OnPointerMoved(
|
|
|
783
811
|
DVASPECT_CONTENT, -1, nullptr, nullptr, nullptr, nullptr, nullptr, ptContainer.x, ptContainer.y);
|
|
784
812
|
}
|
|
785
813
|
|
|
814
|
+
void WindowsTextInputComponentView::OnPointerWheelChanged(
|
|
815
|
+
const winrt::Microsoft::ReactNative::Composition::Input::PointerRoutedEventArgs &args) noexcept {
|
|
816
|
+
if (windowsTextInputProps().scrollEnabled && windowsTextInputProps().multiline) {
|
|
817
|
+
auto pointerPointProperties = args.GetCurrentPoint(-1).Properties();
|
|
818
|
+
|
|
819
|
+
auto delta = static_cast<float>(pointerPointProperties.MouseWheelDelta());
|
|
820
|
+
|
|
821
|
+
if (m_textServices && !pointerPointProperties.IsHorizontalMouseWheel()) {
|
|
822
|
+
// Vertical scrolling
|
|
823
|
+
if (delta > 0) {
|
|
824
|
+
m_textServices->TxSendMessage(WM_VSCROLL, SB_LINEUP, 0, nullptr);
|
|
825
|
+
} else {
|
|
826
|
+
m_textServices->TxSendMessage(WM_VSCROLL, SB_LINEDOWN, 0, nullptr);
|
|
827
|
+
}
|
|
828
|
+
args.Handled(true);
|
|
829
|
+
}
|
|
830
|
+
// Emit the onScroll event
|
|
831
|
+
EmitOnScrollEvent();
|
|
832
|
+
|
|
833
|
+
// We don't support horizontal scrolling yet cause it is not implemented in Android/IOS
|
|
834
|
+
}
|
|
835
|
+
Super::OnPointerWheelChanged(args);
|
|
836
|
+
}
|
|
786
837
|
void WindowsTextInputComponentView::OnKeyDown(
|
|
787
838
|
const winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs &args) noexcept {
|
|
788
839
|
// Do not forward tab keys into the TextInput, since we want that to do the tab loop instead. This aligns with WinUI
|
|
@@ -808,7 +859,6 @@ void WindowsTextInputComponentView::OnKeyDown(
|
|
|
808
859
|
args.Handled(true);
|
|
809
860
|
}
|
|
810
861
|
}
|
|
811
|
-
|
|
812
862
|
Super::OnKeyDown(args);
|
|
813
863
|
}
|
|
814
864
|
|
|
@@ -838,7 +888,6 @@ void WindowsTextInputComponentView::OnKeyUp(
|
|
|
838
888
|
args.Handled(true);
|
|
839
889
|
}
|
|
840
890
|
}
|
|
841
|
-
|
|
842
891
|
Super::OnKeyUp(args);
|
|
843
892
|
}
|
|
844
893
|
|
|
@@ -1052,7 +1101,10 @@ void WindowsTextInputComponentView::updateProps(
|
|
|
1052
1101
|
oldTextInputProps.textAttributes.fontWeight != newTextInputProps.textAttributes.fontWeight ||
|
|
1053
1102
|
!facebook::react::floatEquality(
|
|
1054
1103
|
oldTextInputProps.textAttributes.letterSpacing, newTextInputProps.textAttributes.letterSpacing) ||
|
|
1055
|
-
oldTextInputProps.textAttributes.fontFamily != newTextInputProps.textAttributes.fontFamily
|
|
1104
|
+
oldTextInputProps.textAttributes.fontFamily != newTextInputProps.textAttributes.fontFamily ||
|
|
1105
|
+
!facebook::react::floatEquality(
|
|
1106
|
+
oldTextInputProps.textAttributes.maxFontSizeMultiplier,
|
|
1107
|
+
newTextInputProps.textAttributes.maxFontSizeMultiplier)) {
|
|
1056
1108
|
m_propBitsMask |= TXTBIT_CHARFORMATCHANGE;
|
|
1057
1109
|
m_propBits |= TXTBIT_CHARFORMATCHANGE;
|
|
1058
1110
|
}
|
|
@@ -1126,11 +1178,14 @@ void WindowsTextInputComponentView::updateProps(
|
|
|
1126
1178
|
bool effectiveSpellCheck = newTextInputProps.spellCheck || newTextInputProps.autoCorrect;
|
|
1127
1179
|
updateSpellCheck(effectiveSpellCheck);
|
|
1128
1180
|
}
|
|
1129
|
-
|
|
1130
1181
|
if (!oldProps || oldTextInputProps.autoCorrect != newTextInputProps.autoCorrect) {
|
|
1131
1182
|
updateAutoCorrect(newTextInputProps.autoCorrect);
|
|
1132
1183
|
}
|
|
1133
1184
|
|
|
1185
|
+
if (oldTextInputProps.selectionColor != newTextInputProps.selectionColor) {
|
|
1186
|
+
m_needsRedraw = true;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1134
1189
|
UpdatePropertyBits();
|
|
1135
1190
|
}
|
|
1136
1191
|
|
|
@@ -1216,6 +1271,49 @@ void WindowsTextInputComponentView::updateLayoutMetrics(
|
|
|
1216
1271
|
m_imgHeight = newHeight;
|
|
1217
1272
|
}
|
|
1218
1273
|
|
|
1274
|
+
std::pair<float, float> WindowsTextInputComponentView::GetContentSize() const noexcept {
|
|
1275
|
+
if (!m_textServices)
|
|
1276
|
+
return {0.0f, 0.0f};
|
|
1277
|
+
|
|
1278
|
+
// Get a device context for measurement
|
|
1279
|
+
HDC hdc = GetDC(nullptr);
|
|
1280
|
+
if (!hdc)
|
|
1281
|
+
return {0.0f, 0.0f};
|
|
1282
|
+
|
|
1283
|
+
// Use the layout width as the constraint (always multiline)
|
|
1284
|
+
float availableWidth = m_layoutMetrics.frame.size.width;
|
|
1285
|
+
float scale = m_layoutMetrics.pointScaleFactor;
|
|
1286
|
+
float dpi = m_layoutMetrics.pointScaleFactor * GetDpiForSystem();
|
|
1287
|
+
constexpr float HIMETRIC_PER_INCH = 2540.0f;
|
|
1288
|
+
|
|
1289
|
+
SIZE extentHimetric = {
|
|
1290
|
+
static_cast<LONG>(availableWidth * scale * HIMETRIC_PER_INCH / dpi),
|
|
1291
|
+
static_cast<LONG>(std::numeric_limits<LONG>::max() * HIMETRIC_PER_INCH / dpi)};
|
|
1292
|
+
|
|
1293
|
+
SIZE naturalSize = {0, 0};
|
|
1294
|
+
|
|
1295
|
+
HRESULT hr = m_textServices->TxGetNaturalSize(
|
|
1296
|
+
DVASPECT_CONTENT,
|
|
1297
|
+
hdc,
|
|
1298
|
+
nullptr,
|
|
1299
|
+
nullptr,
|
|
1300
|
+
static_cast<DWORD>(TXTNS_FITTOCONTENTWSP),
|
|
1301
|
+
reinterpret_cast<SIZEL *>(&extentHimetric),
|
|
1302
|
+
&naturalSize.cx,
|
|
1303
|
+
&naturalSize.cy);
|
|
1304
|
+
|
|
1305
|
+
ReleaseDC(nullptr, hdc);
|
|
1306
|
+
|
|
1307
|
+
if (FAILED(hr)) {
|
|
1308
|
+
return {0.0f, 0.0f};
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
float contentWidth = static_cast<float>(naturalSize.cx) / scale;
|
|
1312
|
+
float contentHeight = static_cast<float>(naturalSize.cy) / scale;
|
|
1313
|
+
|
|
1314
|
+
return {contentWidth, contentHeight};
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1219
1317
|
// When we are notified by RichEdit that the text changed, we need to notify JS
|
|
1220
1318
|
void WindowsTextInputComponentView::OnTextUpdated() noexcept {
|
|
1221
1319
|
auto data = m_state->getData();
|
|
@@ -1234,6 +1332,13 @@ void WindowsTextInputComponentView::OnTextUpdated() noexcept {
|
|
|
1234
1332
|
onChangeArgs.text = GetTextFromRichEdit();
|
|
1235
1333
|
onChangeArgs.eventCount = ++m_nativeEventCount;
|
|
1236
1334
|
emitter->onChange(onChangeArgs);
|
|
1335
|
+
if (windowsTextInputProps().multiline) {
|
|
1336
|
+
auto [contentWidth, contentHeight] = GetContentSize();
|
|
1337
|
+
facebook::react::WindowsTextInputEventEmitter::OnContentSizeChange onContentSizeChangeArgs;
|
|
1338
|
+
onContentSizeChangeArgs.contentSize.width = contentWidth;
|
|
1339
|
+
onContentSizeChangeArgs.contentSize.height = contentHeight;
|
|
1340
|
+
emitter->onContentSizeChange(onContentSizeChangeArgs);
|
|
1341
|
+
}
|
|
1237
1342
|
}
|
|
1238
1343
|
|
|
1239
1344
|
if (UiaClientsAreListening()) {
|
|
@@ -1243,6 +1348,22 @@ void WindowsTextInputComponentView::OnTextUpdated() noexcept {
|
|
|
1243
1348
|
}
|
|
1244
1349
|
}
|
|
1245
1350
|
|
|
1351
|
+
void WindowsTextInputComponentView::EmitOnScrollEvent() noexcept {
|
|
1352
|
+
if (!windowsTextInputProps().scrollEnabled || !m_eventEmitter || m_comingFromJS || !m_textServices) {
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1355
|
+
LONG hMin, hMax, hPos, hPage;
|
|
1356
|
+
LONG vMin, vMax, vPos, vPage;
|
|
1357
|
+
BOOL hEnabled, vEnabled;
|
|
1358
|
+
winrt::check_hresult(m_textServices->TxGetHScroll(&hMin, &hMax, &hPos, &hPage, &hEnabled));
|
|
1359
|
+
winrt::check_hresult(m_textServices->TxGetVScroll(&vMin, &vMax, &vPos, &vPage, &vEnabled));
|
|
1360
|
+
facebook::react::Point offset;
|
|
1361
|
+
offset.x = static_cast<float>(hPos);
|
|
1362
|
+
offset.y = static_cast<float>(vPos);
|
|
1363
|
+
auto emitter = std::static_pointer_cast<const facebook::react::WindowsTextInputEventEmitter>(m_eventEmitter);
|
|
1364
|
+
emitter->onScroll(offset);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1246
1367
|
void WindowsTextInputComponentView::OnSelectionChanged(LONG start, LONG end) noexcept {
|
|
1247
1368
|
if (m_eventEmitter && !m_comingFromState /* && !m_comingFromJS ?? */) {
|
|
1248
1369
|
auto emitter = std::static_pointer_cast<const facebook::react::WindowsTextInputEventEmitter>(m_eventEmitter);
|
|
@@ -1308,6 +1429,13 @@ void WindowsTextInputComponentView::onMounted() noexcept {
|
|
|
1308
1429
|
m_propBits |= TXTBIT_CHARFORMATCHANGE;
|
|
1309
1430
|
}
|
|
1310
1431
|
InternalFinalize();
|
|
1432
|
+
|
|
1433
|
+
// Handle autoFocus property - focus the component when mounted if autoFocus is true
|
|
1434
|
+
if (windowsTextInputProps().autoFocus) {
|
|
1435
|
+
if (auto root = rootComponentView()) {
|
|
1436
|
+
root->TrySetFocusedComponent(*get_strong(), winrt::Microsoft::ReactNative::FocusNavigationDirection::None);
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1311
1439
|
}
|
|
1312
1440
|
|
|
1313
1441
|
std::optional<std::string> WindowsTextInputComponentView::getAccessiblityValue() noexcept {
|
|
@@ -1352,9 +1480,15 @@ void WindowsTextInputComponentView::UpdateCharFormat() noexcept {
|
|
|
1352
1480
|
|
|
1353
1481
|
// set font size -- 15 to convert twips to pt
|
|
1354
1482
|
const auto &props = windowsTextInputProps();
|
|
1355
|
-
float fontSize =
|
|
1483
|
+
float fontSize =
|
|
1356
1484
|
(std::isnan(props.textAttributes.fontSize) ? facebook::react::TextAttributes::defaultTextAttributes().fontSize
|
|
1357
1485
|
: props.textAttributes.fontSize);
|
|
1486
|
+
|
|
1487
|
+
// Apply maxFontSizeMultiplier if specified
|
|
1488
|
+
auto maxFontSizeMultiplier = windowsTextInputProps().textAttributes.maxFontSizeMultiplier;
|
|
1489
|
+
fontSize *=
|
|
1490
|
+
(maxFontSizeMultiplier >= 1.0f) ? std::min(maxFontSizeMultiplier, m_fontSizeMultiplier) : m_fontSizeMultiplier;
|
|
1491
|
+
|
|
1358
1492
|
// TODO get fontSize from props.textAttributes, or defaultTextAttributes, or fragment?
|
|
1359
1493
|
cfNew.dwMask |= CFM_SIZE;
|
|
1360
1494
|
cfNew.yHeight = static_cast<LONG>(fontSize * 15);
|
|
@@ -60,6 +60,8 @@ struct WindowsTextInputComponentView
|
|
|
60
60
|
const winrt::Microsoft::ReactNative::Composition::Input::PointerRoutedEventArgs &args) noexcept override;
|
|
61
61
|
void OnPointerMoved(
|
|
62
62
|
const winrt::Microsoft::ReactNative::Composition::Input::PointerRoutedEventArgs &args) noexcept override;
|
|
63
|
+
void OnPointerWheelChanged(
|
|
64
|
+
const winrt::Microsoft::ReactNative::Composition::Input::PointerRoutedEventArgs &args) noexcept override;
|
|
63
65
|
|
|
64
66
|
void OnKeyDown(const winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs &args) noexcept override;
|
|
65
67
|
void OnKeyUp(const winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs &args) noexcept override;
|
|
@@ -97,7 +99,9 @@ struct WindowsTextInputComponentView
|
|
|
97
99
|
void UpdateParaFormat() noexcept;
|
|
98
100
|
void UpdateText(const std::string &str) noexcept;
|
|
99
101
|
void OnTextUpdated() noexcept;
|
|
102
|
+
void EmitOnScrollEvent() noexcept;
|
|
100
103
|
void OnSelectionChanged(LONG start, LONG end) noexcept;
|
|
104
|
+
std::pair<float, float> GetContentSize() const noexcept;
|
|
101
105
|
std::string GetTextFromRichEdit() const noexcept;
|
|
102
106
|
void updateCursorColor(
|
|
103
107
|
const facebook::react::SharedColor &cursorColor,
|
|
@@ -93,4 +93,33 @@ void WindowsTextInputEventEmitter::onEndEditing(OnEndEditing event) const {
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
void WindowsTextInputEventEmitter::onPressOut(GestureResponderEvent event) const {
|
|
97
|
+
dispatchEvent("textInputPressOut", [event = std::move(event)](jsi::Runtime &runtime) {
|
|
98
|
+
auto payload = jsi::Object(runtime);
|
|
99
|
+
auto nativeEvent = jsi::Object(runtime);
|
|
100
|
+
nativeEvent.setProperty(runtime, "target", static_cast<double>(event.target));
|
|
101
|
+
nativeEvent.setProperty(runtime, "pageX", event.pagePoint.x);
|
|
102
|
+
nativeEvent.setProperty(runtime, "pageY", event.pagePoint.y);
|
|
103
|
+
nativeEvent.setProperty(runtime, "locationX", event.offsetPoint.x);
|
|
104
|
+
nativeEvent.setProperty(runtime, "locationY", event.offsetPoint.y);
|
|
105
|
+
nativeEvent.setProperty(runtime, "timestamp", event.timestamp);
|
|
106
|
+
nativeEvent.setProperty(runtime, "identifier", static_cast<double>(event.identifier));
|
|
107
|
+
payload.setProperty(runtime, "nativeEvent", nativeEvent);
|
|
108
|
+
return payload;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
void WindowsTextInputEventEmitter::onScroll(facebook::react::Point offset) const {
|
|
113
|
+
dispatchEvent("textInputScroll", [offset = std::move(offset)](jsi::Runtime &runtime) {
|
|
114
|
+
auto payload = jsi::Object(runtime);
|
|
115
|
+
{
|
|
116
|
+
auto contentOffsetObj = jsi::Object(runtime);
|
|
117
|
+
contentOffsetObj.setProperty(runtime, "x", offset.x);
|
|
118
|
+
contentOffsetObj.setProperty(runtime, "y", offset.y);
|
|
119
|
+
payload.setProperty(runtime, "contentOffset", contentOffsetObj);
|
|
120
|
+
}
|
|
121
|
+
return payload;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
96
125
|
} // namespace facebook::react
|
|
@@ -54,6 +54,8 @@ class WindowsTextInputEventEmitter : public ViewEventEmitter {
|
|
|
54
54
|
void onContentSizeChange(OnContentSizeChange value) const;
|
|
55
55
|
void onPressIn(GestureResponderEvent event) const override;
|
|
56
56
|
void onEndEditing(OnEndEditing value) const;
|
|
57
|
+
void onPressOut(GestureResponderEvent event) const override;
|
|
58
|
+
void onScroll(facebook::react::Point offset) const;
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
} // namespace facebook::react
|