@office-iss/react-native-win32 0.82.0 → 0.83.0-preview.0
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 +2 -2
- package/CHANGELOG.json +43 -40
- package/CHANGELOG.md +15 -20
- package/IntegrationTests/ImageCachePolicyTest.js +1 -1
- package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
- package/Libraries/Animated/components/AnimatedImage.js +4 -3
- package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
- package/Libraries/Animated/components/AnimatedText.js +7 -3
- package/Libraries/Animated/components/AnimatedView.js +3 -2
- package/Libraries/Animated/createAnimatedComponent.js +24 -12
- package/Libraries/Animated/nodes/AnimatedColor.js +26 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +43 -15
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +43 -15
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +2 -2
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +2 -2
- package/Libraries/Components/RefreshControl/RefreshControl.d.ts +3 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +1 -0
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
- package/Libraries/Components/Switch/Switch.d.ts +2 -2
- package/Libraries/Components/TextInput/TextInput.d.ts +2 -5
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +18 -12
- package/Libraries/Components/TextInput/TextInputState.win32.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +7 -7
- package/Libraries/Components/Touchable/TouchableWin32.js +9 -6
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +19 -1
- package/Libraries/Components/View/View.d.ts +2 -2
- package/Libraries/Components/View/View.win32.js +17 -15
- package/Libraries/Components/View/ViewNativeComponent.js +13 -1
- package/Libraries/Components/View/ViewWin32.d.ts +2 -2
- package/Libraries/Components/View/ViewWin32.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/setUpPerformance.js +2 -0
- package/Libraries/Debugging/DebuggingOverlay.js +14 -14
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +8 -2
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +5 -2
- package/Libraries/Image/Image.d.ts +3 -3
- package/Libraries/Image/ImageInjection.js +3 -6
- package/Libraries/Image/ImageTypes.flow.js +3 -7
- package/Libraries/Lists/FlatList.js +8 -8
- package/Libraries/Lists/SectionList.d.ts +5 -1
- package/Libraries/Lists/ViewabilityHelper.js +1 -1
- package/Libraries/Lists/VirtualizedList.js +1 -0
- package/Libraries/LogBox/UI/AnsiHighlight.js +4 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +11 -2
- package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -0
- package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +3 -1
- package/Libraries/Network/RCTNetworking.android.js +3 -1
- package/Libraries/Network/RCTNetworking.ios.js +3 -0
- package/Libraries/Network/RCTNetworking.win32.js +3 -0
- package/Libraries/Network/XMLHttpRequest.js +1 -41
- package/Libraries/Pressability/Pressability.win32.js +5 -5
- package/Libraries/Pressability/usePressability.js +14 -3
- package/Libraries/ReactNative/PaperUIManager.win32.js +7 -7
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +20 -82
- package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +6759 -4478
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3169 -3119
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4732 -3535
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +6646 -4070
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3136 -2825
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4761 -3312
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +2 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +44 -0
- package/Libraries/StyleSheet/processBackgroundPosition.js +284 -0
- package/Libraries/StyleSheet/processBackgroundRepeat.js +105 -0
- package/Libraries/StyleSheet/processBackgroundSize.js +104 -0
- package/Libraries/Text/Text.d.ts +2 -2
- package/Libraries/Text/TextNativeComponent.js +10 -0
- package/Libraries/Text/TextNativeComponent.win32.js +10 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +3 -9
- package/Libraries/Utilities/DevLoadingView.js +14 -6
- package/Libraries/Utilities/FocusManager.win32.js +2 -2
- package/Libraries/Utilities/HMRClient.js +13 -5
- package/flow/bom.js.flow +1 -0
- package/index.js +6 -0
- package/index.win32.js +130 -207
- package/index.win32.js.flow +488 -0
- package/jest/mockComponent.js +6 -6
- package/jest/setup.js +15 -10
- package/overrides.json +16 -10
- package/package.json +39 -26
- package/src/private/components/virtualview/VirtualView.js +22 -27
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +6 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +100 -19
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +18 -3
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +12 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +76 -15
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +1 -0
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/performance/ResourceTiming.js +31 -4
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +6 -3
- package/src-win/Libraries/Components/View/ViewWin32.d.ts +2 -2
- package/src-win/Libraries/Text/Text.d.ts +2 -2
- package/src-win/index.win32.js.flow +488 -0
- package/types/index.d.ts +1 -0
- package/types/public/ReactNativeTypes.d.ts +115 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +0 -152
|
@@ -14,29 +14,37 @@ import NativeDevLoadingView from './NativeDevLoadingView';
|
|
|
14
14
|
|
|
15
15
|
const COLOR_SCHEME = {
|
|
16
16
|
dark: {
|
|
17
|
+
load: {
|
|
18
|
+
backgroundColor: '#fafafa',
|
|
19
|
+
textColor: '#242526',
|
|
20
|
+
},
|
|
17
21
|
refresh: {
|
|
18
22
|
backgroundColor: '#2584e8',
|
|
19
23
|
textColor: '#ffffff',
|
|
20
24
|
},
|
|
21
|
-
|
|
22
|
-
backgroundColor: '#
|
|
23
|
-
textColor: '#
|
|
25
|
+
error: {
|
|
26
|
+
backgroundColor: '#1065AF',
|
|
27
|
+
textColor: '#ffffff',
|
|
24
28
|
},
|
|
25
29
|
},
|
|
26
30
|
default: {
|
|
31
|
+
load: {
|
|
32
|
+
backgroundColor: '#404040',
|
|
33
|
+
textColor: '#ffffff',
|
|
34
|
+
},
|
|
27
35
|
refresh: {
|
|
28
36
|
backgroundColor: '#2584e8',
|
|
29
37
|
textColor: '#ffffff',
|
|
30
38
|
},
|
|
31
|
-
|
|
32
|
-
backgroundColor: '#
|
|
39
|
+
error: {
|
|
40
|
+
backgroundColor: '#1065AF',
|
|
33
41
|
textColor: '#ffffff',
|
|
34
42
|
},
|
|
35
43
|
},
|
|
36
44
|
};
|
|
37
45
|
|
|
38
46
|
export default {
|
|
39
|
-
showMessage(message: string, type: 'load' | 'refresh') {
|
|
47
|
+
showMessage(message: string, type: 'load' | 'refresh' | 'error') {
|
|
40
48
|
if (NativeDevLoadingView) {
|
|
41
49
|
const colorScheme =
|
|
42
50
|
getColorScheme() === 'dark' ? COLOR_SCHEME.dark : COLOR_SCHEME.default;
|
|
@@ -22,14 +22,14 @@ class FocusManager {
|
|
|
22
22
|
if (ref) {
|
|
23
23
|
if (setWindowFocus) {
|
|
24
24
|
UIManager.dispatchViewManagerCommand(
|
|
25
|
-
// $
|
|
25
|
+
// $FlowFixMe[incompatible-type]
|
|
26
26
|
findNodeHandle(ref),
|
|
27
27
|
UIManager.getViewManagerConfig('RCTView').Commands.aggressivefocus,
|
|
28
28
|
[],
|
|
29
29
|
);
|
|
30
30
|
} else {
|
|
31
31
|
UIManager.dispatchViewManagerCommand(
|
|
32
|
-
// $
|
|
32
|
+
// $FlowFixMe[incompatible-type]
|
|
33
33
|
findNodeHandle(ref),
|
|
34
34
|
UIManager.getViewManagerConfig('RCTView').Commands.politefocus,
|
|
35
35
|
[],
|
|
@@ -211,7 +211,9 @@ Error: ${e.message}`;
|
|
|
211
211
|
setHMRUnavailableReason(error);
|
|
212
212
|
});
|
|
213
213
|
|
|
214
|
+
let pendingUpdatesCount = 0;
|
|
214
215
|
client.on('update-start', ({isInitialUpdate}) => {
|
|
216
|
+
pendingUpdatesCount++;
|
|
215
217
|
currentCompileErrorMessage = null;
|
|
216
218
|
didConnect = true;
|
|
217
219
|
|
|
@@ -228,12 +230,13 @@ Error: ${e.message}`;
|
|
|
228
230
|
});
|
|
229
231
|
|
|
230
232
|
client.on('update-done', () => {
|
|
231
|
-
|
|
233
|
+
pendingUpdatesCount--;
|
|
234
|
+
if (pendingUpdatesCount === 0) {
|
|
235
|
+
DevLoadingView.hide();
|
|
236
|
+
}
|
|
232
237
|
});
|
|
233
238
|
|
|
234
239
|
client.on('error', data => {
|
|
235
|
-
DevLoadingView.hide();
|
|
236
|
-
|
|
237
240
|
if (data.type === 'GraphNotFoundError') {
|
|
238
241
|
client.close();
|
|
239
242
|
setHMRUnavailableReason(
|
|
@@ -253,8 +256,6 @@ Error: ${e.message}`;
|
|
|
253
256
|
});
|
|
254
257
|
|
|
255
258
|
client.on('close', closeEvent => {
|
|
256
|
-
DevLoadingView.hide();
|
|
257
|
-
|
|
258
259
|
// https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1
|
|
259
260
|
// https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.5
|
|
260
261
|
const isNormalOrUnsetCloseReason =
|
|
@@ -296,10 +297,17 @@ function setHMRUnavailableReason(reason: string) {
|
|
|
296
297
|
}
|
|
297
298
|
hmrUnavailableReason = reason;
|
|
298
299
|
|
|
300
|
+
const DevLoadingView = require('./DevLoadingView').default;
|
|
301
|
+
DevLoadingView.hide();
|
|
302
|
+
|
|
299
303
|
// We only want to show a warning if Fast Refresh is on *and* if we ever
|
|
300
304
|
// previously managed to connect successfully. We don't want to show
|
|
301
305
|
// the warning to native engineers who use cached bundles without Metro.
|
|
302
306
|
if (hmrClient.isEnabled() && didConnect) {
|
|
307
|
+
DevLoadingView.showMessage(
|
|
308
|
+
'Fast Refresh disconnected. Reload app to reconnect.',
|
|
309
|
+
'error',
|
|
310
|
+
);
|
|
303
311
|
console.warn(reason);
|
|
304
312
|
// (Not using the `warning` module to prevent a Buck cycle.)
|
|
305
313
|
}
|
package/flow/bom.js.flow
CHANGED
package/index.js
CHANGED
|
@@ -66,6 +66,12 @@ module.exports = {
|
|
|
66
66
|
get Modal() {
|
|
67
67
|
return require('./Libraries/Modal/Modal').default;
|
|
68
68
|
},
|
|
69
|
+
get unstable_NativeText() {
|
|
70
|
+
return require('./Libraries/Text/TextNativeComponent').NativeText;
|
|
71
|
+
},
|
|
72
|
+
get unstable_NativeView() {
|
|
73
|
+
return require('./Libraries/Components/View/ViewNativeComponent').default;
|
|
74
|
+
},
|
|
69
75
|
get Pressable() {
|
|
70
76
|
return require('./Libraries/Components/Pressable/Pressable').default;
|
|
71
77
|
},
|