react-native-windows 0.79.3 → 0.80.0-preview.1
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 +4 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +2 -0
- 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 +34 -94
- 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 +2 -1
- 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
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include "AccessibilityProps.h"
|
|
9
|
+
|
|
10
|
+
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
11
|
+
#include <react/renderer/components/view/accessibilityPropsConversions.h>
|
|
12
|
+
#include <react/renderer/components/view/propsConversions.h>
|
|
13
|
+
#include <react/renderer/core/propsConversions.h>
|
|
14
|
+
#include <react/renderer/debug/debugStringConvertibleUtils.h>
|
|
15
|
+
|
|
16
|
+
namespace facebook::react {
|
|
17
|
+
|
|
18
|
+
AccessibilityProps::AccessibilityProps(
|
|
19
|
+
const PropsParserContext& context,
|
|
20
|
+
const AccessibilityProps& sourceProps,
|
|
21
|
+
const RawProps& rawProps)
|
|
22
|
+
: accessible(
|
|
23
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
24
|
+
? sourceProps.accessible
|
|
25
|
+
: convertRawProp(
|
|
26
|
+
context,
|
|
27
|
+
rawProps,
|
|
28
|
+
"accessible",
|
|
29
|
+
sourceProps.accessible,
|
|
30
|
+
false)),
|
|
31
|
+
accessibilityState(
|
|
32
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
33
|
+
? sourceProps.accessibilityState
|
|
34
|
+
: convertRawProp(
|
|
35
|
+
context,
|
|
36
|
+
rawProps,
|
|
37
|
+
"accessibilityState",
|
|
38
|
+
sourceProps.accessibilityState,
|
|
39
|
+
{})),
|
|
40
|
+
accessibilityLabel(
|
|
41
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
42
|
+
? sourceProps.accessibilityLabel
|
|
43
|
+
: convertRawProp(
|
|
44
|
+
context,
|
|
45
|
+
rawProps,
|
|
46
|
+
"accessibilityLabel",
|
|
47
|
+
sourceProps.accessibilityLabel,
|
|
48
|
+
"")),
|
|
49
|
+
accessibilityOrder(
|
|
50
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
51
|
+
? sourceProps.accessibilityOrder
|
|
52
|
+
: convertRawProp(
|
|
53
|
+
context,
|
|
54
|
+
rawProps,
|
|
55
|
+
"experimental_accessibilityOrder",
|
|
56
|
+
sourceProps.accessibilityOrder,
|
|
57
|
+
{})),
|
|
58
|
+
accessibilityLabelledBy(
|
|
59
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
60
|
+
? sourceProps.accessibilityLabelledBy
|
|
61
|
+
: convertRawProp(
|
|
62
|
+
context,
|
|
63
|
+
rawProps,
|
|
64
|
+
"accessibilityLabelledBy",
|
|
65
|
+
sourceProps.accessibilityLabelledBy,
|
|
66
|
+
{})),
|
|
67
|
+
accessibilityLiveRegion(
|
|
68
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
69
|
+
? sourceProps.accessibilityLiveRegion
|
|
70
|
+
: convertRawProp(
|
|
71
|
+
context,
|
|
72
|
+
rawProps,
|
|
73
|
+
"accessibilityLiveRegion",
|
|
74
|
+
sourceProps.accessibilityLiveRegion,
|
|
75
|
+
AccessibilityLiveRegion::None)),
|
|
76
|
+
accessibilityHint(
|
|
77
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
78
|
+
? sourceProps.accessibilityHint
|
|
79
|
+
: convertRawProp(
|
|
80
|
+
context,
|
|
81
|
+
rawProps,
|
|
82
|
+
"accessibilityHint",
|
|
83
|
+
sourceProps.accessibilityHint,
|
|
84
|
+
"")),
|
|
85
|
+
accessibilityLanguage(
|
|
86
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
87
|
+
? sourceProps.accessibilityLanguage
|
|
88
|
+
: convertRawProp(
|
|
89
|
+
context,
|
|
90
|
+
rawProps,
|
|
91
|
+
"accessibilityLanguage",
|
|
92
|
+
sourceProps.accessibilityLanguage,
|
|
93
|
+
"")),
|
|
94
|
+
accessibilityLargeContentTitle(
|
|
95
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
96
|
+
? sourceProps.accessibilityLargeContentTitle
|
|
97
|
+
: convertRawProp(
|
|
98
|
+
context,
|
|
99
|
+
rawProps,
|
|
100
|
+
"accessibilityLargeContentTitle",
|
|
101
|
+
sourceProps.accessibilityLargeContentTitle,
|
|
102
|
+
"")),
|
|
103
|
+
accessibilityValue(
|
|
104
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
105
|
+
? sourceProps.accessibilityValue
|
|
106
|
+
: convertRawProp(
|
|
107
|
+
context,
|
|
108
|
+
rawProps,
|
|
109
|
+
"accessibilityValue",
|
|
110
|
+
sourceProps.accessibilityValue,
|
|
111
|
+
{})),
|
|
112
|
+
accessibilityActions(
|
|
113
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
114
|
+
? sourceProps.accessibilityActions
|
|
115
|
+
: convertRawProp(
|
|
116
|
+
context,
|
|
117
|
+
rawProps,
|
|
118
|
+
"accessibilityActions",
|
|
119
|
+
sourceProps.accessibilityActions,
|
|
120
|
+
{})),
|
|
121
|
+
accessibilityShowsLargeContentViewer(
|
|
122
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
123
|
+
? sourceProps.accessibilityShowsLargeContentViewer
|
|
124
|
+
: convertRawProp(
|
|
125
|
+
context,
|
|
126
|
+
rawProps,
|
|
127
|
+
"accessibilityShowsLargeContentViewer",
|
|
128
|
+
sourceProps.accessibilityShowsLargeContentViewer,
|
|
129
|
+
false)),
|
|
130
|
+
accessibilityViewIsModal(
|
|
131
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
132
|
+
? sourceProps.accessibilityViewIsModal
|
|
133
|
+
: convertRawProp(
|
|
134
|
+
context,
|
|
135
|
+
rawProps,
|
|
136
|
+
"accessibilityViewIsModal",
|
|
137
|
+
sourceProps.accessibilityViewIsModal,
|
|
138
|
+
false)),
|
|
139
|
+
accessibilityElementsHidden(
|
|
140
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
141
|
+
? sourceProps.accessibilityElementsHidden
|
|
142
|
+
: convertRawProp(
|
|
143
|
+
context,
|
|
144
|
+
rawProps,
|
|
145
|
+
"accessibilityElementsHidden",
|
|
146
|
+
sourceProps.accessibilityElementsHidden,
|
|
147
|
+
false)),
|
|
148
|
+
accessibilityIgnoresInvertColors(
|
|
149
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
150
|
+
? sourceProps.accessibilityIgnoresInvertColors
|
|
151
|
+
: convertRawProp(
|
|
152
|
+
context,
|
|
153
|
+
rawProps,
|
|
154
|
+
"accessibilityIgnoresInvertColors",
|
|
155
|
+
sourceProps.accessibilityIgnoresInvertColors,
|
|
156
|
+
false)),
|
|
157
|
+
onAccessibilityTap(
|
|
158
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
159
|
+
? sourceProps.onAccessibilityTap
|
|
160
|
+
: convertRawProp(
|
|
161
|
+
context,
|
|
162
|
+
rawProps,
|
|
163
|
+
"onAccessibilityTap",
|
|
164
|
+
sourceProps.onAccessibilityTap,
|
|
165
|
+
{})),
|
|
166
|
+
onAccessibilityMagicTap(
|
|
167
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
168
|
+
? sourceProps.onAccessibilityMagicTap
|
|
169
|
+
: convertRawProp(
|
|
170
|
+
context,
|
|
171
|
+
rawProps,
|
|
172
|
+
"onAccessibilityMagicTap",
|
|
173
|
+
sourceProps.onAccessibilityMagicTap,
|
|
174
|
+
{})),
|
|
175
|
+
onAccessibilityEscape(
|
|
176
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
177
|
+
? sourceProps.onAccessibilityEscape
|
|
178
|
+
: convertRawProp(
|
|
179
|
+
context,
|
|
180
|
+
rawProps,
|
|
181
|
+
"onAccessibilityEscape",
|
|
182
|
+
sourceProps.onAccessibilityEscape,
|
|
183
|
+
{})),
|
|
184
|
+
onAccessibilityAction(
|
|
185
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
186
|
+
? sourceProps.onAccessibilityAction
|
|
187
|
+
: convertRawProp(
|
|
188
|
+
context,
|
|
189
|
+
rawProps,
|
|
190
|
+
"onAccessibilityAction",
|
|
191
|
+
sourceProps.onAccessibilityAction,
|
|
192
|
+
{})),
|
|
193
|
+
importantForAccessibility(
|
|
194
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
195
|
+
? sourceProps.importantForAccessibility
|
|
196
|
+
: convertRawProp(
|
|
197
|
+
context,
|
|
198
|
+
rawProps,
|
|
199
|
+
"importantForAccessibility",
|
|
200
|
+
sourceProps.importantForAccessibility,
|
|
201
|
+
ImportantForAccessibility::Auto)),
|
|
202
|
+
testId(
|
|
203
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
204
|
+
? sourceProps.testId
|
|
205
|
+
: convertRawProp(
|
|
206
|
+
context,
|
|
207
|
+
rawProps,
|
|
208
|
+
"testID",
|
|
209
|
+
sourceProps.testId,
|
|
210
|
+
"")) {
|
|
211
|
+
// It is a (severe!) perf deoptimization to request props out-of-order.
|
|
212
|
+
// Thus, since we need to request the same prop twice here
|
|
213
|
+
// (accessibilityRole) we "must" do them subsequently here to prevent
|
|
214
|
+
// a regression. It is reasonable to ask if the `at` function can be improved;
|
|
215
|
+
// it probably can, but this is a fairly rare edge-case that (1) is easy-ish
|
|
216
|
+
// to work around here, and (2) would require very careful work to address
|
|
217
|
+
// this case and not regress the more common cases.
|
|
218
|
+
// [Windows ##14845
|
|
219
|
+
if (ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) {
|
|
220
|
+
accessibilityRole = sourceProps.accessibilityRole;
|
|
221
|
+
role = sourceProps.role;
|
|
222
|
+
accessibilityTraits = sourceProps.accessibilityTraits;
|
|
223
|
+
} else {
|
|
224
|
+
// Windows]
|
|
225
|
+
auto* accessibilityRoleValue =
|
|
226
|
+
rawProps.at("accessibilityRole", nullptr, nullptr);
|
|
227
|
+
auto* roleValue = rawProps.at("role", nullptr, nullptr);
|
|
228
|
+
|
|
229
|
+
auto* precedentRoleValue =
|
|
230
|
+
roleValue != nullptr ? roleValue : accessibilityRoleValue;
|
|
231
|
+
|
|
232
|
+
if (accessibilityRoleValue == nullptr ||
|
|
233
|
+
!accessibilityRoleValue->hasValue()) {
|
|
234
|
+
accessibilityRole = sourceProps.accessibilityRole;
|
|
235
|
+
} else {
|
|
236
|
+
fromRawValue(context, *accessibilityRoleValue, accessibilityRole);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (roleValue == nullptr || !roleValue->hasValue()) {
|
|
240
|
+
role = sourceProps.role;
|
|
241
|
+
} else {
|
|
242
|
+
fromRawValue(context, *roleValue, role);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (precedentRoleValue == nullptr || !precedentRoleValue->hasValue()) {
|
|
246
|
+
accessibilityTraits = sourceProps.accessibilityTraits;
|
|
247
|
+
} else {
|
|
248
|
+
fromRawValue(context, *precedentRoleValue, accessibilityTraits);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
void AccessibilityProps::setProp(
|
|
254
|
+
const PropsParserContext& context,
|
|
255
|
+
RawPropsPropNameHash hash,
|
|
256
|
+
const char* /*propName*/,
|
|
257
|
+
const RawValue& value) {
|
|
258
|
+
static auto defaults = AccessibilityProps{};
|
|
259
|
+
|
|
260
|
+
switch (hash) {
|
|
261
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessible);
|
|
262
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityState);
|
|
263
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabel);
|
|
264
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityOrder);
|
|
265
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabelledBy);
|
|
266
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityHint);
|
|
267
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLanguage);
|
|
268
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityShowsLargeContentViewer);
|
|
269
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLargeContentTitle);
|
|
270
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityValue);
|
|
271
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityActions);
|
|
272
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityViewIsModal);
|
|
273
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityElementsHidden);
|
|
274
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityIgnoresInvertColors);
|
|
275
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityTap);
|
|
276
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityMagicTap);
|
|
277
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityEscape);
|
|
278
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityAction);
|
|
279
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(importantForAccessibility);
|
|
280
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(role);
|
|
281
|
+
RAW_SET_PROP_SWITCH_CASE(testId, "testID");
|
|
282
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("accessibilityRole"): {
|
|
283
|
+
AccessibilityTraits traits = AccessibilityTraits::None;
|
|
284
|
+
std::string roleString;
|
|
285
|
+
if (value.hasValue()) {
|
|
286
|
+
fromRawValue(context, value, traits);
|
|
287
|
+
fromRawValue(context, value, roleString);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
accessibilityTraits = traits;
|
|
291
|
+
accessibilityRole = roleString;
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
#pragma mark - DebugStringConvertible
|
|
298
|
+
|
|
299
|
+
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
300
|
+
SharedDebugStringConvertibleList AccessibilityProps::getDebugProps() const {
|
|
301
|
+
const auto& defaultProps = AccessibilityProps();
|
|
302
|
+
return SharedDebugStringConvertibleList{
|
|
303
|
+
debugStringConvertibleItem("testId", testId, defaultProps.testId),
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
#endif // RN_DEBUG_STRING_CONVERTIBLE
|
|
307
|
+
|
|
308
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include "DynamicEventPayload.h"
|
|
9
|
+
|
|
10
|
+
#include <jsi/JSIDynamic.h>
|
|
11
|
+
|
|
12
|
+
namespace facebook::react {
|
|
13
|
+
|
|
14
|
+
DynamicEventPayload::DynamicEventPayload(folly::dynamic &&payload) : payload_(std::move(payload)) {}
|
|
15
|
+
|
|
16
|
+
jsi::Value DynamicEventPayload::asJSIValue(jsi::Runtime &runtime) const {
|
|
17
|
+
return jsi::valueFromDynamic(runtime, payload_);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
EventPayloadType DynamicEventPayload::getType() const {
|
|
21
|
+
return EventPayloadType::ValueFactory;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
std::optional<double> DynamicEventPayload::extractValue(const std::vector<std::string> &path) const {
|
|
25
|
+
auto dynamic = payload_;
|
|
26
|
+
for (auto &key : path) {
|
|
27
|
+
auto type = dynamic.type();
|
|
28
|
+
if ((type == folly::dynamic::Type::OBJECT || type == folly::dynamic::Type::ARRAY) && !dynamic.empty()) {
|
|
29
|
+
dynamic = folly::dynamic(dynamic[key]);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (dynamic.type() == folly::dynamic::Type::DOUBLE) {
|
|
33
|
+
return dynamic.asDouble();
|
|
34
|
+
} else if (dynamic.type() == folly::dynamic::Type::INT64) {
|
|
35
|
+
// [Windows ##14797
|
|
36
|
+
return static_cast<double>(dynamic.asInt());
|
|
37
|
+
// Windows]
|
|
38
|
+
}
|
|
39
|
+
return std::nullopt;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
} // namespace facebook::react
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#include <cmath>
|
|
11
11
|
#include <string_view>
|
|
12
12
|
|
|
13
|
+
#include <folly/../../fast_float-6.1.4/include/fast_float/fast_float.h> // [Windows] - Full relative path needed to find file
|
|
13
14
|
#include <react/renderer/css/CSSToken.h>
|
|
14
15
|
|
|
15
16
|
namespace facebook::react {
|
|
@@ -136,58 +137,13 @@ class CSSTokenizer {
|
|
|
136
137
|
constexpr CSSToken consumeNumber() {
|
|
137
138
|
// https://www.w3.org/TR/css-syntax-3/#consume-number
|
|
138
139
|
// https://www.w3.org/TR/css-syntax-3/#convert-a-string-to-a-number
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (peek() == '-') {
|
|
142
|
-
signPart = -1; // [Windows]
|
|
143
|
-
}
|
|
144
|
-
advance();
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
double intPart = 0;
|
|
148
|
-
while (isDigit(peek())) {
|
|
149
|
-
intPart = intPart * 10 + (peek() - '0');
|
|
150
|
-
advance();
|
|
151
|
-
}
|
|
140
|
+
auto* b = remainingCharacters_.data();
|
|
141
|
+
auto* e = b + remainingCharacters_.size();
|
|
152
142
|
|
|
153
|
-
double fractionalPart = 0;
|
|
154
|
-
int32_t fractionDigits = 0;
|
|
155
|
-
if (peek() == '.') {
|
|
156
|
-
advance();
|
|
157
|
-
while (isDigit(peek())) {
|
|
158
|
-
fractionalPart = fractionalPart * 10 + (peek() - '0');
|
|
159
|
-
fractionDigits++;
|
|
160
|
-
advance();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
int32_t exponentSign = 1; // [Windows]
|
|
165
|
-
double exponentPart = 0;
|
|
166
|
-
if ((peek() == 'e' || peek() == 'E') &&
|
|
167
|
-
(isDigit(peek(1)) ||
|
|
168
|
-
((peek(1) == '+' || peek(1) == '-') && isDigit(peek(2))))) {
|
|
169
|
-
advance();
|
|
170
|
-
if (peek() == '+' || peek() == '-') {
|
|
171
|
-
if (peek() == '-') {
|
|
172
|
-
exponentSign = -1; // [Windows]
|
|
173
|
-
}
|
|
174
|
-
advance();
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
while (isDigit(peek())) {
|
|
178
|
-
exponentPart = exponentPart * 10 + (peek() - '0');
|
|
179
|
-
advance();
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
143
|
float value;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
value = static_cast<float>(
|
|
187
|
-
signPart *
|
|
188
|
-
(intPart + (fractionalPart * std::pow(10, -fractionDigits))) *
|
|
189
|
-
std::pow(10, exponentSign * exponentPart));
|
|
190
|
-
}
|
|
144
|
+
fast_float::parse_options options{
|
|
145
|
+
fast_float::chars_format::general};
|
|
146
|
+
auto [ptr, ec] = fast_float::from_chars_advanced(b, e, value, options);
|
|
191
147
|
|
|
192
148
|
consumeRunningValue();
|
|
193
149
|
return {CSSTokenType::Number, value};
|
|
@@ -274,4 +230,4 @@ class CSSTokenizer {
|
|
|
274
230
|
std::string_view remainingCharacters_;
|
|
275
231
|
size_t position_{0};
|
|
276
232
|
};
|
|
277
|
-
} // namespace facebook::react
|
|
233
|
+
} // namespace facebook::react
|
|
@@ -214,7 +214,8 @@ std::string simpleBasename(const std::string& path) {
|
|
|
214
214
|
void ReactInstance::loadScript(
|
|
215
215
|
std::unique_ptr<const JSBigString> script,
|
|
216
216
|
const std::string& sourceURL,
|
|
217
|
-
std::function<void(jsi::Runtime& runtime)>&&
|
|
217
|
+
std::function<void(jsi::Runtime& runtime)>&& beforeLoad,
|
|
218
|
+
std::function<void(jsi::Runtime& runtime)>&& afterLoad) {
|
|
218
219
|
auto buffer = std::make_shared<BigStringBuffer>(std::move(script));
|
|
219
220
|
std::string scriptName = simpleBasename(sourceURL);
|
|
220
221
|
|
|
@@ -225,7 +226,11 @@ void ReactInstance::loadScript(
|
|
|
225
226
|
weakBufferedRuntimeExecuter =
|
|
226
227
|
std::weak_ptr<BufferedRuntimeExecutor>(
|
|
227
228
|
bufferedRuntimeExecutor_),
|
|
228
|
-
|
|
229
|
+
beforeLoad,
|
|
230
|
+
afterLoad](jsi::Runtime& runtime) {
|
|
231
|
+
if (beforeLoad) {
|
|
232
|
+
beforeLoad(runtime);
|
|
233
|
+
}
|
|
229
234
|
TraceSection s("ReactInstance::loadScript");
|
|
230
235
|
bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl);
|
|
231
236
|
if (hasLogger) {
|
|
@@ -254,8 +259,8 @@ void ReactInstance::loadScript(
|
|
|
254
259
|
weakBufferedRuntimeExecuter.lock()) {
|
|
255
260
|
strongBufferedRuntimeExecuter->flush();
|
|
256
261
|
}
|
|
257
|
-
if (
|
|
258
|
-
|
|
262
|
+
if (afterLoad) {
|
|
263
|
+
afterLoad(runtime);
|
|
259
264
|
}
|
|
260
265
|
});
|
|
261
266
|
}
|
|
@@ -329,7 +334,7 @@ void ReactInstance::registerSegment(
|
|
|
329
334
|
<< segmentId;
|
|
330
335
|
runtimeScheduler_->scheduleWork([=](jsi::Runtime& runtime) {
|
|
331
336
|
TraceSection s("ReactInstance::registerSegment");
|
|
332
|
-
|
|
337
|
+
auto tag = std::to_string(segmentId);
|
|
333
338
|
auto script = JSBigFileString::fromPath(segmentPath);
|
|
334
339
|
if (script->size() == 0) {
|
|
335
340
|
throw std::invalid_argument(
|
package/Scripts/creaternwapp.cmd
CHANGED
|
@@ -111,8 +111,14 @@ for /f "delims=" %%a in ('npm show react@%R_VERSION% version') do @set R_VERSION
|
|
|
111
111
|
|
|
112
112
|
@echo creaternwapp.cmd Creating RNW app "%APP_NAME%" with react@%R_VERSION%, react-native@%RN_VERSION%, and react-native-windows@%RNW_VERSION%
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
set RNCLI_TEMPLATE=
|
|
115
|
+
if not "x%RN_VERSION:nightly=%"=="x%RN_VERSION%" (
|
|
116
|
+
@echo creaternwapp.cmd Override @react-native-community/template version
|
|
117
|
+
set RNCLI_TEMPLATE=--template "@react-native-community/template@^%RN_VERSION:~0,4%.0-"
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
@echo creaternwapp.cmd: Creating base RN app project with: npx --yes @react-native-community/cli@latest init %APP_NAME% --version %RN_VERSION% %RNCLI_TEMPLATE% --verbose --skip-install --install-pods false --skip-git-init true
|
|
121
|
+
call npx --yes @react-native-community/cli@latest init %APP_NAME% --version %RN_VERSION% %RNCLI_TEMPLATE% --verbose --skip-install --install-pods false --skip-git-init true
|
|
116
122
|
|
|
117
123
|
if %ERRORLEVEL% neq 0 (
|
|
118
124
|
@echo creaternwapp.cmd: Unable to create base RN app project
|
|
@@ -134,7 +140,7 @@ call yarn install
|
|
|
134
140
|
@echo creaternwapp.cmd: Creating commit to save current state
|
|
135
141
|
if not exist ".git\" call git init .
|
|
136
142
|
call git add .
|
|
137
|
-
call git commit -m "npx --yes @react-native-community/cli@latest init %APP_NAME% --version %RN_VERSION% --verbose --skip-install --install-pods false --skip-git-init true"
|
|
143
|
+
call git commit -m "npx --yes @react-native-community/cli@latest init %APP_NAME% --version %RN_VERSION% %RNCLI_TEMPLATE% --verbose --skip-install --install-pods false --skip-git-init true"
|
|
138
144
|
|
|
139
145
|
if %USE_VERDACCIO% equ 1 (
|
|
140
146
|
@echo creaternwapp.cmd: Setting yarn to use verdaccio at http://localhost:4873
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -533,7 +533,7 @@
|
|
|
533
533
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\scrollview\ScrollEvent.cpp" />
|
|
534
534
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\featureflags\ReactNativeFeatureFlags.cpp" />
|
|
535
535
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\featureflags\ReactNativeFeatureFlagsAccessor.cpp" />
|
|
536
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\CdpJson.cpp" />
|
|
536
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\cdp\CdpJson.cpp" />
|
|
537
537
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ExecutionContext.cpp" />
|
|
538
538
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ExecutionContextManager.cpp" />
|
|
539
539
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\FallbackRuntimeAgentDelegate.cpp" />
|
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\ReactPerfettoLogger.cpp" />
|
|
556
556
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\oscompat\OSCompatPosix.cpp" />
|
|
557
557
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\oscompat\OSCompatWindows.cpp" />
|
|
558
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\network\NetworkReporter.cpp" />
|
|
558
559
|
</ItemGroup>
|
|
559
560
|
<ItemGroup>
|
|
560
561
|
<None Include="$(MSBuildThisFileDirectory)tracing\rnw.wprp" />
|
|
@@ -612,6 +613,7 @@
|
|
|
612
613
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\EventBeat.cpp" />
|
|
613
614
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\EventDispatcher.cpp" DisableSpecificWarnings="4715;%(DisableSpecificWarnings)" />
|
|
614
615
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\EventEmitter.cpp" />
|
|
616
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\DynamicEventPayload.cpp" />
|
|
615
617
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\EventListener.cpp" />
|
|
616
618
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\EventTarget.cpp" />
|
|
617
619
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\EventQueue.cpp" />
|
|
@@ -658,7 +660,6 @@
|
|
|
658
660
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\textlayoutmanager\TextMeasureCache.cpp" />
|
|
659
661
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\PointerEventsProcessor.cpp" />
|
|
660
662
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\PointerHoverTracker.cpp" />
|
|
661
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\consistency\LatestShadowTreeRevisionProvider.cpp" />
|
|
662
663
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\consistency\LazyShadowTreeRevisionConsistencyManager.cpp" />
|
|
663
664
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\UIManager.cpp" />
|
|
664
665
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\UIManagerBinding.cpp" DisableSpecificWarnings="4389;4715;%(DisableSpecificWarnings)" />
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\RuntimeTargetDebuggerSessionObserver.cpp" />
|
|
320
320
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ExecutionContextManager.cpp" />
|
|
321
321
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ExecutionContext.cpp" />
|
|
322
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\CdpJson.cpp" />
|
|
322
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\cdp\CdpJson.cpp" />
|
|
323
323
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ConsoleMessage.cpp" />
|
|
324
324
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\NetworkIOAgent.cpp" />
|
|
325
325
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\utils\jsi-utils.cpp" />
|
|
@@ -343,6 +343,7 @@
|
|
|
343
343
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\oscompat\OSCompatPosix.cpp" />
|
|
344
344
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\oscompat\OSCompatWindows.cpp" />
|
|
345
345
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\WindowsTextLayoutManager.cpp" />
|
|
346
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\network\NetworkReporter.cpp" />
|
|
346
347
|
</ItemGroup>
|
|
347
348
|
<ItemGroup>
|
|
348
349
|
<Filter Include="Source Files">
|
|
@@ -17,6 +17,7 @@ namespace Microsoft::ReactNativeSpecs {
|
|
|
17
17
|
struct AnimatedModuleSpec_EndResult {
|
|
18
18
|
bool finished;
|
|
19
19
|
std::optional<double> value;
|
|
20
|
+
std::optional<double> offset;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
struct AnimatedModuleSpec_EventMapping {
|
|
@@ -29,6 +30,7 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AnimatedModuleSpec_
|
|
|
29
30
|
winrt::Microsoft::ReactNative::FieldMap fieldMap {
|
|
30
31
|
{L"finished", &AnimatedModuleSpec_EndResult::finished},
|
|
31
32
|
{L"value", &AnimatedModuleSpec_EndResult::value},
|
|
33
|
+
{L"offset", &AnimatedModuleSpec_EndResult::offset},
|
|
32
34
|
};
|
|
33
35
|
return fieldMap;
|
|
34
36
|
}
|
|
@@ -17,6 +17,7 @@ namespace Microsoft::ReactNativeSpecs {
|
|
|
17
17
|
struct AnimatedTurboModuleSpec_EndResult {
|
|
18
18
|
bool finished;
|
|
19
19
|
std::optional<double> value;
|
|
20
|
+
std::optional<double> offset;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
struct AnimatedTurboModuleSpec_EventMapping {
|
|
@@ -29,6 +30,7 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AnimatedTurboModule
|
|
|
29
30
|
winrt::Microsoft::ReactNative::FieldMap fieldMap {
|
|
30
31
|
{L"finished", &AnimatedTurboModuleSpec_EndResult::finished},
|
|
31
32
|
{L"value", &AnimatedTurboModuleSpec_EndResult::value},
|
|
33
|
+
{L"offset", &AnimatedTurboModuleSpec_EndResult::offset},
|
|
32
34
|
};
|
|
33
35
|
return fieldMap;
|
|
34
36
|
}
|
|
@@ -33,6 +33,13 @@ struct PerformanceSpec_RawPerformanceEntry {
|
|
|
33
33
|
std::optional<double> processingStart;
|
|
34
34
|
std::optional<double> processingEnd;
|
|
35
35
|
std::optional<double> interactionId;
|
|
36
|
+
std::optional<double> fetchStart;
|
|
37
|
+
std::optional<double> requestStart;
|
|
38
|
+
std::optional<double> connectStart;
|
|
39
|
+
std::optional<double> connectEnd;
|
|
40
|
+
std::optional<double> responseStart;
|
|
41
|
+
std::optional<double> responseEnd;
|
|
42
|
+
std::optional<double> responseStatus;
|
|
36
43
|
};
|
|
37
44
|
|
|
38
45
|
struct PerformanceSpec_ReactNativeStartupTiming {
|
|
@@ -66,6 +73,13 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_Raw
|
|
|
66
73
|
{L"processingStart", &PerformanceSpec_RawPerformanceEntry::processingStart},
|
|
67
74
|
{L"processingEnd", &PerformanceSpec_RawPerformanceEntry::processingEnd},
|
|
68
75
|
{L"interactionId", &PerformanceSpec_RawPerformanceEntry::interactionId},
|
|
76
|
+
{L"fetchStart", &PerformanceSpec_RawPerformanceEntry::fetchStart},
|
|
77
|
+
{L"requestStart", &PerformanceSpec_RawPerformanceEntry::requestStart},
|
|
78
|
+
{L"connectStart", &PerformanceSpec_RawPerformanceEntry::connectStart},
|
|
79
|
+
{L"connectEnd", &PerformanceSpec_RawPerformanceEntry::connectEnd},
|
|
80
|
+
{L"responseStart", &PerformanceSpec_RawPerformanceEntry::responseStart},
|
|
81
|
+
{L"responseEnd", &PerformanceSpec_RawPerformanceEntry::responseEnd},
|
|
82
|
+
{L"responseStatus", &PerformanceSpec_RawPerformanceEntry::responseStatus},
|
|
69
83
|
};
|
|
70
84
|
return fieldMap;
|
|
71
85
|
}
|