react-native-windows 0.84.0-preview.9 → 0.85.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 +1 -5
- package/Common/unicode.cpp +36 -0
- package/Common/unicode.h +8 -0
- package/Directory.Build.props +1 -16
- package/Directory.Build.targets +12 -4
- package/Folly/ThreadNameStub.cpp +4 -6
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
- package/Libraries/Animated/Animated.d.ts +8 -1
- package/Libraries/Animated/AnimatedEvent.js +4 -4
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/animations/Animation.js +3 -3
- package/Libraries/Animated/animations/DecayAnimation.js +4 -4
- package/Libraries/Animated/animations/SpringAnimation.js +5 -5
- package/Libraries/Animated/animations/TimingAnimation.js +5 -5
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +2 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +12 -12
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +3 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +6 -6
- package/Libraries/Animated/nodes/AnimatedStyle.js +7 -7
- package/Libraries/Animated/nodes/AnimatedTransform.js +13 -13
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
- package/Libraries/Animated/useAnimatedColor.d.ts +15 -0
- package/Libraries/Animated/useAnimatedColor.js +25 -0
- package/Libraries/Animated/useAnimatedValueXY.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValueXY.js +26 -0
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +3 -3
- package/Libraries/BatchedBridge/NativeModules.js +12 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +30 -26
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +34 -30
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +2 -2
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/Button.windows.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +2 -2
- package/Libraries/Components/Keyboard/Keyboard.js +6 -6
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +5 -0
- package/Libraries/Components/Pressable/Pressable.js +3 -3
- package/Libraries/Components/Pressable/Pressable.windows.js +3 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +3 -3
- package/Libraries/Components/RefreshControl/RefreshControl.js +5 -5
- package/Libraries/Components/RefreshControl/RefreshControl.windows.js +5 -5
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +8 -12
- package/Libraries/Components/ScrollView/ScrollView.d.ts +9 -0
- package/Libraries/Components/ScrollView/ScrollView.js +19 -9
- package/Libraries/Components/ScrollView/ScrollView.windows.js +19 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +4 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +8 -8
- package/Libraries/Components/Switch/Switch.js +3 -3
- package/Libraries/Components/Switch/Switch.windows.js +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -48
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +6 -11
- package/Libraries/Components/TextInput/TextInput.flow.js +21 -20
- package/Libraries/Components/TextInput/TextInput.flow.windows.js +23 -22
- package/Libraries/Components/TextInput/TextInput.js +8 -4
- package/Libraries/Components/TextInput/TextInput.windows.js +3 -4
- package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +33 -48
- package/Libraries/Components/Touchable/PooledClass.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +2 -2
- package/Libraries/Components/Touchable/Touchable.windows.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +4 -4
- package/Libraries/Components/Touchable/TouchableHighlight.js +8 -8
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +9 -9
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +7 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +7 -7
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +4 -4
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +68 -31
- package/Libraries/Components/View/View.windows.js +1 -1
- package/Libraries/Components/View/ViewAccessibility.js +7 -7
- package/Libraries/Components/View/ViewAccessibility.windows.js +7 -7
- package/Libraries/Components/View/ViewPropTypes.js +14 -14
- package/Libraries/Components/View/ViewPropTypes.windows.js +18 -16
- package/Libraries/Core/Devtools/parseHermesStack.js +8 -8
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ExtendedError.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +3 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +4 -2
- package/Libraries/Core/setUpReactDevTools.js +23 -6
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlay.js +2 -2
- package/Libraries/EventEmitter/NativeEventEmitter.js +7 -9
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +1 -1
- package/Libraries/Image/AssetSourceResolver.windows.js +1 -1
- package/Libraries/Image/Image.android.js +172 -306
- package/Libraries/Image/ImageProps.js +9 -11
- package/Libraries/Image/ImageSource.js +2 -2
- package/Libraries/Image/ImageSourceUtils.js +8 -4
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Image/ImageViewNativeComponent.js +7 -16
- package/Libraries/Image/nativeImageSource.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +5 -4
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +3 -3
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +38 -24
- package/Libraries/LogBox/Data/LogBoxLog.js +43 -112
- package/Libraries/LogBox/Data/parseLogBoxLog.js +21 -117
- package/Libraries/LogBox/LogBox.js +42 -19
- package/Libraries/LogBox/LogBoxInspectorContainer.js +2 -2
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/LogBoxButton.js +14 -16
- package/Libraries/LogBox/UI/LogBoxInspector.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.windows.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +10 -15
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +25 -18
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.windows.js +15 -16
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +5 -7
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.windows.js +3 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +17 -29
- package/Libraries/LogBox/UI/LogBoxMessage.js +28 -37
- package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
- package/Libraries/Modal/Modal.d.ts +4 -0
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/Modal/Modal.windows.js +7 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +28 -52
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -21
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -17
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.windows.js +1 -1
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -3
- package/Libraries/Pressability/Pressability.js +5 -5
- package/Libraries/Pressability/Pressability.windows.js +5 -5
- package/Libraries/Pressability/PressabilityDebug.js +1 -1
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/Pressability/usePressability.js +3 -14
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +18 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -2
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +4 -4
- package/Libraries/ReactNative/UIManagerProperties.js +1 -1
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -2
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNative.js +3 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +0 -5
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
- package/Libraries/StyleSheet/StyleSheetExports.js +16 -25
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +2 -7
- package/Libraries/StyleSheet/StyleSheetTypes.js +33 -35
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +5 -5
- package/Libraries/StyleSheet/private/_TransformStyle.js +7 -7
- package/Libraries/StyleSheet/processBackgroundImage.js +7 -7
- package/Libraries/StyleSheet/processBackgroundPosition.js +4 -4
- package/Libraries/StyleSheet/processBackgroundRepeat.js +4 -4
- package/Libraries/StyleSheet/processBackgroundSize.js +4 -4
- package/Libraries/StyleSheet/processBoxShadow.js +44 -4
- package/Libraries/StyleSheet/processColorArray.js +2 -2
- package/Libraries/StyleSheet/processFilter.js +2 -2
- package/Libraries/Text/Text.js +295 -627
- package/Libraries/Text/Text.windows.js +342 -717
- package/Libraries/Text/TextNativeComponent.js +14 -7
- package/Libraries/Text/TextProps.js +4 -4
- package/Libraries/Text/TextProps.windows.js +4 -4
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +21 -21
- package/Libraries/Types/CoreEventTypes.windows.js +21 -21
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +6 -1
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/HMRClient.js +32 -5
- package/Libraries/Utilities/IPerformanceLogger.js +4 -4
- package/Libraries/Utilities/codegenNativeCommands.js +4 -4
- package/Libraries/Utilities/codegenNativeComponent.d.ts +2 -0
- package/Libraries/Utilities/codegenNativeComponent.js +2 -2
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +3 -3
- package/Libraries/Utilities/useMergeRefs.js +2 -2
- package/Libraries/vendor/core/ErrorUtils.js +4 -4
- package/Libraries/vendor/emitter/EventEmitter.js +16 -20
- package/Microsoft.ReactNative/CallInvoker.cpp +14 -4
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +73 -97
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.h +4 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +5 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +94 -26
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +11 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +135 -18
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +10 -0
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +7 -2
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +63 -15
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +9 -5
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +28 -6
- package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +80 -0
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.h +17 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +11 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +1 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +3 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +0 -3
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +3 -8
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +6 -0
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +4 -63
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +1 -26
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +2 -1
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +2 -17
- package/Microsoft.ReactNative/Modules/AppStateModule.h +0 -4
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +0 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +16 -15
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +5 -1
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +2 -7
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +0 -1
- package/Microsoft.ReactNative/Modules/I18nManagerModule.h +4 -4
- package/Microsoft.ReactNative/QuirkSettings.cpp +0 -133
- package/Microsoft.ReactNative/QuirkSettings.h +0 -43
- package/Microsoft.ReactNative/QuirkSettings.idl +0 -41
- package/Microsoft.ReactNative/ReactHost/CrashManager.cpp +0 -4
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -2
- package/Microsoft.ReactNative/ReactHost/React.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +0 -1
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +3 -26
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +0 -5
- package/Microsoft.ReactNative/ReactHost/React_Win.h +0 -2
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +3 -0
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +7 -0
- package/Microsoft.ReactNative/ReactPackageBuilder.h +1 -0
- package/Microsoft.ReactNative/RedBox.cpp +0 -9
- package/Microsoft.ReactNative/RedBoxHandler.cpp +0 -4
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +5 -10
- package/Microsoft.ReactNative/TurboModulesProvider.h +2 -0
- package/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +33 -25
- package/Microsoft.ReactNative/Utils/LocalBundleReader.h +5 -3
- package/Microsoft.ReactNative/Utils/ValueUtils.cpp +1 -1
- package/Microsoft.ReactNative.Cxx/CppWinRTIncludes.h +0 -7
- package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +0 -22
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +8 -2
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +36 -20
- package/Microsoft.ReactNative.Cxx/NamespaceRedirect.h +0 -3
- package/Microsoft.ReactNative.Cxx/NativeModules.h +8 -2
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +0 -9
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +3 -3
- package/Microsoft.ReactNative.Managed/ReactContext.cs +0 -9
- package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +10 -10
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +1 -1
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/Bundle.props +1 -1
- package/PropertySheets/Codegen.props +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/JSEngine.props +1 -1
- package/PropertySheets/NuGet.LockFile.props +8 -0
- package/PropertySheets/React.Cpp.props +8 -7
- package/PropertySheets/ReactNativeArchitecture.props +6 -24
- package/PropertySheets/WinUI.props +2 -2
- package/ReactCommon/ReactCommon.vcxproj +5 -6
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +15 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +13 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/defaults/DefaultTurboModules.cpp +69 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/animationbackend/AnimatedPropSerializer.cpp +717 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +10 -10
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +2 -21
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.cpp +151 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.h +50 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBuffer.cpp +178 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +69 -39
- package/Scripts/JustMyXaml.ps1 +8 -8
- package/Scripts/OfficeReact.Win32.nuspec +0 -1
- package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +4 -39
- package/Scripts/UnitTest.ps1 +3 -1
- package/Scripts/creaternwapp.cmd +1 -9
- package/Scripts/creaternwlib.cmd +4 -24
- package/Scripts/rnw-dependencies.ps1 +15 -16
- package/Shared/DevSettings.h +0 -3
- package/Shared/DevSupportManager.cpp +55 -48
- package/Shared/DevSupportManager.h +0 -1
- package/Shared/Modules/IWebSocketModuleContentHandler.h +15 -0
- package/Shared/Modules/WebSocketModule.cpp +8 -3
- package/Shared/Networking/DefaultBlobResource.cpp +37 -0
- package/Shared/Networking/DefaultBlobResource.h +12 -0
- package/Shared/Networking/WinRTWebSocketResource.cpp +23 -408
- package/Shared/Networking/WinRTWebSocketResource.h +8 -120
- package/Shared/Shared.vcxitems +63 -38
- package/Shared/Shared.vcxitems.filters +54 -0
- package/Shared/Utils.cpp +0 -88
- package/Shared/Utils.h +0 -14
- package/Shared/WebSocketResourceFactory.cpp +28 -0
- package/Shared/tracing/fbsystrace.h +1 -0
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +172 -160
- package/codegen/react/components/rnwcore/ModalHostView.g.h +8 -0
- package/codegen/react/components/rnwcore/Props.cpp +17 -7
- package/codegen/react/components/rnwcore/Props.h +3 -1
- package/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +4 -4
- package/codegen/rnwcoreJSI.h +93 -77
- package/index.js +9 -0
- package/index.windows.js +9 -0
- package/jest/RefreshControlMock.js +2 -2
- package/jest/assetFileTransformer.js +8 -3
- package/jest/mockComponent.js +3 -4
- package/jest/mockNativeComponent.js +1 -1
- package/jest/mocks/ActivityIndicator.js +2 -2
- package/jest/mocks/Image.js +2 -2
- package/jest/mocks/Modal.js +2 -2
- package/jest/mocks/RefreshControl.js +3 -3
- package/jest/mocks/RendererProxy.js +2 -2
- package/jest/mocks/ScrollView.js +5 -5
- package/jest/mocks/Text.js +2 -2
- package/jest/mocks/TextInput.js +2 -2
- package/jest/mocks/View.js +2 -2
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/mocks/requireNativeComponent.js +1 -1
- package/jest/mocks/useColorScheme.js +1 -1
- package/jest/setup.js +68 -31
- package/just-task.js +13 -2
- package/package.json +25 -20
- package/src/private/animated/NativeAnimatedHelper.js +2 -2
- package/src/private/animated/createAnimatedPropsMemoHook.js +19 -19
- package/src/private/components/virtualview/VirtualView.js +14 -21
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +11 -10
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +3 -3
- package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +39 -17
- package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +15 -3
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -8
- package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +102 -0
- package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +12 -25
- package/src/private/devsupport/rndevtools/GlobalStateObserver.js +56 -0
- package/src/private/devsupport/rndevtools/TracingStateObserver.js +28 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +71 -79
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -12
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +7 -3
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/styles/composeStyles.js +1 -1
- package/src/private/utilities/toError.js +27 -0
- package/src/private/utilities/toExtendedError.js +30 -0
- package/src/private/webapis/dom/events/Event.js +1 -1
- package/src/private/webapis/dom/events/EventHandlerAttributes.js +2 -2
- package/src/private/webapis/dom/events/EventTarget.js +3 -3
- package/src/private/webapis/dom/events/internals/EventInternals.js +2 -2
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +2 -2
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +14 -14
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +8 -8
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +6 -6
- package/src/private/webapis/mutationobserver/MutationObserver.js +2 -2
- package/src/private/webapis/mutationobserver/MutationRecord.js +2 -2
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +3 -3
- package/src/private/webapis/performance/LongTasks.js +3 -3
- package/src/private/webapis/performance/Performance.js +4 -4
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/specs/NativePerformance.js +8 -8
- package/src/private/webapis/structuredClone/structuredClone.js +2 -2
- package/src/types/globals.d.ts +4 -4
- package/template/cpp-lib/proj/MyLib.sln +0 -33
- package/template/cpp-lib/proj/MyLib.vcxproj +1 -1
- package/template/cs-lib/proj/MyLib.sln +0 -33
- package/template/metro.config.js +12 -2
- package/templates/cpp-app/metro.config.js +12 -2
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +9 -6
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +2 -2
- package/templates/cpp-app/windows/MyApp.sln +0 -33
- package/templates/cpp-lib/example/metro.config.js +12 -2
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +2 -2
- package/templates/cpp-lib/windows/MyLib.sln +0 -33
- package/types/index.d.ts +2 -0
- package/Folly/.clang-format +0 -2
- package/Folly/Folly.natvis +0 -25
- package/Folly/Folly.vcxproj +0 -378
- package/Folly/Folly.vcxproj.filters +0 -558
- package/Folly/TEMP_UntilFollyUpdate/ConstexprMath.h +0 -978
- package/Folly/TEMP_UntilFollyUpdate/Conv.cpp +0 -1205
- package/Folly/TEMP_UntilFollyUpdate/chrono/Hardware.h +0 -155
- package/Folly/TEMP_UntilFollyUpdate/concurrency/CacheLocality.cpp +0 -633
- package/Folly/TEMP_UntilFollyUpdate/json/dynamic-inl.h +0 -1438
- package/Folly/TEMP_UntilFollyUpdate/json/json.cpp +0 -1118
- package/Folly/TEMP_UntilFollyUpdate/lang/SafeAssert.h +0 -188
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +0 -348
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +0 -182
- package/Folly/TEMP_UntilFollyUpdate/portability/Unistd.cpp +0 -33
- package/Folly/cgmanifest.json +0 -25
- package/Libraries/Components/View/ReactNativeViewAttributes.js +0 -60
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +0 -64
- package/Libraries/Image/TextInlineImageNativeComponent.js +0 -49
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +0 -75
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +0 -27
- package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +0 -81
- package/Microsoft.ReactNative/Modules/CreateModules.cpp +0 -24
- package/Microsoft.ReactNative/ReactSupport.cpp +0 -221
- package/Microsoft.ReactNative/ReactSupport.h +0 -13
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.cpp +0 -107
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +0 -62
- package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +0 -56
- package/Microsoft.ReactNative/Utils/UwpScriptStore.h +0 -22
- package/Microsoft.ReactNative/XamlUIService.cpp +0 -68
- package/Microsoft.ReactNative/XamlUIService.h +0 -37
- package/Microsoft.ReactNative/XamlUIService.idl +0 -53
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +0 -259
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +0 -381
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +0 -145
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +0 -100
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +0 -256
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +0 -363
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +0 -93
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +0 -148
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +0 -190
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +0 -123
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleWithJSIBindings.cpp +0 -27
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/webperformance/NativePerformance.cpp +0 -414
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +0 -91
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +0 -80
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +0 -138
- package/fmt/.clang-format +0 -2
- package/fmt/cgmanifest.json +0 -15
- package/fmt/fmt.vcxproj +0 -153
- package/fmt/fmt.vcxproj.filters +0 -59
- package/fmt/pch.cpp +0 -4
- package/fmt/pch.h +0 -2
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
#include "pch.h"
|
|
3
|
-
#include "ReactSupport.h"
|
|
4
|
-
#include "Base/FollyIncludes.h"
|
|
5
|
-
|
|
6
|
-
using namespace winrt;
|
|
7
|
-
using namespace Windows::Foundation;
|
|
8
|
-
using namespace Windows::Foundation::Collections;
|
|
9
|
-
|
|
10
|
-
namespace winrt::Microsoft::ReactNative {
|
|
11
|
-
|
|
12
|
-
folly::dynamic ConvertToDynamic(IInspectable const &object) {
|
|
13
|
-
if (object == nullptr)
|
|
14
|
-
return nullptr;
|
|
15
|
-
|
|
16
|
-
if (auto const &map = object.try_as<IMapView<hstring, IInspectable>>()) {
|
|
17
|
-
folly::dynamic obj = folly::dynamic::object;
|
|
18
|
-
for (auto const &kvp : map) {
|
|
19
|
-
obj[to_string(kvp.Key())] = ConvertToDynamic(kvp.Value());
|
|
20
|
-
}
|
|
21
|
-
return obj;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
auto propValue = object.try_as<IPropertyValue>();
|
|
25
|
-
if (!propValue) {
|
|
26
|
-
auto stringable = object.try_as<IStringable>();
|
|
27
|
-
if (stringable) {
|
|
28
|
-
// This handles types such as the Newtonsoft.Json.Linq.JObject and
|
|
29
|
-
// the Windows.Data.Json.JsonObject.
|
|
30
|
-
auto stringified = to_string(stringable.ToString());
|
|
31
|
-
auto json = folly::parseJson(stringified);
|
|
32
|
-
return json;
|
|
33
|
-
} else {
|
|
34
|
-
throw hresult_invalid_argument(L"Unrecognized argument value type.");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
auto propType = propValue.Type();
|
|
39
|
-
folly::dynamic value;
|
|
40
|
-
|
|
41
|
-
switch (propType) {
|
|
42
|
-
case PropertyType::Boolean:
|
|
43
|
-
value = propValue.GetBoolean();
|
|
44
|
-
break;
|
|
45
|
-
case PropertyType::Char16:
|
|
46
|
-
value = propValue.GetChar16();
|
|
47
|
-
break;
|
|
48
|
-
case PropertyType::Double:
|
|
49
|
-
value = propValue.GetDouble();
|
|
50
|
-
break;
|
|
51
|
-
case PropertyType::Int16:
|
|
52
|
-
value = propValue.GetInt16();
|
|
53
|
-
break;
|
|
54
|
-
case PropertyType::Int32:
|
|
55
|
-
value = propValue.GetInt32();
|
|
56
|
-
break;
|
|
57
|
-
case PropertyType::Int64:
|
|
58
|
-
value = propValue.GetInt64();
|
|
59
|
-
break;
|
|
60
|
-
case PropertyType::Single:
|
|
61
|
-
value = propValue.GetSingle();
|
|
62
|
-
break;
|
|
63
|
-
case PropertyType::String: {
|
|
64
|
-
hstring stringValue = propValue.GetString();
|
|
65
|
-
value = to_string(stringValue);
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
case PropertyType::UInt8:
|
|
69
|
-
value = propValue.GetUInt8();
|
|
70
|
-
break;
|
|
71
|
-
case PropertyType::UInt16:
|
|
72
|
-
value = propValue.GetUInt16();
|
|
73
|
-
break;
|
|
74
|
-
case PropertyType::UInt32:
|
|
75
|
-
value = propValue.GetUInt32();
|
|
76
|
-
break;
|
|
77
|
-
case PropertyType::UInt64:
|
|
78
|
-
value = propValue.GetUInt64();
|
|
79
|
-
break;
|
|
80
|
-
|
|
81
|
-
// ARRAYS
|
|
82
|
-
case PropertyType::BooleanArray: {
|
|
83
|
-
com_array<bool> tmpArray;
|
|
84
|
-
propValue.GetBooleanArray(tmpArray);
|
|
85
|
-
folly::dynamic d = folly::dynamic::array();
|
|
86
|
-
for (bool b : tmpArray) {
|
|
87
|
-
d.push_back(folly::dynamic(b));
|
|
88
|
-
}
|
|
89
|
-
value = d;
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
case PropertyType::Char16Array: {
|
|
93
|
-
com_array<char16_t> tmpArray;
|
|
94
|
-
propValue.GetChar16Array(tmpArray);
|
|
95
|
-
folly::dynamic d = folly::dynamic::array();
|
|
96
|
-
for (char16_t b : tmpArray) {
|
|
97
|
-
d.push_back(folly::dynamic(b));
|
|
98
|
-
}
|
|
99
|
-
value = d;
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
case PropertyType::DoubleArray: {
|
|
103
|
-
com_array<double_t> tmpArray;
|
|
104
|
-
propValue.GetDoubleArray(tmpArray);
|
|
105
|
-
folly::dynamic d = folly::dynamic::array();
|
|
106
|
-
for (double_t b : tmpArray) {
|
|
107
|
-
d.push_back(folly::dynamic(b));
|
|
108
|
-
}
|
|
109
|
-
value = d;
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
case PropertyType::InspectableArray: {
|
|
113
|
-
com_array<IInspectable> tmpArray;
|
|
114
|
-
propValue.GetInspectableArray(tmpArray);
|
|
115
|
-
folly::dynamic d = folly::dynamic::array;
|
|
116
|
-
for (auto inspectable : tmpArray) {
|
|
117
|
-
d.push_back(ConvertToDynamic(inspectable));
|
|
118
|
-
}
|
|
119
|
-
value = d;
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
case PropertyType::Int16Array: {
|
|
123
|
-
com_array<int16_t> tmpArray;
|
|
124
|
-
propValue.GetInt16Array(tmpArray);
|
|
125
|
-
folly::dynamic d = folly::dynamic::array();
|
|
126
|
-
for (int16_t b : tmpArray) {
|
|
127
|
-
d.push_back(folly::dynamic(b));
|
|
128
|
-
}
|
|
129
|
-
value = d;
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
case PropertyType::Int32Array: {
|
|
133
|
-
com_array<int32_t> tmpArray;
|
|
134
|
-
propValue.GetInt32Array(tmpArray);
|
|
135
|
-
folly::dynamic d = folly::dynamic::array();
|
|
136
|
-
for (int32_t b : tmpArray) {
|
|
137
|
-
d.push_back(folly::dynamic(b));
|
|
138
|
-
}
|
|
139
|
-
value = d;
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
case PropertyType::Int64Array: {
|
|
143
|
-
com_array<int64_t> tmpArray;
|
|
144
|
-
propValue.GetInt64Array(tmpArray);
|
|
145
|
-
folly::dynamic d = folly::dynamic::array();
|
|
146
|
-
for (int64_t b : tmpArray) {
|
|
147
|
-
d.push_back(folly::dynamic(b));
|
|
148
|
-
}
|
|
149
|
-
value = d;
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
case PropertyType::SingleArray: {
|
|
153
|
-
com_array<float> tmpArray;
|
|
154
|
-
propValue.GetSingleArray(tmpArray);
|
|
155
|
-
folly::dynamic d = folly::dynamic::array();
|
|
156
|
-
for (float b : tmpArray) {
|
|
157
|
-
d.push_back(folly::dynamic(b));
|
|
158
|
-
}
|
|
159
|
-
value = d;
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
case PropertyType::StringArray: {
|
|
163
|
-
com_array<hstring> tmpArray;
|
|
164
|
-
propValue.GetStringArray(tmpArray);
|
|
165
|
-
folly::dynamic d = folly::dynamic::array;
|
|
166
|
-
for (auto strItem : tmpArray) {
|
|
167
|
-
d.push_back(to_string(strItem));
|
|
168
|
-
}
|
|
169
|
-
value = d;
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
case PropertyType::UInt8Array: {
|
|
173
|
-
com_array<uint8_t> tmpArray;
|
|
174
|
-
propValue.GetUInt8Array(tmpArray);
|
|
175
|
-
folly::dynamic d = folly::dynamic::array();
|
|
176
|
-
for (uint8_t b : tmpArray) {
|
|
177
|
-
d.push_back(folly::dynamic(b));
|
|
178
|
-
}
|
|
179
|
-
value = d;
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
case PropertyType::UInt16Array: {
|
|
183
|
-
com_array<uint16_t> tmpArray;
|
|
184
|
-
propValue.GetUInt16Array(tmpArray);
|
|
185
|
-
folly::dynamic d = folly::dynamic::array();
|
|
186
|
-
for (uint16_t b : tmpArray) {
|
|
187
|
-
d.push_back(folly::dynamic(b));
|
|
188
|
-
}
|
|
189
|
-
value = d;
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
case PropertyType::UInt32Array: {
|
|
193
|
-
com_array<uint32_t> tmpArray;
|
|
194
|
-
propValue.GetUInt32Array(tmpArray);
|
|
195
|
-
folly::dynamic d = folly::dynamic::array();
|
|
196
|
-
for (uint32_t b : tmpArray) {
|
|
197
|
-
d.push_back(folly::dynamic(b));
|
|
198
|
-
}
|
|
199
|
-
value = d;
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
case PropertyType::UInt64Array: {
|
|
203
|
-
com_array<uint64_t> tmpArray;
|
|
204
|
-
propValue.GetUInt64Array(tmpArray);
|
|
205
|
-
folly::dynamic d = folly::dynamic::array();
|
|
206
|
-
for (uint64_t b : tmpArray) {
|
|
207
|
-
d.push_back(folly::dynamic(b));
|
|
208
|
-
}
|
|
209
|
-
value = d;
|
|
210
|
-
break;
|
|
211
|
-
}
|
|
212
|
-
default:
|
|
213
|
-
wchar_t buf[512];
|
|
214
|
-
swprintf(buf, ARRAYSIZE(buf), L"Unrecognized argument value type: %d\n", propType);
|
|
215
|
-
throw hresult_invalid_argument(buf);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return value;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
} // namespace winrt::Microsoft::ReactNative
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
#pragma once
|
|
5
|
-
|
|
6
|
-
#include <folly/dynamic.h>
|
|
7
|
-
|
|
8
|
-
namespace winrt::Microsoft::ReactNative {
|
|
9
|
-
|
|
10
|
-
// Convert a WinRT IInspectable into a folly::dynamic object
|
|
11
|
-
folly::dynamic ConvertToDynamic(winrt::Windows::Foundation::IInspectable const &object);
|
|
12
|
-
|
|
13
|
-
} // namespace winrt::Microsoft::ReactNative
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
#include "pch.h"
|
|
2
|
-
|
|
3
|
-
#include <Utils/UwpPreparedScriptStore.h>
|
|
4
|
-
#include <Utils/UwpScriptStore.h>
|
|
5
|
-
#include <jsi/jsi.h>
|
|
6
|
-
#include <winrt/Windows.Storage.FileProperties.h>
|
|
7
|
-
#include <winrt/Windows.Storage.Streams.h>
|
|
8
|
-
#include "Unicode.h"
|
|
9
|
-
|
|
10
|
-
#if _MSC_VER <= 1913
|
|
11
|
-
// VC 19 (2015-2017.6) cannot optimize co_await/cppwinrt usage
|
|
12
|
-
#pragma optimize("", off)
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
namespace winrt {
|
|
16
|
-
using namespace winrt::Windows::Foundation;
|
|
17
|
-
using namespace winrt::Windows::Storage;
|
|
18
|
-
}; // namespace winrt
|
|
19
|
-
|
|
20
|
-
namespace Microsoft::ReactNative {
|
|
21
|
-
UwpPreparedScriptStore::UwpPreparedScriptStore(winrt::hstring uri) {
|
|
22
|
-
if (!uri.empty()) {
|
|
23
|
-
m_byteCodeFileAsync = winrt::StorageFile::GetFileFromApplicationUriAsync(winrt::Uri(uri));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
std::shared_ptr<const facebook::jsi::Buffer> UwpPreparedScriptStore::tryGetPreparedScript(
|
|
28
|
-
const facebook::jsi::ScriptSignature &scriptSignature,
|
|
29
|
-
const facebook::jsi::JSRuntimeSignature & /*runtimeSignature*/,
|
|
30
|
-
const char * /*prepareTag*/ // Optional tag. For e.g. eagerly evaluated vs lazy cache.
|
|
31
|
-
) noexcept {
|
|
32
|
-
try {
|
|
33
|
-
// check if app bundle version is older than or equal to the prepared script
|
|
34
|
-
// version if true then just read the buffer from the prepared script and
|
|
35
|
-
// return
|
|
36
|
-
auto byteCodeFile = TryGetByteCodeFileSync(scriptSignature);
|
|
37
|
-
if (byteCodeFile == nullptr) {
|
|
38
|
-
return nullptr;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
auto buffer = winrt::FileIO::ReadBufferAsync(byteCodeFile).get();
|
|
42
|
-
auto bytecodeBuffer(std::make_shared<ByteCodeBuffer>(buffer.Length()));
|
|
43
|
-
auto dataReader{winrt::Streams::DataReader::FromBuffer(buffer)};
|
|
44
|
-
dataReader.ReadBytes(
|
|
45
|
-
winrt::array_view<uint8_t>{&bytecodeBuffer->data()[0], &bytecodeBuffer->data()[bytecodeBuffer->size()]});
|
|
46
|
-
dataReader.Close();
|
|
47
|
-
|
|
48
|
-
return bytecodeBuffer;
|
|
49
|
-
} catch (...) {
|
|
50
|
-
return nullptr;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
void UwpPreparedScriptStore::persistPreparedScript(
|
|
55
|
-
std::shared_ptr<const facebook::jsi::Buffer> preparedScript,
|
|
56
|
-
const facebook::jsi::ScriptSignature &scriptMetadata,
|
|
57
|
-
const facebook::jsi::JSRuntimeSignature &runtimeMetadata,
|
|
58
|
-
const char *prepareTag // Optional tag. For e.g. eagerly evaluated vs lazy cache.
|
|
59
|
-
) noexcept {
|
|
60
|
-
persistPreparedScriptAsync(preparedScript, scriptMetadata, runtimeMetadata, prepareTag);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
winrt::fire_and_forget UwpPreparedScriptStore::persistPreparedScriptAsync(
|
|
64
|
-
std::shared_ptr<const facebook::jsi::Buffer> preparedScript,
|
|
65
|
-
const facebook::jsi::ScriptSignature &scriptMetadata,
|
|
66
|
-
const facebook::jsi::JSRuntimeSignature &runtimeMetadata,
|
|
67
|
-
const char *prepareTag // Optional tag. For e.g. eagerly evaluated vs lazy cache.
|
|
68
|
-
) {
|
|
69
|
-
try {
|
|
70
|
-
co_await winrt::resume_background();
|
|
71
|
-
auto folder = winrt::ApplicationData::Current().LocalCacheFolder();
|
|
72
|
-
auto fileName = winrt::to_hstring(scriptMetadata.url + ".bytecode");
|
|
73
|
-
auto file = co_await folder.CreateFileAsync(fileName, winrt::CreationCollisionOption::ReplaceExisting);
|
|
74
|
-
winrt::FileIO::WriteBytesAsync(
|
|
75
|
-
file,
|
|
76
|
-
winrt::array_view<const uint8_t>{&preparedScript->data()[0], &preparedScript->data()[preparedScript->size()]});
|
|
77
|
-
} catch (...) {
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
winrt::StorageFile UwpPreparedScriptStore::TryGetByteCodeFileSync(
|
|
82
|
-
const facebook::jsi::ScriptSignature &scriptSignature) {
|
|
83
|
-
try {
|
|
84
|
-
if (m_byteCodeFileAsync != nullptr) {
|
|
85
|
-
auto file = m_byteCodeFileAsync.get();
|
|
86
|
-
auto byteCodeVersion = UwpScriptStore::GetFileVersion(file.Path().c_str());
|
|
87
|
-
|
|
88
|
-
if (byteCodeVersion >= scriptSignature.version) {
|
|
89
|
-
return file;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
} catch (...) {
|
|
93
|
-
// Eat this exception. If we can't get the file from the uri. Still try
|
|
94
|
-
// looking in the cache.
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Getting here means one of two things. No bytecode file uri was specified,
|
|
98
|
-
// or the file uri was specified but it is outdated. Try looking in LocalCache
|
|
99
|
-
// folder for bytecode file and use that.
|
|
100
|
-
auto fileName = winrt::to_hstring(scriptSignature.url + ".bytecode");
|
|
101
|
-
auto file = winrt::ApplicationData::Current().LocalCacheFolder().GetFileAsync(fileName).get();
|
|
102
|
-
|
|
103
|
-
auto byteCodeVersion = UwpScriptStore::GetFileVersion(file.Path().c_str());
|
|
104
|
-
|
|
105
|
-
return byteCodeVersion > scriptSignature.version ? file : nullptr;
|
|
106
|
-
}
|
|
107
|
-
} // namespace Microsoft::ReactNative
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
#include <JSI/ScriptStore.h>
|
|
3
|
-
#include <cxxreact/JSBigString.h>
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
#include <winrt/Windows.Foundation.h>
|
|
6
|
-
#include <winrt/Windows.Storage.h>
|
|
7
|
-
#include <future>
|
|
8
|
-
#include <string>
|
|
9
|
-
|
|
10
|
-
namespace Microsoft::ReactNative {
|
|
11
|
-
class UwpPreparedScriptStore : public facebook::jsi::PreparedScriptStore {
|
|
12
|
-
public:
|
|
13
|
-
UwpPreparedScriptStore(winrt::hstring uri);
|
|
14
|
-
std::shared_ptr<const facebook::jsi::Buffer> tryGetPreparedScript(
|
|
15
|
-
const facebook::jsi::ScriptSignature &scriptSignature,
|
|
16
|
-
const facebook::jsi::JSRuntimeSignature &runtimeSignature,
|
|
17
|
-
const char *prepareTag // Optional tag. For e.g. eagerly evaluated vs lazy cache.
|
|
18
|
-
) noexcept override;
|
|
19
|
-
|
|
20
|
-
void persistPreparedScript(
|
|
21
|
-
std::shared_ptr<const facebook::jsi::Buffer> preparedScript,
|
|
22
|
-
const facebook::jsi::ScriptSignature &scriptMetadata,
|
|
23
|
-
const facebook::jsi::JSRuntimeSignature &runtimeMetadata,
|
|
24
|
-
const char *prepareTag // Optional tag. For e.g. eagerly evaluated vs lazy cache.
|
|
25
|
-
) noexcept override;
|
|
26
|
-
|
|
27
|
-
UwpPreparedScriptStore(const UwpPreparedScriptStore &) = delete;
|
|
28
|
-
void operator=(const UwpPreparedScriptStore &) = delete;
|
|
29
|
-
|
|
30
|
-
private:
|
|
31
|
-
winrt::fire_and_forget persistPreparedScriptAsync(
|
|
32
|
-
std::shared_ptr<const facebook::jsi::Buffer> preparedScript,
|
|
33
|
-
const facebook::jsi::ScriptSignature &scriptMetadata,
|
|
34
|
-
const facebook::jsi::JSRuntimeSignature &runtimeMetadata,
|
|
35
|
-
const char *prepareTag // Optional tag. For e.g. eagerly evaluated vs lazy cache.
|
|
36
|
-
);
|
|
37
|
-
winrt::Windows::Storage::StorageFile TryGetByteCodeFileSync(const facebook::jsi::ScriptSignature &scriptSignature);
|
|
38
|
-
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFile> m_byteCodeFileAsync;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
class ByteCodeBuffer final : public facebook::jsi::Buffer {
|
|
42
|
-
public:
|
|
43
|
-
size_t size() const override {
|
|
44
|
-
return size_;
|
|
45
|
-
}
|
|
46
|
-
const uint8_t *data() const {
|
|
47
|
-
return byteArray_.get();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
uint8_t *data() {
|
|
51
|
-
return byteArray_.get();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
ByteCodeBuffer(int size) : size_(size), byteArray_(std::make_unique<uint8_t[]>(size)) {}
|
|
55
|
-
ByteCodeBuffer(const ByteCodeBuffer &) = delete;
|
|
56
|
-
void operator=(const ByteCodeBuffer &) = delete;
|
|
57
|
-
|
|
58
|
-
private:
|
|
59
|
-
int size_;
|
|
60
|
-
std::unique_ptr<uint8_t[]> byteArray_;
|
|
61
|
-
};
|
|
62
|
-
} // namespace Microsoft::ReactNative
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#include "pch.h"
|
|
2
|
-
|
|
3
|
-
#include <Utils/UwpScriptStore.h>
|
|
4
|
-
#include <winrt/Windows.Foundation.h>
|
|
5
|
-
#include <winrt/Windows.Storage.FileProperties.h>
|
|
6
|
-
#include <winrt/Windows.Storage.h>
|
|
7
|
-
#include <future>
|
|
8
|
-
#include "Unicode.h"
|
|
9
|
-
|
|
10
|
-
namespace winrt {
|
|
11
|
-
using namespace winrt::Windows::Foundation;
|
|
12
|
-
using namespace winrt::Windows::Storage;
|
|
13
|
-
} // namespace winrt
|
|
14
|
-
|
|
15
|
-
namespace Microsoft::ReactNative {
|
|
16
|
-
|
|
17
|
-
UwpScriptStore::UwpScriptStore() {}
|
|
18
|
-
|
|
19
|
-
/* static */ facebook::jsi::ScriptVersion_t UwpScriptStore::GetFileVersion(const std::wstring &filePath) {
|
|
20
|
-
// append prefix to allow long file paths.
|
|
21
|
-
auto longFilePath = L"\\\\?\\" + filePath;
|
|
22
|
-
WIN32_FILE_ATTRIBUTE_DATA fileData;
|
|
23
|
-
if (GetFileAttributesEx(longFilePath.c_str(), GetFileExInfoStandard, &fileData)) {
|
|
24
|
-
return ((facebook::jsi::ScriptVersion_t)fileData.ftLastWriteTime.dwHighDateTime << 32) |
|
|
25
|
-
fileData.ftLastWriteTime.dwLowDateTime;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
facebook::jsi::VersionedBuffer UwpScriptStore::getVersionedScript(const std::string & /*url*/) noexcept {
|
|
32
|
-
facebook::jsi::VersionedBuffer versionedBuffer_;
|
|
33
|
-
versionedBuffer_.buffer = nullptr;
|
|
34
|
-
versionedBuffer_.version = 0;
|
|
35
|
-
|
|
36
|
-
return versionedBuffer_;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Script version = timestamp of bundle file last created
|
|
40
|
-
facebook::jsi::ScriptVersion_t UwpScriptStore::getScriptVersion(const std::string &url) noexcept {
|
|
41
|
-
auto version = getScriptVersionAsync(url).get();
|
|
42
|
-
|
|
43
|
-
return version;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
std::future<facebook::jsi::ScriptVersion_t> UwpScriptStore::getScriptVersionAsync(const std::string &bundleUri) {
|
|
47
|
-
co_await winrt::resume_background();
|
|
48
|
-
|
|
49
|
-
const winrt::hstring fileUrl(Microsoft::Common::Unicode::Utf8ToUtf16("ms-appx:///Bundle/" + bundleUri + ".bundle"));
|
|
50
|
-
|
|
51
|
-
auto file = co_await winrt::StorageFile::GetFileFromApplicationUriAsync(winrt::Windows::Foundation::Uri{fileUrl});
|
|
52
|
-
|
|
53
|
-
co_return GetFileVersion(file.Path().c_str());
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
} // namespace Microsoft::ReactNative
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
#include <JSI/ScriptStore.h>
|
|
3
|
-
#include <future>
|
|
4
|
-
|
|
5
|
-
namespace Microsoft::ReactNative {
|
|
6
|
-
|
|
7
|
-
class UwpScriptStore : public facebook::jsi::ScriptStore {
|
|
8
|
-
public:
|
|
9
|
-
facebook::jsi::VersionedBuffer getVersionedScript(const std::string &url) noexcept override;
|
|
10
|
-
facebook::jsi::ScriptVersion_t getScriptVersion(const std::string &url) noexcept override;
|
|
11
|
-
UwpScriptStore();
|
|
12
|
-
UwpScriptStore(const UwpScriptStore &) = delete;
|
|
13
|
-
void operator=(const UwpScriptStore &) = delete;
|
|
14
|
-
|
|
15
|
-
public:
|
|
16
|
-
static facebook::jsi::ScriptVersion_t GetFileVersion(const std::wstring &filePath);
|
|
17
|
-
|
|
18
|
-
private:
|
|
19
|
-
std::future<facebook::jsi::ScriptVersion_t> getScriptVersionAsync(const std::string &bundleUri);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
} // namespace Microsoft::ReactNative
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
#include "pch.h"
|
|
5
|
-
#include "XamlUIService.h"
|
|
6
|
-
#include "XamlUIService.g.cpp"
|
|
7
|
-
|
|
8
|
-
#include "DynamicWriter.h"
|
|
9
|
-
|
|
10
|
-
namespace winrt::Microsoft::ReactNative::implementation {
|
|
11
|
-
|
|
12
|
-
XamlUIService::XamlUIService(Mso::CntPtr<Mso::React::IReactContext> &&context) noexcept : m_context(context) {}
|
|
13
|
-
|
|
14
|
-
/*static*/ winrt::Microsoft::ReactNative::XamlUIService XamlUIService::FromContext(IReactContext context) {
|
|
15
|
-
return context.Properties()
|
|
16
|
-
.Get(XamlUIService::XamlUIServiceProperty().Handle())
|
|
17
|
-
.try_as<winrt::Microsoft::ReactNative::XamlUIService>();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/*static*/ ReactPropertyId<XamlUIService> XamlUIService::XamlUIServiceProperty() noexcept {
|
|
21
|
-
static ReactPropertyId<XamlUIService> uiManagerProperty{L"ReactNative.UIManager", L"XamlUIManager"};
|
|
22
|
-
return uiManagerProperty;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
ReactPropertyId<xaml::XamlRoot> XamlRootProperty() noexcept {
|
|
26
|
-
static ReactPropertyId<xaml::XamlRoot> propId{L"ReactNative.UIManager", L"XamlRoot"};
|
|
27
|
-
return propId;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
ReactPropertyId<xaml::FrameworkElement> AccessibleRootProperty() noexcept {
|
|
31
|
-
static ReactPropertyId<xaml::FrameworkElement> propId{L"ReactNative.UIManager", L"AccessibleRoot"};
|
|
32
|
-
return propId;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/*static*/ void XamlUIService::SetXamlRoot(
|
|
36
|
-
IReactPropertyBag const &properties,
|
|
37
|
-
xaml::XamlRoot const &xamlRoot) noexcept {
|
|
38
|
-
winrt::Microsoft::ReactNative::ReactPropertyBag(properties).Set(XamlRootProperty(), xamlRoot);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/*static*/ void XamlUIService::SetAccessibleRoot(
|
|
42
|
-
IReactPropertyBag const &properties,
|
|
43
|
-
xaml::FrameworkElement const &accessibleRoot) noexcept {
|
|
44
|
-
winrt::Microsoft::ReactNative::ReactPropertyBag(properties).Set(AccessibleRootProperty(), accessibleRoot);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/*static*/ xaml::XamlRoot XamlUIService::GetXamlRoot(IReactPropertyBag const &properties) noexcept {
|
|
48
|
-
return winrt::Microsoft::ReactNative::ReactPropertyBag(properties).Get(XamlRootProperty());
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/*static*/ xaml::FrameworkElement XamlUIService::GetAccessibleRoot(IReactPropertyBag const &properties) noexcept {
|
|
52
|
-
return winrt::Microsoft::ReactNative::ReactPropertyBag(properties).Get(AccessibleRootProperty());
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ReactPropertyId<uint64_t> XamlIslandProperty() noexcept {
|
|
56
|
-
static ReactPropertyId<uint64_t> propId{L"ReactNative.UIManager", L"XamlIsland"};
|
|
57
|
-
return propId;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/*static*/ void XamlUIService::SetIslandWindowHandle(IReactPropertyBag const &properties, uint64_t hwnd) noexcept {
|
|
61
|
-
winrt::Microsoft::ReactNative::ReactPropertyBag(properties).Set(XamlIslandProperty(), hwnd);
|
|
62
|
-
}
|
|
63
|
-
/*static*/ uint64_t XamlUIService::GetIslandWindowHandle(IReactPropertyBag const &properties) noexcept {
|
|
64
|
-
auto hwnd = winrt::Microsoft::ReactNative::ReactPropertyBag(properties).Get(XamlIslandProperty());
|
|
65
|
-
return hwnd.value_or(0);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
#pragma once
|
|
5
|
-
|
|
6
|
-
#include "XamlUIService.g.h"
|
|
7
|
-
#include "ReactHost/React.h"
|
|
8
|
-
#include "ReactPropertyBag.h"
|
|
9
|
-
#include "winrt/Microsoft.ReactNative.h"
|
|
10
|
-
|
|
11
|
-
namespace winrt::Microsoft::ReactNative::implementation {
|
|
12
|
-
struct XamlUIService : XamlUIServiceT<XamlUIService> {
|
|
13
|
-
public:
|
|
14
|
-
XamlUIService(Mso::CntPtr<Mso::React::IReactContext> &&context) noexcept;
|
|
15
|
-
static ReactPropertyId<XamlUIService> XamlUIServiceProperty() noexcept;
|
|
16
|
-
|
|
17
|
-
static winrt::Microsoft::ReactNative::XamlUIService FromContext(IReactContext context);
|
|
18
|
-
|
|
19
|
-
static void SetXamlRoot(IReactPropertyBag const &properties, xaml::XamlRoot const &xamlRoot) noexcept;
|
|
20
|
-
static void SetAccessibleRoot(
|
|
21
|
-
IReactPropertyBag const &properties,
|
|
22
|
-
xaml::FrameworkElement const &accessibleRoot) noexcept;
|
|
23
|
-
static xaml::XamlRoot GetXamlRoot(IReactPropertyBag const &properties) noexcept;
|
|
24
|
-
static xaml::FrameworkElement GetAccessibleRoot(IReactPropertyBag const &properties) noexcept;
|
|
25
|
-
|
|
26
|
-
static void SetIslandWindowHandle(IReactPropertyBag const &properties, uint64_t hwnd) noexcept;
|
|
27
|
-
static uint64_t GetIslandWindowHandle(IReactPropertyBag const &properties) noexcept;
|
|
28
|
-
|
|
29
|
-
private:
|
|
30
|
-
Mso::CntPtr<Mso::React::IReactContext> m_context;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
34
|
-
|
|
35
|
-
namespace winrt::Microsoft::ReactNative::factory_implementation {
|
|
36
|
-
struct XamlUIService : XamlUIServiceT<XamlUIService, implementation::XamlUIService> {};
|
|
37
|
-
} // namespace winrt::Microsoft::ReactNative::factory_implementation
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import "IReactContext.idl";
|
|
5
|
-
|
|
6
|
-
#include "NamespaceRedirect.h"
|
|
7
|
-
#include "DocString.h"
|
|
8
|
-
|
|
9
|
-
namespace Microsoft.ReactNative
|
|
10
|
-
{
|
|
11
|
-
[default_interface]
|
|
12
|
-
[webhosthidden]
|
|
13
|
-
DOC_STRING(
|
|
14
|
-
"Provides access to XAML UI-specific functionality. "
|
|
15
|
-
"It provides access to APIs to get a XAML element from a react tag, and to dispatch events to JS components.")
|
|
16
|
-
runtimeclass XamlUIService
|
|
17
|
-
{
|
|
18
|
-
DOC_STRING("Use this method to get access to the @XamlUIService associated with the @IReactContext.")
|
|
19
|
-
static XamlUIService FromContext(IReactContext context);
|
|
20
|
-
|
|
21
|
-
DOC_STRING(
|
|
22
|
-
"Sets the @Windows.UI.Xaml.XamlRoot element for the app. "
|
|
23
|
-
"This must be manually provided to the @ReactInstanceSettings object when using XAML Islands "
|
|
24
|
-
"so that certain APIs work correctly.\n"
|
|
25
|
-
"For more information, see [Host WinRT XAML Controls in desktop apps (XAML Islands)]"
|
|
26
|
-
"(https://docs.microsoft.com/windows/apps/desktop/modernize/xaml-islands).")
|
|
27
|
-
static void SetXamlRoot(IReactPropertyBag properties, XAML_NAMESPACE.XamlRoot xamlRoot);
|
|
28
|
-
|
|
29
|
-
DOC_STRING(
|
|
30
|
-
"Sets the @Windows.UI.Xaml.FrameworkElement that will act as the default accessible element for the app. "
|
|
31
|
-
"The element must be able to create an automation peer "
|
|
32
|
-
"(see @Windows.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer), or have the Landmark type property set "
|
|
33
|
-
"(see @Windows.UI.Xaml.Automation.AutomationProperties.LandmarkTypeProperty).\n"
|
|
34
|
-
"This must be manually provided to the @ReactInstanceSettings when using XAML Islands "
|
|
35
|
-
"to have access to functionality related to accessibility.")
|
|
36
|
-
static void SetAccessibleRoot(IReactPropertyBag properties, XAML_NAMESPACE.FrameworkElement accessibleRoot);
|
|
37
|
-
|
|
38
|
-
DOC_STRING("Retrieves the default @Windows.UI.Xaml.XamlRoot for the app.")
|
|
39
|
-
static XAML_NAMESPACE.XamlRoot GetXamlRoot(IReactPropertyBag properties);
|
|
40
|
-
|
|
41
|
-
DOC_STRING("Retrieves the default @Windows.UI.Xaml.FrameworkElement that will be used for the app for accessibility purposes (e.g. to announce).")
|
|
42
|
-
static XAML_NAMESPACE.FrameworkElement GetAccessibleRoot(IReactPropertyBag properties);
|
|
43
|
-
|
|
44
|
-
DOC_STRING(
|
|
45
|
-
"Gets the window handle HWND (as an UInt64) used as the XAML Island window for the current React instance.")
|
|
46
|
-
static UInt64 GetIslandWindowHandle(IReactPropertyBag properties);
|
|
47
|
-
|
|
48
|
-
DOC_STRING(
|
|
49
|
-
"Sets the windowHandle HWND (as an UInt64) to be the XAML Island window for the current React instance.\n"
|
|
50
|
-
"Pass the value returned by IDesktopWindowXamlSourceNative get_WindowHandle.")
|
|
51
|
-
static void SetIslandWindowHandle(IReactPropertyBag properties, UInt64 windowHandle);
|
|
52
|
-
}
|
|
53
|
-
} // namespace Microsoft.ReactNative
|