@office-iss/react-native-win32 0.69.0 → 0.70.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/.eslintrc.js +0 -1
- package/.flowconfig +5 -1
- package/CHANGELOG.json +194 -32
- package/CHANGELOG.md +79 -19
- package/IntegrationTests/AsyncStorageTest.js +20 -4
- package/IntegrationTests/BUCK +2 -2
- package/IntegrationTests/LayoutEventsTest.js +4 -1
- package/IntegrationTests/{launchWebSocketServer.command → launchWebSocketServer.sh} +3 -9
- package/Libraries/Alert/Alert.js +18 -4
- package/Libraries/Alert/Alert.win32.js +2 -0
- package/Libraries/Alert/NativeAlertManager.js +1 -0
- package/Libraries/Animated/Animated.js +2 -2
- package/Libraries/Animated/AnimatedEvent.js +7 -4
- package/Libraries/Animated/AnimatedImplementation.js +17 -3
- package/Libraries/Animated/AnimatedMock.js +7 -2
- package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
- package/Libraries/Animated/NativeAnimatedModule.js +3 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
- package/Libraries/Animated/animations/SpringAnimation.js +3 -3
- package/Libraries/Animated/animations/TimingAnimation.js +3 -3
- package/Libraries/Animated/createAnimatedComponent.js +8 -1
- package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
- package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
- package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
- package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
- package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
- package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
- package/Libraries/Animated/useAnimatedProps.js +1 -0
- package/Libraries/AppState/AppState.js +0 -32
- package/Libraries/BatchedBridge/MessageQueue.js +21 -15
- package/Libraries/BatchedBridge/NativeModules.js +3 -4
- package/Libraries/Blob/FileReader.js +0 -6
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +0 -20
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
- package/Libraries/Components/Keyboard/Keyboard.js +0 -11
- package/Libraries/Components/Pressable/Pressable.js +2 -0
- package/Libraries/Components/Pressable/Pressable.win32.js +2 -0
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +4 -32
- package/Libraries/Components/ScrollView/ScrollView.js +13 -11
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
- package/Libraries/Components/StatusBar/StatusBar.js +10 -7
- package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
- package/Libraries/Components/TextInput/TextInput.js +12 -2
- package/Libraries/Components/Touchable/PooledClass.js +16 -4
- package/Libraries/Components/Touchable/Touchable.js +50 -1
- package/Libraries/Components/Touchable/Touchable.win32.js +972 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +3 -8
- package/Libraries/Components/View/ViewPropTypes.win32.js +3 -8
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +2 -2
- package/Libraries/Core/polyfillPromise.js +0 -32
- package/Libraries/Core/setUpBatchedBridge.js +5 -1
- package/Libraries/Core/setUpPerformance.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
- package/Libraries/Image/AssetSourceResolver.js +2 -2
- package/Libraries/Image/Image.android.js +5 -3
- package/Libraries/Image/Image.ios.js +6 -3
- package/Libraries/Image/Image.win32.js +6 -3
- package/Libraries/Image/ImageSource.js +7 -5
- package/Libraries/Inspector/ElementBox.js +2 -2
- package/Libraries/Inspector/NetworkOverlay.js +13 -8
- package/Libraries/Interaction/PanResponder.js +16 -14
- package/Libraries/Linking/Linking.js +0 -11
- package/Libraries/Lists/FlatList.js +3 -2
- package/Libraries/Lists/SectionList.js +2 -0
- package/Libraries/Lists/ViewabilityHelper.js +7 -3
- package/Libraries/Lists/VirtualizeUtils.js +33 -20
- package/Libraries/Lists/VirtualizedList.js +93 -47
- package/Libraries/Lists/VirtualizedListContext.js +1 -0
- package/Libraries/Lists/VirtualizedSectionList.js +14 -9
- package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
- package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/LogBox.js +3 -1
- package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +26 -12
- package/Libraries/Network/XMLHttpRequest.js +9 -11
- package/Libraries/Performance/PureComponentDebug.js +1 -0
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
- package/Libraries/Pressability/Pressability.js +26 -16
- package/Libraries/Pressability/Pressability.win32.js +26 -16
- package/Libraries/Promise.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +16 -13
- package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
- package/Libraries/ReactNative/PaperUIManager.js +9 -9
- package/Libraries/ReactNative/PaperUIManager.win32.js +7 -8
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
- package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
- package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
- package/Libraries/ReactNative/renderApplication.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
- package/Libraries/Storage/AsyncStorage.js +7 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
- package/Libraries/StyleSheet/flattenStyle.js +1 -1
- package/Libraries/StyleSheet/processTransform.js +2 -0
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
- package/Libraries/Text/Text.js +15 -7
- package/Libraries/Types/CoreEventTypes.js +137 -11
- package/Libraries/Types/CoreEventTypes.win32.js +147 -22
- package/Libraries/Utilities/Dimensions.js +0 -13
- package/Libraries/Utilities/Dimensions.win32.js +0 -9
- package/Libraries/Utilities/HMRClient.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +0 -7
- package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
- package/Libraries/Utilities/codegenNativeCommands.js +11 -2
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/stringifySafe.js +3 -1
- package/Libraries/Utilities/truncate.js +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
- package/Libraries/Vibration/Vibration.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +1 -0
- package/Libraries/vendor/emitter/EventEmitter.js +105 -12
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
- package/flow/JSITimerInternalType.js +30 -0
- package/jest/assetFileTransformer.js +3 -2
- package/jest/setup.js +4 -0
- package/jest.config.js +0 -1
- package/overrides.json +23 -16
- package/package.json +23 -24
- package/rntypes/index.d.ts +0 -1
- package/src/rntypes/index.d.ts +0 -1
- package/Libraries/vendor/emitter/EventSubscription.js +0 -19
- package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
- package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
- package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
- package/jest/preprocessor.js +0 -40
- package/jest/preprocessor_DO_NOT_USE.js +0 -122
- package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizeUtils-test.js.snap +0 -3
|
@@ -28,12 +28,24 @@ export type FeatureFlags = {|
|
|
|
28
28
|
* for its hover callbacks
|
|
29
29
|
*/
|
|
30
30
|
shouldPressibilityUseW3CPointerEventsForHover: () => boolean,
|
|
31
|
+
/**
|
|
32
|
+
* Enables an experimental flush-queue debouncing in Animated.js.
|
|
33
|
+
*/
|
|
34
|
+
animatedShouldDebounceQueueFlush: () => boolean,
|
|
35
|
+
/**
|
|
36
|
+
* Enables an experimental mega-operation for Animated.js that replaces
|
|
37
|
+
* many calls to native with a single call into native, to reduce JSI/JNI
|
|
38
|
+
* traffic.
|
|
39
|
+
*/
|
|
40
|
+
animatedShouldUseSingleOp: () => boolean,
|
|
31
41
|
|};
|
|
32
42
|
|
|
33
43
|
const ReactNativeFeatureFlags: FeatureFlags = {
|
|
34
44
|
isLayoutAnimationEnabled: () => true,
|
|
35
45
|
shouldEmitW3CPointerEvents: () => false,
|
|
36
46
|
shouldPressibilityUseW3CPointerEventsForHover: () => false,
|
|
47
|
+
animatedShouldDebounceQueueFlush: () => false,
|
|
48
|
+
animatedShouldUseSingleOp: () => false,
|
|
37
49
|
};
|
|
38
50
|
|
|
39
51
|
module.exports = ReactNativeFeatureFlags;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Perform a set of runtime diagnostics, usually useful for test purpose.
|
|
15
|
+
* This is only meaningful for __DEV__ mode.
|
|
16
|
+
*/
|
|
17
|
+
export type RuntimeDiagnostics = {|
|
|
18
|
+
/**
|
|
19
|
+
* Check if the runtime diagnostics is enabled at all.
|
|
20
|
+
*/
|
|
21
|
+
isEnabled: () => boolean,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* If enabled, simulate early JavaScript errors during initialization.
|
|
25
|
+
*/
|
|
26
|
+
simulateEarlyJavaScriptErrors: () => void,
|
|
27
|
+
|};
|
|
28
|
+
|
|
29
|
+
export type RuntimeDiagnosticFlag = 'early_js_errors' | 'all';
|
|
30
|
+
|
|
31
|
+
const flags: Array<RuntimeDiagnosticFlag> = [];
|
|
32
|
+
let isEnabled = false;
|
|
33
|
+
let shouldEnableAll = false;
|
|
34
|
+
|
|
35
|
+
if (__DEV__) {
|
|
36
|
+
if (typeof global.RN$DiagnosticFlags === 'string') {
|
|
37
|
+
global.RN$DiagnosticFlags.split(',').forEach(flag => {
|
|
38
|
+
switch (flag) {
|
|
39
|
+
case 'early_js_errors':
|
|
40
|
+
case 'all':
|
|
41
|
+
flags.push(flag);
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
throw Error(
|
|
45
|
+
`RuntimeDiagnosticsFlags: unknown flag was supplied: '${flag}'`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
isEnabled = flags.length > 0;
|
|
50
|
+
shouldEnableAll = flags.includes('all');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const ReactNativeRuntimeDiagnostics: RuntimeDiagnostics = {
|
|
55
|
+
isEnabled: () => isEnabled,
|
|
56
|
+
simulateEarlyJavaScriptErrors: () => {
|
|
57
|
+
if (__DEV__) {
|
|
58
|
+
if (!isEnabled) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (shouldEnableAll || flags.includes('early_js_errors')) {
|
|
62
|
+
throw Error('[Runtime Diagnostics] Throwing a JavaScript error.');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
module.exports = ReactNativeRuntimeDiagnostics;
|
|
@@ -11,16 +11,15 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const resolveAssetSource = require('../Image/resolveAssetSource');
|
|
15
|
+
const processColor = require('../StyleSheet/processColor');
|
|
16
|
+
const processColorArray = require('../StyleSheet/processColorArray');
|
|
16
17
|
const insetsDiffer = require('../Utilities/differ/insetsDiffer');
|
|
17
|
-
const invariant = require('invariant');
|
|
18
18
|
const matricesDiffer = require('../Utilities/differ/matricesDiffer');
|
|
19
19
|
const pointsDiffer = require('../Utilities/differ/pointsDiffer');
|
|
20
|
-
const processColor = require('../StyleSheet/processColor');
|
|
21
|
-
const processColorArray = require('../StyleSheet/processColorArray');
|
|
22
|
-
const resolveAssetSource = require('../Image/resolveAssetSource');
|
|
23
20
|
const sizesDiffer = require('../Utilities/differ/sizesDiffer');
|
|
21
|
+
const UIManager = require('./UIManager');
|
|
22
|
+
const invariant = require('invariant');
|
|
24
23
|
|
|
25
24
|
function getNativeComponentAttributes(uiViewClassName: string): any {
|
|
26
25
|
const viewConfig = UIManager.getViewManagerConfig(uiViewClassName);
|
|
@@ -60,7 +59,7 @@ function getNativeComponentAttributes(uiViewClassName: string): any {
|
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
const validAttributes = {};
|
|
62
|
+
const validAttributes: {[string]: mixed} = {};
|
|
64
63
|
|
|
65
64
|
for (const key in nativeProps) {
|
|
66
65
|
const typeName = nativeProps[key];
|
|
@@ -38,7 +38,7 @@ function renderApplication<Props: Object>(
|
|
|
38
38
|
|
|
39
39
|
const performanceLogger = scopedPerformanceLogger ?? GlobalPerformanceLogger;
|
|
40
40
|
|
|
41
|
-
let renderable = (
|
|
41
|
+
let renderable: React.MixedElement = (
|
|
42
42
|
<PerformanceLoggerContext.Provider value={performanceLogger}>
|
|
43
43
|
<AppContainer
|
|
44
44
|
rootTag={rootTag}
|