@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
|
@@ -1,122 +0,0 @@
|
|
|
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
|
-
* @format
|
|
8
|
-
* @flow
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/* eslint-env node */
|
|
12
|
-
|
|
13
|
-
'use strict';
|
|
14
|
-
|
|
15
|
-
const babelRegisterOnly = require('metro-babel-register');
|
|
16
|
-
const createCacheKeyFunction =
|
|
17
|
-
require('@jest/create-cache-key-function').default;
|
|
18
|
-
|
|
19
|
-
const {transformSync: babelTransformSync} = require('@babel/core');
|
|
20
|
-
const generate = require('@babel/generator').default;
|
|
21
|
-
|
|
22
|
-
const nodeFiles = new RegExp(
|
|
23
|
-
[
|
|
24
|
-
'/metro(?:-[^/]*)?/', // metro, metro-core, metro-source-map, metro-etc.
|
|
25
|
-
].join('|'),
|
|
26
|
-
);
|
|
27
|
-
const nodeOptions = babelRegisterOnly.config([nodeFiles]);
|
|
28
|
-
|
|
29
|
-
babelRegisterOnly([]);
|
|
30
|
-
|
|
31
|
-
const transformer = require('metro-react-native-babel-transformer');
|
|
32
|
-
module.exports = {
|
|
33
|
-
process(src /*: string */, file /*: string */) /*: {code: string, ...} */ {
|
|
34
|
-
if (nodeFiles.test(file)) {
|
|
35
|
-
// node specific transforms only
|
|
36
|
-
return babelTransformSync(src, {
|
|
37
|
-
filename: file,
|
|
38
|
-
sourceType: 'script',
|
|
39
|
-
...nodeOptions,
|
|
40
|
-
ast: false,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const {ast} = transformer.transform({
|
|
45
|
-
filename: file,
|
|
46
|
-
options: {
|
|
47
|
-
ast: true, // needed for open source (?) https://github.com/facebook/react-native/commit/f8d6b97140cffe8d18b2558f94570c8d1b410d5c#r28647044
|
|
48
|
-
dev: true,
|
|
49
|
-
enableBabelRuntime: false,
|
|
50
|
-
experimentalImportSupport: false,
|
|
51
|
-
globalPrefix: '',
|
|
52
|
-
hot: false,
|
|
53
|
-
inlineRequires: true,
|
|
54
|
-
minify: false,
|
|
55
|
-
platform: '',
|
|
56
|
-
projectRoot: '',
|
|
57
|
-
publicPath: '/assets',
|
|
58
|
-
retainLines: true,
|
|
59
|
-
sourceType: 'unambiguous', // b7 required. detects module vs script mode
|
|
60
|
-
},
|
|
61
|
-
src,
|
|
62
|
-
plugins: [
|
|
63
|
-
[require('@babel/plugin-transform-block-scoping')],
|
|
64
|
-
// the flow strip types plugin must go BEFORE class properties!
|
|
65
|
-
// there'll be a test case that fails if you don't.
|
|
66
|
-
[require('@babel/plugin-transform-flow-strip-types')],
|
|
67
|
-
[
|
|
68
|
-
require('@babel/plugin-proposal-class-properties'),
|
|
69
|
-
// use `this.foo = bar` instead of `this.defineProperty('foo', ...)`
|
|
70
|
-
{loose: true},
|
|
71
|
-
],
|
|
72
|
-
[require('@babel/plugin-transform-computed-properties')],
|
|
73
|
-
[require('@babel/plugin-transform-destructuring')],
|
|
74
|
-
[require('@babel/plugin-transform-function-name')],
|
|
75
|
-
[require('@babel/plugin-transform-literals')],
|
|
76
|
-
[require('@babel/plugin-transform-parameters')],
|
|
77
|
-
[require('@babel/plugin-transform-shorthand-properties')],
|
|
78
|
-
[require('@babel/plugin-transform-react-jsx')],
|
|
79
|
-
[require('@babel/plugin-transform-regenerator')],
|
|
80
|
-
[require('@babel/plugin-transform-sticky-regex')],
|
|
81
|
-
[require('@babel/plugin-transform-unicode-regex')],
|
|
82
|
-
[
|
|
83
|
-
require('@babel/plugin-transform-modules-commonjs'),
|
|
84
|
-
{strict: false, allowTopLevelThis: true},
|
|
85
|
-
],
|
|
86
|
-
[require('@babel/plugin-transform-classes')],
|
|
87
|
-
[require('@babel/plugin-transform-arrow-functions')],
|
|
88
|
-
[require('@babel/plugin-transform-spread')],
|
|
89
|
-
[require('@babel/plugin-proposal-object-rest-spread')],
|
|
90
|
-
[
|
|
91
|
-
require('@babel/plugin-transform-template-literals'),
|
|
92
|
-
{loose: true}, // dont 'a'.concat('b'), just use 'a'+'b'
|
|
93
|
-
],
|
|
94
|
-
[require('@babel/plugin-transform-exponentiation-operator')],
|
|
95
|
-
[require('@babel/plugin-transform-for-of'), {loose: true}],
|
|
96
|
-
[require('@babel/plugin-transform-react-display-name')],
|
|
97
|
-
[require('@babel/plugin-transform-react-jsx-source')],
|
|
98
|
-
],
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
return generate(
|
|
102
|
-
ast,
|
|
103
|
-
// $FlowFixMe[prop-missing] Error found when improving flow typing for libs
|
|
104
|
-
{
|
|
105
|
-
code: true,
|
|
106
|
-
comments: false,
|
|
107
|
-
compact: false,
|
|
108
|
-
filename: file,
|
|
109
|
-
retainLines: true,
|
|
110
|
-
sourceFileName: file,
|
|
111
|
-
sourceMaps: true,
|
|
112
|
-
},
|
|
113
|
-
src,
|
|
114
|
-
);
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
getCacheKey: (createCacheKeyFunction([
|
|
118
|
-
__filename,
|
|
119
|
-
require.resolve('metro-react-native-babel-transformer'),
|
|
120
|
-
require.resolve('@babel/core/package.json'),
|
|
121
|
-
]) /*: any */),
|
|
122
|
-
};
|