react-native-windows 0.77.0-preview.4 → 0.78.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 -1
- package/Chakra/ChakraTracing.cpp +1 -1
- package/Libraries/Animated/animations/Animation.js +22 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -0
- package/Libraries/Animated/animations/SpringAnimation.js +1 -0
- package/Libraries/Animated/animations/TimingAnimation.js +1 -0
- package/Libraries/Animated/nodes/AnimatedAddition.js +9 -2
- package/Libraries/Animated/nodes/AnimatedColor.js +4 -1
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +10 -2
- package/Libraries/Animated/nodes/AnimatedDivision.js +9 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -1
- package/Libraries/Animated/nodes/AnimatedModulo.js +5 -2
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +9 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +25 -46
- package/Libraries/Animated/nodes/AnimatedObject.js +9 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +5 -1
- package/Libraries/Animated/nodes/AnimatedStyle.js +5 -1
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +9 -2
- package/Libraries/Animated/nodes/AnimatedTracking.js +5 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +49 -4
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
- package/Libraries/Animated/useAnimatedProps.js +0 -43
- package/Libraries/Components/Button.windows.js +3 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
- package/Libraries/Components/Pressable/Pressable.windows.js +3 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +5 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +9 -0
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +2 -0
- package/Libraries/Components/View/View.windows.js +3 -0
- package/Libraries/Components/View/ViewAccessibility.d.ts +7 -2
- package/Libraries/Components/View/ViewAccessibility.windows.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +0 -9
- package/Libraries/Components/View/ViewPropTypes.windows.js +1 -9
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpBatchedBridge.js +1 -16
- package/Libraries/EventEmitter/RCTEventEmitter.js +2 -6
- package/Libraries/Image/AssetSourceResolver.js +11 -0
- package/Libraries/Image/AssetSourceResolver.windows.js +11 -0
- package/Libraries/Image/Image.windows.js +2 -0
- package/Libraries/Inspector/BorderBox.js +26 -14
- package/Libraries/Inspector/BoxInspector.js +60 -42
- package/Libraries/Inspector/ElementBox.js +55 -48
- package/Libraries/Inspector/StyleInspector.js +36 -30
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Lists/FlatList.d.ts +1 -1
- package/Libraries/Modal/Modal.js +2 -0
- package/Libraries/Modal/Modal.windows.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +0 -2
- package/Libraries/Network/RCTNetworking.android.js +24 -16
- package/Libraries/Network/RCTNetworking.ios.js +1 -46
- package/Libraries/Network/RCTNetworking.windows.js +1 -46
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
- package/Libraries/ReactNative/UIManagerProperties.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +15828 -26461
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3907 -2560
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4399 -2878
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16102 -26908
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +4034 -2695
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4535 -3045
- package/Libraries/Renderer/shims/ReactNativeTypes.js +5 -6
- package/Libraries/StyleSheet/processTransform.js +6 -0
- package/Libraries/Text/Text.d.ts +6 -1
- package/Libraries/Text/Text.windows.js +4 -0
- package/Libraries/Text/TextProps.js +2 -2
- package/Libraries/Text/TextProps.windows.js +3 -2
- package/Libraries/Utilities/BackHandler.android.js +5 -4
- package/Libraries/Utilities/BackHandler.ios.js +4 -5
- package/Libraries/Utilities/BackHandler.windows.js +5 -4
- package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +92 -17
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +9 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +13 -33
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -3
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +43 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +12 -10
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +11 -9
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +191 -329
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +66 -0
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +21 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -4
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +79 -19
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +71 -17
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +16 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +5 -10
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +138 -110
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +27 -27
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +38 -33
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +0 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +5 -16
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
- package/Microsoft.ReactNative/Fabric/ImageManager.cpp +9 -0
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +1 -1
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +5 -0
- package/Microsoft.ReactNative/IReactContext.cpp +2 -2
- package/Microsoft.ReactNative/IReactContext.h +1 -1
- package/Microsoft.ReactNative/IReactContext.idl +2 -2
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +3 -3
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +97 -87
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +9 -4
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +32 -35
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +7 -4
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +2 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +7 -5
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -1
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +10 -10
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +24 -24
- package/Microsoft.ReactNative/Modules/Timing.cpp +2 -2
- package/Microsoft.ReactNative/ReactHost/IReactInstance.h +5 -0
- package/Microsoft.ReactNative/ReactHost/React.h +0 -3
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +39 -16
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +4 -2
- package/Microsoft.ReactNative/ReactNativeHost.cpp +9 -4
- package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +3 -3
- package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -4
- package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -2
- package/Microsoft.ReactNative/Views/DevMenu.cpp +6 -6
- package/Microsoft.ReactNative/Views/DevMenu.h +1 -1
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +2 -2
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +1 -1
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +2 -2
- package/Microsoft.ReactNative/XamlUIService.cpp +13 -7
- package/Microsoft.ReactNative/XamlUIService.h +4 -1
- package/Microsoft.ReactNative/XamlUIService.idl +2 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +6 -2
- package/Microsoft.ReactNative.Cxx/ReactContext.h +1 -1
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +12 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/React.Cpp.props +3 -0
- package/PropertySheets/WebView2.props +1 -1
- package/PropertySheets/WinUI.props +5 -4
- package/ReactCommon/ReactCommon.vcxproj +5 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +91 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +1 -12
- package/{Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h → ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h} +37 -35
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +4 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/ImageRequestParams.h +30 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +4 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/primitives.h +179 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +43 -57
- package/Shared/HermesRuntimeHolder.cpp +2 -2
- package/Shared/Shared.vcxitems +8 -14
- package/Shared/Shared.vcxitems.filters +4 -16
- package/Shared/Threading/BatchingQueueThread.cpp +3 -3
- package/codegen/NativeCPUTimeSpec.g.h +41 -0
- package/codegen/NativeFantomSpec.g.h +78 -0
- package/codegen/NativePerformanceSpec.g.h +31 -43
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +84 -84
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
- package/codegen/react/components/rnwcore/ModalHostView.g.h +283 -0
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
- package/codegen/react/components/rnwcore/Switch.g.h +263 -0
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
- package/codegen/rnwcoreJSI-generated.cpp +90 -57
- package/codegen/rnwcoreJSI.h +241 -104
- package/index.js +5 -0
- package/index.windows.js +5 -0
- package/just-task.js +1 -1
- package/package.json +23 -24
- package/src/private/animated/NativeAnimatedValidation.js +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +32 -26
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -5
- package/src/private/renderer/errorhandling/ErrorHandlers.js +12 -55
- package/src/private/specs/modules/{NativeJSCSamplingProfiler.js → NativeCPUTime.js} +7 -2
- package/src/private/specs/modules/NativeFantom.js +37 -0
- package/src/private/utilities/ensureInstance.js +21 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +49 -6
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +17 -9
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +11 -11
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +1 -1
- package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -1
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/performance/Performance.js +0 -12
- package/src/private/webapis/performance/specs/NativePerformance.js +0 -11
- package/types/index.d.ts +1 -0
- package/Libraries/HeapCapture/HeapCapture.js +0 -29
- package/Libraries/HeapCapture/NativeJSCHeapCapture.js +0 -13
- package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -13
- package/Libraries/Performance/SamplingProfiler.js +0 -39
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +0 -334
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -34
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.cpp +0 -53
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.h +0 -26
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +0 -363
- package/codegen/NativeJSCSamplingProfilerSpec.g.h +0 -35
- package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +0 -413
- package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +0 -181
- package/src/private/webapis/mutationobserver/specs/__mocks__/NativeMutationObserver.js +0 -327
|
@@ -620,6 +620,7 @@ export type ViewProps = $ReadOnly<{|
|
|
|
620
620
|
'aria-disabled'?: ?boolean,
|
|
621
621
|
'aria-expanded'?: ?boolean,
|
|
622
622
|
'aria-selected'?: ?boolean,
|
|
623
|
+
'aria-readonly'?: ?boolean, // Windows
|
|
623
624
|
/** A value indicating whether the accessibility elements contained within
|
|
624
625
|
* this accessibility element are hidden.
|
|
625
626
|
*
|
|
@@ -646,15 +647,6 @@ export type ViewProps = $ReadOnly<{|
|
|
|
646
647
|
*/
|
|
647
648
|
collapsableChildren?: ?boolean,
|
|
648
649
|
|
|
649
|
-
/**
|
|
650
|
-
* Contols whether this view, and its transitive children, are laid in a way
|
|
651
|
-
* consistent with web browsers ('strict'), or consistent with existing
|
|
652
|
-
* React Native code which may rely on incorrect behavior ('classic').
|
|
653
|
-
*
|
|
654
|
-
* This prop only works when using Fabric.
|
|
655
|
-
*/
|
|
656
|
-
experimental_layoutConformance?: ?('strict' | 'classic'),
|
|
657
|
-
|
|
658
650
|
/**
|
|
659
651
|
* Used to locate this view from native classes. Has precedence over `nativeID` prop.
|
|
660
652
|
*
|
|
@@ -10,27 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
if (global.RN$Bridgeless === true && global.RN$registerCallableModule) {
|
|
15
|
-
registerModule = global.RN$registerCallableModule;
|
|
16
|
-
} else {
|
|
17
|
-
const BatchedBridge = require('../BatchedBridge/BatchedBridge');
|
|
18
|
-
registerModule = (
|
|
19
|
-
moduleName: string,
|
|
20
|
-
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by
|
|
21
|
-
* Flow's LTI update could not be added via codemod */
|
|
22
|
-
factory,
|
|
23
|
-
) => BatchedBridge.registerLazyCallableModule(moduleName, factory);
|
|
24
|
-
}
|
|
13
|
+
import registerModule from './registerCallableModule';
|
|
25
14
|
|
|
26
15
|
registerModule('Systrace', () => require('../Performance/Systrace'));
|
|
27
16
|
if (!(global.RN$Bridgeless === true)) {
|
|
28
17
|
registerModule('JSTimers', () => require('./Timers/JSTimers'));
|
|
29
18
|
}
|
|
30
|
-
registerModule('HeapCapture', () => require('../HeapCapture/HeapCapture'));
|
|
31
|
-
registerModule('SamplingProfiler', () =>
|
|
32
|
-
require('../Performance/SamplingProfiler'),
|
|
33
|
-
);
|
|
34
19
|
registerModule('RCTLog', () => require('../Utilities/RCTLog'));
|
|
35
20
|
registerModule(
|
|
36
21
|
'RCTDeviceEventEmitter',
|
|
@@ -10,15 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
import registerCallableModule from '../Core/registerCallableModule';
|
|
14
14
|
|
|
15
15
|
const RCTEventEmitter = {
|
|
16
16
|
register(eventEmitter: any) {
|
|
17
|
-
|
|
18
|
-
global.RN$registerCallableModule('RCTEventEmitter', () => eventEmitter);
|
|
19
|
-
} else {
|
|
20
|
-
BatchedBridge.registerCallableModule('RCTEventEmitter', eventEmitter);
|
|
21
|
-
}
|
|
17
|
+
registerCallableModule('RCTEventEmitter', eventEmitter);
|
|
22
18
|
},
|
|
23
19
|
};
|
|
24
20
|
|
|
@@ -55,6 +55,17 @@ function getAssetPathInDrawableFolder(asset: PackagerAsset): string {
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Returns true if the asset can be loaded over the network.
|
|
58
|
+
*
|
|
59
|
+
* This prevents an issue loading XML assets on Android. XML asset types like
|
|
60
|
+
* vector drawables can only be loaded from precompiled source. Android does
|
|
61
|
+
* not support loading these over the network, and AAPT precompiles data by
|
|
62
|
+
* breaking path data and resource information apart into multiple files,
|
|
63
|
+
* stuffing it all into the resource table. As a result, we should only attempt
|
|
64
|
+
* to load resources as we would in release builds: by the resource name.
|
|
65
|
+
*
|
|
66
|
+
* For more information, see:
|
|
67
|
+
* https://issuetracker.google.com/issues/62435069
|
|
68
|
+
* https://issuetracker.google.com/issues/68293189
|
|
58
69
|
*/
|
|
59
70
|
function assetSupportsNetworkLoads(asset: PackagerAsset): boolean {
|
|
60
71
|
return !(asset.type === 'xml' && Platform.OS === 'android');
|
|
@@ -77,6 +77,17 @@ function getAssetPathInDrawableFolder(asset: PackagerAsset): string {
|
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Returns true if the asset can be loaded over the network.
|
|
80
|
+
*
|
|
81
|
+
* This prevents an issue loading XML assets on Android. XML asset types like
|
|
82
|
+
* vector drawables can only be loaded from precompiled source. Android does
|
|
83
|
+
* not support loading these over the network, and AAPT precompiles data by
|
|
84
|
+
* breaking path data and resource information apart into multiple files,
|
|
85
|
+
* stuffing it all into the resource table. As a result, we should only attempt
|
|
86
|
+
* to load resources as we would in release builds: by the resource name.
|
|
87
|
+
*
|
|
88
|
+
* For more information, see:
|
|
89
|
+
* https://issuetracker.google.com/issues/62435069
|
|
90
|
+
* https://issuetracker.google.com/issues/68293189
|
|
80
91
|
*/
|
|
81
92
|
function assetSupportsNetworkLoads(asset: PackagerAsset): boolean {
|
|
82
93
|
return !(asset.type === 'xml' && Platform.OS === 'android');
|
|
@@ -147,6 +147,7 @@ let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
|
|
|
147
147
|
'aria-disabled': ariaDisabled,
|
|
148
148
|
'aria-expanded': ariaExpanded,
|
|
149
149
|
'aria-selected': ariaSelected,
|
|
150
|
+
'aria-readonly': ariaReadOnly, // Windows
|
|
150
151
|
'aria-multiselectable': ariaMultiselectable, // Windows
|
|
151
152
|
'aria-required': ariaRequired, // Windows
|
|
152
153
|
height,
|
|
@@ -160,6 +161,7 @@ let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
|
|
|
160
161
|
disabled: ariaDisabled ?? props.accessibilityState?.disabled,
|
|
161
162
|
expanded: ariaExpanded ?? props.accessibilityState?.expanded,
|
|
162
163
|
selected: ariaSelected ?? props.accessibilityState?.selected,
|
|
164
|
+
readOnly: ariaReadOnly ?? props.accessibilityState?.readOnly, // Windows
|
|
163
165
|
multiselectable:
|
|
164
166
|
ariaMultiselectable ?? props.accessibilityState?.multiselectable, // Windows
|
|
165
167
|
required: ariaRequired ?? props.accessibilityState?.required, // Windows
|
|
@@ -10,23 +10,35 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
14
|
+
|
|
15
|
+
import React from 'react';
|
|
16
|
+
|
|
13
17
|
const View = require('../Components/View/View');
|
|
14
|
-
const React = require('react');
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
type Props = $ReadOnly<{
|
|
20
|
+
children: React.Node,
|
|
21
|
+
box?: ?$ReadOnly<{
|
|
22
|
+
top: number,
|
|
23
|
+
right: number,
|
|
24
|
+
bottom: number,
|
|
25
|
+
left: number,
|
|
26
|
+
...
|
|
27
|
+
}>,
|
|
28
|
+
style?: ViewStyleProp,
|
|
29
|
+
}>;
|
|
30
|
+
|
|
31
|
+
function BorderBox({children, box, style}: Props): React.Node {
|
|
32
|
+
if (!box) {
|
|
33
|
+
return children;
|
|
29
34
|
}
|
|
35
|
+
const borderStyle = {
|
|
36
|
+
borderTopWidth: box.top,
|
|
37
|
+
borderBottomWidth: box.bottom,
|
|
38
|
+
borderLeftWidth: box.left,
|
|
39
|
+
borderRightWidth: box.right,
|
|
40
|
+
};
|
|
41
|
+
return <View style={[borderStyle, style]}>{children}</View>;
|
|
30
42
|
}
|
|
31
43
|
|
|
32
44
|
module.exports = BorderBox;
|
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {TextStyleProp, ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
14
|
+
import type {InspectedElementFrame} from './Inspector';
|
|
15
|
+
|
|
16
|
+
import React from 'react';
|
|
17
|
+
|
|
13
18
|
const View = require('../Components/View/View');
|
|
14
19
|
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
15
20
|
const Text = require('../Text/Text');
|
|
16
21
|
const resolveBoxStyle = require('./resolveBoxStyle');
|
|
17
|
-
const React = require('react');
|
|
18
22
|
|
|
19
23
|
const blank = {
|
|
20
24
|
top: 0,
|
|
@@ -23,51 +27,65 @@ const blank = {
|
|
|
23
27
|
bottom: 0,
|
|
24
28
|
};
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<BoxContainer title="padding" box={padding}>
|
|
35
|
-
<View>
|
|
36
|
-
<Text style={styles.innerText}>
|
|
37
|
-
({(frame.left || 0).toFixed(1)}, {(frame.top || 0).toFixed(1)})
|
|
38
|
-
</Text>
|
|
39
|
-
<Text style={styles.innerText}>
|
|
40
|
-
{(frame.width || 0).toFixed(1)} ×{' '}
|
|
41
|
-
{(frame.height || 0).toFixed(1)}
|
|
42
|
-
</Text>
|
|
43
|
-
</View>
|
|
44
|
-
</BoxContainer>
|
|
45
|
-
</BoxContainer>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
30
|
+
type BoxInspectorProps = $ReadOnly<{
|
|
31
|
+
style: ViewStyleProp,
|
|
32
|
+
frame: ?InspectedElementFrame,
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
function BoxInspector({style, frame}: BoxInspectorProps): React.Node {
|
|
36
|
+
const margin = (style && resolveBoxStyle('margin', style)) || blank;
|
|
37
|
+
const padding = (style && resolveBoxStyle('padding', style)) || blank;
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<Text style={
|
|
58
|
-
{
|
|
39
|
+
return (
|
|
40
|
+
<BoxContainer title="margin" titleStyle={styles.marginLabel} box={margin}>
|
|
41
|
+
<BoxContainer title="padding" box={padding}>
|
|
42
|
+
<View>
|
|
43
|
+
<Text style={styles.innerText}>
|
|
44
|
+
({(frame?.left || 0).toFixed(1)}, {(frame?.top || 0).toFixed(1)})
|
|
45
|
+
</Text>
|
|
46
|
+
<Text style={styles.innerText}>
|
|
47
|
+
{(frame?.width || 0).toFixed(1)} ×{' '}
|
|
48
|
+
{(frame?.height || 0).toFixed(1)}
|
|
59
49
|
</Text>
|
|
60
|
-
<Text style={styles.boxText}>{box.top}</Text>
|
|
61
|
-
</View>
|
|
62
|
-
<View style={styles.row}>
|
|
63
|
-
<Text style={styles.boxText}>{box.left}</Text>
|
|
64
|
-
{this.props.children}
|
|
65
|
-
<Text style={styles.boxText}>{box.right}</Text>
|
|
66
50
|
</View>
|
|
67
|
-
|
|
51
|
+
</BoxContainer>
|
|
52
|
+
</BoxContainer>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
type BoxContainerProps = $ReadOnly<{
|
|
57
|
+
title: string,
|
|
58
|
+
titleStyle?: TextStyleProp,
|
|
59
|
+
box: $ReadOnly<{
|
|
60
|
+
top: number,
|
|
61
|
+
left: number,
|
|
62
|
+
right: number,
|
|
63
|
+
bottom: number,
|
|
64
|
+
}>,
|
|
65
|
+
children: React.Node,
|
|
66
|
+
}>;
|
|
67
|
+
|
|
68
|
+
function BoxContainer({
|
|
69
|
+
title,
|
|
70
|
+
titleStyle,
|
|
71
|
+
box,
|
|
72
|
+
children,
|
|
73
|
+
}: BoxContainerProps): React.Node {
|
|
74
|
+
return (
|
|
75
|
+
<View style={styles.box}>
|
|
76
|
+
<View style={styles.row}>
|
|
77
|
+
{}
|
|
78
|
+
<Text style={[titleStyle, styles.label]}>{title}</Text>
|
|
79
|
+
<Text style={styles.boxText}>{box.top}</Text>
|
|
80
|
+
</View>
|
|
81
|
+
<View style={styles.row}>
|
|
82
|
+
<Text style={styles.boxText}>{box.left}</Text>
|
|
83
|
+
{children}
|
|
84
|
+
<Text style={styles.boxText}>{box.right}</Text>
|
|
68
85
|
</View>
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
<Text style={styles.boxText}>{box.bottom}</Text>
|
|
87
|
+
</View>
|
|
88
|
+
);
|
|
71
89
|
}
|
|
72
90
|
|
|
73
91
|
const styles = StyleSheet.create({
|
|
@@ -10,65 +10,72 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
14
|
+
import type {InspectedElementFrame} from './Inspector';
|
|
15
|
+
|
|
16
|
+
import React from 'react';
|
|
17
|
+
|
|
13
18
|
const View = require('../Components/View/View');
|
|
14
19
|
const flattenStyle = require('../StyleSheet/flattenStyle');
|
|
15
20
|
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
16
21
|
const Dimensions = require('../Utilities/Dimensions').default;
|
|
17
22
|
const BorderBox = require('./BorderBox');
|
|
18
23
|
const resolveBoxStyle = require('./resolveBoxStyle');
|
|
19
|
-
const React = require('react');
|
|
20
|
-
|
|
21
|
-
class ElementBox extends React.Component<$FlowFixMeProps> {
|
|
22
|
-
render(): React.Node {
|
|
23
|
-
const style = flattenStyle(this.props.style) || {};
|
|
24
|
-
let margin: ?$ReadOnly<Style> = resolveBoxStyle('margin', style);
|
|
25
|
-
let padding: ?$ReadOnly<Style> = resolveBoxStyle('padding', style);
|
|
26
|
-
|
|
27
|
-
const frameStyle = {...this.props.frame};
|
|
28
|
-
const contentStyle: {width: number, height: number} = {
|
|
29
|
-
width: this.props.frame.width,
|
|
30
|
-
height: this.props.frame.height,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
if (margin != null) {
|
|
34
|
-
margin = resolveRelativeSizes(margin);
|
|
35
|
-
|
|
36
|
-
frameStyle.top -= margin.top;
|
|
37
|
-
frameStyle.left -= margin.left;
|
|
38
|
-
frameStyle.height += margin.top + margin.bottom;
|
|
39
|
-
frameStyle.width += margin.left + margin.right;
|
|
40
|
-
|
|
41
|
-
if (margin.top < 0) {
|
|
42
|
-
contentStyle.height += margin.top;
|
|
43
|
-
}
|
|
44
|
-
if (margin.bottom < 0) {
|
|
45
|
-
contentStyle.height += margin.bottom;
|
|
46
|
-
}
|
|
47
|
-
if (margin.left < 0) {
|
|
48
|
-
contentStyle.width += margin.left;
|
|
49
|
-
}
|
|
50
|
-
if (margin.right < 0) {
|
|
51
|
-
contentStyle.width += margin.right;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
24
|
|
|
55
|
-
|
|
56
|
-
|
|
25
|
+
type Props = $ReadOnly<{
|
|
26
|
+
frame: InspectedElementFrame,
|
|
27
|
+
style?: ?ViewStyleProp,
|
|
28
|
+
}>;
|
|
29
|
+
|
|
30
|
+
function ElementBox({frame, style}: Props): React.Node {
|
|
31
|
+
const flattenedStyle = flattenStyle(style) || {};
|
|
32
|
+
let margin: ?$ReadOnly<Style> = resolveBoxStyle('margin', flattenedStyle);
|
|
33
|
+
let padding: ?$ReadOnly<Style> = resolveBoxStyle('padding', flattenedStyle);
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
35
|
+
const frameStyle = {...frame};
|
|
36
|
+
const contentStyle: {width: number, height: number} = {
|
|
37
|
+
width: frame.width,
|
|
38
|
+
height: frame.height,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
if (margin != null) {
|
|
42
|
+
margin = resolveRelativeSizes(margin);
|
|
43
|
+
|
|
44
|
+
frameStyle.top -= margin.top;
|
|
45
|
+
frameStyle.left -= margin.left;
|
|
46
|
+
frameStyle.height += margin.top + margin.bottom;
|
|
47
|
+
frameStyle.width += margin.left + margin.right;
|
|
48
|
+
|
|
49
|
+
if (margin.top < 0) {
|
|
50
|
+
contentStyle.height += margin.top;
|
|
51
|
+
}
|
|
52
|
+
if (margin.bottom < 0) {
|
|
53
|
+
contentStyle.height += margin.bottom;
|
|
60
54
|
}
|
|
55
|
+
if (margin.left < 0) {
|
|
56
|
+
contentStyle.width += margin.left;
|
|
57
|
+
}
|
|
58
|
+
if (margin.right < 0) {
|
|
59
|
+
contentStyle.width += margin.right;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</BorderBox>
|
|
68
|
-
</BorderBox>
|
|
69
|
-
</View>
|
|
70
|
-
);
|
|
63
|
+
if (padding != null) {
|
|
64
|
+
padding = resolveRelativeSizes(padding);
|
|
65
|
+
|
|
66
|
+
contentStyle.width -= padding.left + padding.right;
|
|
67
|
+
contentStyle.height -= padding.top + padding.bottom;
|
|
71
68
|
}
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<View style={[styles.frame, frameStyle]} pointerEvents="none">
|
|
72
|
+
<BorderBox box={margin} style={styles.margin}>
|
|
73
|
+
<BorderBox box={padding} style={styles.padding}>
|
|
74
|
+
<View style={[styles.content, contentStyle]} />
|
|
75
|
+
</BorderBox>
|
|
76
|
+
</BorderBox>
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
const styles = StyleSheet.create({
|
|
@@ -10,42 +10,48 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
14
|
+
import type {____FlattenStyleProp_Internal} from '../StyleSheet/StyleSheetTypes';
|
|
15
|
+
|
|
16
|
+
import React from 'react';
|
|
17
|
+
|
|
13
18
|
const View = require('../Components/View/View');
|
|
14
19
|
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
15
20
|
const Text = require('../Text/Text');
|
|
16
|
-
const React = require('react');
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return <Text style={styles.noStyle}>No style</Text>;
|
|
22
|
-
}
|
|
23
|
-
const names = Object.keys(this.props.style);
|
|
24
|
-
return (
|
|
25
|
-
<View style={styles.container}>
|
|
26
|
-
<View>
|
|
27
|
-
{names.map(name => (
|
|
28
|
-
<Text key={name} style={styles.attr}>
|
|
29
|
-
{name}:
|
|
30
|
-
</Text>
|
|
31
|
-
))}
|
|
32
|
-
</View>
|
|
22
|
+
type Props = $ReadOnly<{
|
|
23
|
+
style?: ?____FlattenStyleProp_Internal<ViewStyleProp>,
|
|
24
|
+
}>;
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<Text key={name} style={styles.value}>
|
|
39
|
-
{typeof value !== 'string' && typeof value !== 'number'
|
|
40
|
-
? JSON.stringify(value)
|
|
41
|
-
: value}
|
|
42
|
-
</Text>
|
|
43
|
-
);
|
|
44
|
-
})}
|
|
45
|
-
</View>
|
|
46
|
-
</View>
|
|
47
|
-
);
|
|
26
|
+
function StyleInspector({style}: Props): React.Node {
|
|
27
|
+
if (!style) {
|
|
28
|
+
return <Text style={styles.noStyle}>No style</Text>;
|
|
48
29
|
}
|
|
30
|
+
const names = Object.keys(style);
|
|
31
|
+
return (
|
|
32
|
+
<View style={styles.container}>
|
|
33
|
+
<View>
|
|
34
|
+
{names.map(name => (
|
|
35
|
+
<Text key={name} style={styles.attr}>
|
|
36
|
+
{name}:
|
|
37
|
+
</Text>
|
|
38
|
+
))}
|
|
39
|
+
</View>
|
|
40
|
+
|
|
41
|
+
<View>
|
|
42
|
+
{names.map(name => {
|
|
43
|
+
const value = style?.[name];
|
|
44
|
+
return (
|
|
45
|
+
<Text key={name} style={styles.value}>
|
|
46
|
+
{typeof value !== 'string' && typeof value !== 'number'
|
|
47
|
+
? JSON.stringify(value)
|
|
48
|
+
: value}
|
|
49
|
+
</Text>
|
|
50
|
+
);
|
|
51
|
+
})}
|
|
52
|
+
</View>
|
|
53
|
+
</View>
|
|
54
|
+
);
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
const styles = StyleSheet.create({
|
|
@@ -121,7 +121,7 @@ const Presets = {
|
|
|
121
121
|
'opacity',
|
|
122
122
|
): LayoutAnimationConfig),
|
|
123
123
|
linear: (create(500, 'linear', 'opacity'): LayoutAnimationConfig),
|
|
124
|
-
spring: {
|
|
124
|
+
spring: ({
|
|
125
125
|
duration: 700,
|
|
126
126
|
create: {
|
|
127
127
|
type: 'linear',
|
|
@@ -135,7 +135,7 @@ const Presets = {
|
|
|
135
135
|
type: 'linear',
|
|
136
136
|
property: 'opacity',
|
|
137
137
|
},
|
|
138
|
-
},
|
|
138
|
+
}: LayoutAnimationConfig),
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
/**
|
|
@@ -222,7 +222,7 @@ export abstract class FlatListComponent<
|
|
|
222
222
|
/**
|
|
223
223
|
* Provides a handle to the underlying scroll responder.
|
|
224
224
|
*/
|
|
225
|
-
getScrollResponder: () => JSX.Element | null | undefined;
|
|
225
|
+
getScrollResponder: () => React.JSX.Element | null | undefined;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* Provides a reference to the underlying host component
|
package/Libraries/Modal/Modal.js
CHANGED
|
@@ -328,6 +328,7 @@ class Modal extends React.Component<Props, State> {
|
|
|
328
328
|
<VirtualizedListContextResetter>
|
|
329
329
|
<ScrollView.Context.Provider value={null}>
|
|
330
330
|
<View
|
|
331
|
+
// $FlowFixMe[incompatible-type]
|
|
331
332
|
style={[styles.container, containerStyles]}
|
|
332
333
|
collapsable={false}>
|
|
333
334
|
{innerChildren}
|
|
@@ -353,6 +354,7 @@ const styles = StyleSheet.create({
|
|
|
353
354
|
/* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb) This
|
|
354
355
|
* comment suppresses an error found when Flow v0.111 was deployed. To see
|
|
355
356
|
* the error, delete this comment and run Flow. */
|
|
357
|
+
// $FlowFixMe[incompatible-call]
|
|
356
358
|
[side]: 0,
|
|
357
359
|
top: 0,
|
|
358
360
|
flex: 1,
|
|
@@ -330,6 +330,7 @@ class Modal extends React.Component<Props, State> {
|
|
|
330
330
|
<VirtualizedListContextResetter>
|
|
331
331
|
<ScrollView.Context.Provider value={null}>
|
|
332
332
|
<View
|
|
333
|
+
// $FlowFixMe[incompatible-type]
|
|
333
334
|
style={[styles.container, containerStyles]}
|
|
334
335
|
collapsable={false}>
|
|
335
336
|
{innerChildren}
|
|
@@ -355,6 +356,7 @@ const styles = StyleSheet.create({
|
|
|
355
356
|
/* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb) This
|
|
356
357
|
* comment suppresses an error found when Flow v0.111 was deployed. To see
|
|
357
358
|
* the error, delete this comment and run Flow. */
|
|
359
|
+
// $FlowFixMe[incompatible-call]
|
|
358
360
|
[side]: 0,
|
|
359
361
|
top: 0,
|
|
360
362
|
flex: 1,
|