@office-iss/react-native-win32 0.77.0-preview.3 → 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.
Files changed (103) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +109 -16
  3. package/CHANGELOG.md +42 -10
  4. package/Libraries/Animated/animations/Animation.js +22 -1
  5. package/Libraries/Animated/animations/DecayAnimation.js +1 -0
  6. package/Libraries/Animated/animations/SpringAnimation.js +1 -0
  7. package/Libraries/Animated/animations/TimingAnimation.js +1 -0
  8. package/Libraries/Animated/nodes/AnimatedAddition.js +9 -2
  9. package/Libraries/Animated/nodes/AnimatedColor.js +4 -1
  10. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +10 -2
  11. package/Libraries/Animated/nodes/AnimatedDivision.js +9 -2
  12. package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -1
  13. package/Libraries/Animated/nodes/AnimatedModulo.js +5 -2
  14. package/Libraries/Animated/nodes/AnimatedMultiplication.js +9 -2
  15. package/Libraries/Animated/nodes/AnimatedNode.js +25 -46
  16. package/Libraries/Animated/nodes/AnimatedObject.js +9 -2
  17. package/Libraries/Animated/nodes/AnimatedProps.js +5 -1
  18. package/Libraries/Animated/nodes/AnimatedStyle.js +5 -1
  19. package/Libraries/Animated/nodes/AnimatedSubtraction.js +9 -2
  20. package/Libraries/Animated/nodes/AnimatedTracking.js +5 -1
  21. package/Libraries/Animated/nodes/AnimatedTransform.js +5 -1
  22. package/Libraries/Animated/nodes/AnimatedValue.js +49 -4
  23. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
  24. package/Libraries/Animated/useAnimatedProps.js +0 -43
  25. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +1 -1
  26. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +4 -1
  27. package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
  28. package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
  29. package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
  30. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  31. package/Libraries/Components/TextInput/TextInput.d.ts +5 -0
  32. package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
  33. package/Libraries/Components/TextInput/TextInput.js +6 -0
  34. package/Libraries/Components/TextInput/TextInput.win32.js +6 -0
  35. package/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
  36. package/Libraries/Components/View/ViewPropTypes.js +0 -9
  37. package/Libraries/Components/View/ViewPropTypes.win32.js +0 -9
  38. package/Libraries/Core/ReactNativeVersion.js +2 -2
  39. package/Libraries/Core/setUpBatchedBridge.js +1 -16
  40. package/Libraries/EventEmitter/RCTEventEmitter.js +2 -6
  41. package/Libraries/Image/AssetSourceResolver.js +11 -0
  42. package/Libraries/Inspector/BorderBox.js +26 -14
  43. package/Libraries/Inspector/BoxInspector.js +60 -42
  44. package/Libraries/Inspector/ElementBox.js +55 -48
  45. package/Libraries/Inspector/StyleInspector.js +36 -30
  46. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
  47. package/Libraries/Lists/FlatList.d.ts +1 -1
  48. package/Libraries/Modal/Modal.js +2 -0
  49. package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -2
  50. package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -2
  51. package/Libraries/NativeComponent/BaseViewConfig.win32.js +0 -2
  52. package/Libraries/Network/RCTNetworking.android.js +24 -16
  53. package/Libraries/Network/RCTNetworking.ios.js +1 -46
  54. package/Libraries/Network/RCTNetworking.win32.js +1 -46
  55. package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
  56. package/Libraries/PersonaCoin/PersonaCoin.js +1 -0
  57. package/Libraries/PersonaCoin/PersonaCoin.js.map +1 -1
  58. package/Libraries/ReactNative/UIManagerProperties.js +3 -1
  59. package/Libraries/Renderer/implementations/ReactFabric-dev.js +15828 -26461
  60. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3907 -2560
  61. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4399 -2878
  62. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16102 -26908
  63. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +4034 -2695
  64. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4535 -3045
  65. package/Libraries/Renderer/shims/ReactNativeTypes.js +5 -6
  66. package/Libraries/StyleSheet/processTransform.js +6 -0
  67. package/Libraries/Text/Text.d.ts +6 -1
  68. package/Libraries/Text/TextProps.js +2 -2
  69. package/Libraries/Text/TextProps.win32.js +2 -2
  70. package/Libraries/Utilities/BackHandler.android.js +5 -4
  71. package/Libraries/Utilities/BackHandler.ios.js +4 -5
  72. package/Libraries/Utilities/BackHandler.win32.js +5 -4
  73. package/index.js +5 -0
  74. package/index.win32.js +5 -0
  75. package/overrides.json +14 -14
  76. package/package.json +20 -21
  77. package/src/private/animated/NativeAnimatedValidation.js +1 -1
  78. package/src/private/featureflags/ReactNativeFeatureFlags.js +32 -26
  79. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -5
  80. package/src/private/renderer/errorhandling/ErrorHandlers.js +12 -55
  81. package/src/private/specs/modules/{NativeJSCSamplingProfiler.js → NativeCPUTime.js} +7 -2
  82. package/src/private/specs/modules/NativeFantom.js +37 -0
  83. package/src/private/utilities/ensureInstance.js +21 -0
  84. package/src/private/webapis/dom/nodes/ReactNativeElement.js +49 -6
  85. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +17 -9
  86. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +11 -11
  87. package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +1 -1
  88. package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -1
  89. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  90. package/src/private/webapis/performance/Performance.js +0 -12
  91. package/src/private/webapis/performance/specs/NativePerformance.js +0 -11
  92. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
  93. package/src-win/Libraries/PersonaCoin/PersonaCoin.tsx +1 -0
  94. package/src-win/Libraries/Text/Text.d.ts +6 -1
  95. package/types/index.d.ts +1 -0
  96. package/Libraries/HeapCapture/HeapCapture.js +0 -29
  97. package/Libraries/HeapCapture/NativeJSCHeapCapture.js +0 -13
  98. package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -13
  99. package/Libraries/Performance/SamplingProfiler.js +0 -39
  100. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +0 -334
  101. package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +0 -413
  102. package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +0 -181
  103. package/src/private/webapis/mutationobserver/specs/__mocks__/NativeMutationObserver.js +0 -327
@@ -8,7 +8,9 @@
8
8
  * @flow
9
9
  */
10
10
 
11
+ import type {EventSubscription} from '../vendor/emitter/EventEmitter';
11
12
  import type {RequestBody} from './convertRequestBody';
13
+ import type {RCTNetworkingEventDefinitions} from './RCTNetworkingEventDefinitions.flow';
12
14
  import type {NativeResponseType} from './XMLHttpRequest';
13
15
 
14
16
  // Do not require the native RCTNetworking module directly! Use this wrapper module instead.
@@ -35,19 +37,25 @@ function generateRequestId(): number {
35
37
  return _requestId++;
36
38
  }
37
39
 
40
+ const emitter = new NativeEventEmitter<$FlowFixMe>(
41
+ // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior
42
+ // If you want to use the native module on other platforms, please remove this condition and test its behavior
43
+ Platform.OS !== 'ios' ? null : NativeNetworkingAndroid,
44
+ );
45
+
38
46
  /**
39
- * This class is a wrapper around the native RCTNetworking module. It adds a necessary unique
47
+ * This object is a wrapper around the native RCTNetworking module. It adds a necessary unique
40
48
  * requestId to each network request that can be used to abort that request later on.
41
49
  */
42
- // FIXME: use typed events
43
- class RCTNetworking extends NativeEventEmitter<$FlowFixMe> {
44
- constructor() {
45
- super(
46
- // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior
47
- // If you want to use the native module on other platforms, please remove this condition and test its behavior
48
- Platform.OS !== 'ios' ? null : NativeNetworkingAndroid,
49
- );
50
- }
50
+ const RCTNetworking = {
51
+ addListener<K: $Keys<RCTNetworkingEventDefinitions>>(
52
+ eventType: K,
53
+ listener: (...$ElementType<RCTNetworkingEventDefinitions, K>) => mixed,
54
+ context?: mixed,
55
+ ): EventSubscription {
56
+ // $FlowFixMe[incompatible-call]
57
+ return emitter.addListener(eventType, listener, context);
58
+ },
51
59
 
52
60
  sendRequest(
53
61
  method: string,
@@ -81,15 +89,15 @@ class RCTNetworking extends NativeEventEmitter<$FlowFixMe> {
81
89
  withCredentials,
82
90
  );
83
91
  callback(requestId);
84
- }
92
+ },
85
93
 
86
94
  abortRequest(requestId: number) {
87
95
  NativeNetworkingAndroid.abortRequest(requestId);
88
- }
96
+ },
89
97
 
90
- clearCookies(callback: (result: boolean) => any) {
98
+ clearCookies(callback: (result: boolean) => void) {
91
99
  NativeNetworkingAndroid.clearCookies(callback);
92
- }
93
- }
100
+ },
101
+ };
94
102
 
95
- export default (new RCTNetworking(): RCTNetworking);
103
+ export default RCTNetworking;
@@ -14,54 +14,9 @@ import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
14
14
  import {type EventSubscription} from '../vendor/emitter/EventEmitter';
15
15
  import convertRequestBody, {type RequestBody} from './convertRequestBody';
16
16
  import NativeNetworkingIOS from './NativeNetworkingIOS';
17
+ import {type RCTNetworkingEventDefinitions} from './RCTNetworkingEventDefinitions.flow';
17
18
  import {type NativeResponseType} from './XMLHttpRequest';
18
19
 
19
- type RCTNetworkingEventDefinitions = $ReadOnly<{
20
- didSendNetworkData: [
21
- [
22
- number, // requestId
23
- number, // progress
24
- number, // total
25
- ],
26
- ],
27
- didReceiveNetworkResponse: [
28
- [
29
- number, // requestId
30
- number, // status
31
- ?{[string]: string}, // responseHeaders
32
- ?string, // responseURL
33
- ],
34
- ],
35
- didReceiveNetworkData: [
36
- [
37
- number, // requestId
38
- string, // response
39
- ],
40
- ],
41
- didReceiveNetworkIncrementalData: [
42
- [
43
- number, // requestId
44
- string, // responseText
45
- number, // progress
46
- number, // total
47
- ],
48
- ],
49
- didReceiveNetworkDataProgress: [
50
- [
51
- number, // requestId
52
- number, // loaded
53
- number, // total
54
- ],
55
- ],
56
- didCompleteNetworkResponse: [
57
- [
58
- number, // requestId
59
- string, // error
60
- boolean, // timeOutError
61
- ],
62
- ],
63
- }>;
64
-
65
20
  const RCTNetworking = {
66
21
  addListener<K: $Keys<RCTNetworkingEventDefinitions>>(
67
22
  eventType: K,
@@ -14,54 +14,9 @@ import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
14
14
  import {type EventSubscription} from '../vendor/emitter/EventEmitter';
15
15
  import convertRequestBody, {type RequestBody} from './convertRequestBody';
16
16
  import NativeNetworkingIOS from './NativeNetworkingIOS';
17
+ import {type RCTNetworkingEventDefinitions} from './RCTNetworkingEventDefinitions.flow';
17
18
  import {type NativeResponseType} from './XMLHttpRequest';
18
19
 
19
- type RCTNetworkingEventDefinitions = $ReadOnly<{
20
- didSendNetworkData: [
21
- [
22
- number, // requestId
23
- number, // progress
24
- number, // total
25
- ],
26
- ],
27
- didReceiveNetworkResponse: [
28
- [
29
- number, // requestId
30
- number, // status
31
- ?{[string]: string}, // responseHeaders
32
- ?string, // responseURL
33
- ],
34
- ],
35
- didReceiveNetworkData: [
36
- [
37
- number, // requestId
38
- string, // response
39
- ],
40
- ],
41
- didReceiveNetworkIncrementalData: [
42
- [
43
- number, // requestId
44
- string, // responseText
45
- number, // progress
46
- number, // total
47
- ],
48
- ],
49
- didReceiveNetworkDataProgress: [
50
- [
51
- number, // requestId
52
- number, // loaded
53
- number, // total
54
- ],
55
- ],
56
- didCompleteNetworkResponse: [
57
- [
58
- number, // requestId
59
- string, // error
60
- boolean, // timeOutError
61
- ],
62
- ],
63
- }>;
64
-
65
20
  const RCTNetworking = {
66
21
  addListener<K: $Keys<RCTNetworkingEventDefinitions>>(
67
22
  eventType: K,
@@ -0,0 +1,57 @@
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
+ export type RCTNetworkingEventDefinitions = $ReadOnly<{
14
+ didSendNetworkData: [
15
+ [
16
+ number, // requestId
17
+ number, // progress
18
+ number, // total
19
+ ],
20
+ ],
21
+ didReceiveNetworkResponse: [
22
+ [
23
+ number, // requestId
24
+ number, // status
25
+ ?{[string]: string}, // responseHeaders
26
+ ?string, // responseURL
27
+ ],
28
+ ],
29
+ didReceiveNetworkData: [
30
+ [
31
+ number, // requestId
32
+ string, // response
33
+ ],
34
+ ],
35
+ didReceiveNetworkIncrementalData: [
36
+ [
37
+ number, // requestId
38
+ string, // responseText
39
+ number, // progress
40
+ number, // total
41
+ ],
42
+ ],
43
+ didReceiveNetworkDataProgress: [
44
+ [
45
+ number, // requestId
46
+ number, // loaded
47
+ number, // total
48
+ ],
49
+ ],
50
+ didCompleteNetworkResponse: [
51
+ [
52
+ number, // requestId
53
+ string, // error
54
+ boolean, // timeOutError
55
+ ],
56
+ ],
57
+ }>;
@@ -10,6 +10,7 @@ const PersonaCoinPropTypes_1 = require("./PersonaCoinPropTypes");
10
10
  const RCTPersonaCoin = (0, react_native_1.requireNativeComponent)('RCTPersonaCoin');
11
11
  const PersonaCoin = (props) => react_1.default.createElement(RCTPersonaCoin, { ...props });
12
12
  exports.PersonaCoin = PersonaCoin;
13
+ // @ts-ignore
13
14
  exports.PersonaCoin.defaultProps = PersonaCoinPropTypes_1.PersonaCoinDefaultProps;
14
15
  exports.PersonaCoin.displayName = 'PersonaCoin';
15
16
  //# sourceMappingURL=PersonaCoin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PersonaCoin.js","sourceRoot":"","sources":["../../src-win/Libraries/PersonaCoin/PersonaCoin.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AAEzB,+CAAsD;AAEtD,iEAAiE;AAEjE,MAAM,cAAc,GAAG,IAAA,qCAAsB,EAAC,gBAAgB,CAAC,CAAC;AAEzD,MAAM,WAAW,GAA+C,CAAC,KAAwB,EAAE,EAAE,CAAC,8BAAC,cAAc,OAAK,KAAK,GAAI,CAAC;AAAtH,QAAA,WAAW,eAA2G;AACnI,mBAAW,CAAC,YAAY,GAAG,8CAAuB,CAAC;AACnD,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\n\nimport { requireNativeComponent } from 'react-native';\nimport { IPersonaCoinProps } from './PersonaCoinTypes';\nimport { PersonaCoinDefaultProps } from './PersonaCoinPropTypes';\n\nconst RCTPersonaCoin = requireNativeComponent('RCTPersonaCoin');\n\nexport const PersonaCoin: React.FunctionComponent<IPersonaCoinProps> = (props: IPersonaCoinProps) => <RCTPersonaCoin {...props} />;\nPersonaCoin.defaultProps = PersonaCoinDefaultProps;\nPersonaCoin.displayName = 'PersonaCoin';\n"]}
1
+ {"version":3,"file":"PersonaCoin.js","sourceRoot":"","sources":["../../src-win/Libraries/PersonaCoin/PersonaCoin.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AAEzB,+CAAsD;AAEtD,iEAAiE;AAEjE,MAAM,cAAc,GAAG,IAAA,qCAAsB,EAAC,gBAAgB,CAAC,CAAC;AAEzD,MAAM,WAAW,GAA+C,CAAC,KAAwB,EAAE,EAAE,CAAC,8BAAC,cAAc,OAAK,KAAK,GAAI,CAAC;AAAtH,QAAA,WAAW,eAA2G;AACnI,aAAa;AACb,mBAAW,CAAC,YAAY,GAAG,8CAAuB,CAAC;AACnD,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\n\nimport { requireNativeComponent } from 'react-native';\nimport { IPersonaCoinProps } from './PersonaCoinTypes';\nimport { PersonaCoinDefaultProps } from './PersonaCoinPropTypes';\n\nconst RCTPersonaCoin = requireNativeComponent('RCTPersonaCoin');\n\nexport const PersonaCoin: React.FunctionComponent<IPersonaCoinProps> = (props: IPersonaCoinProps) => <RCTPersonaCoin {...props} />;\n// @ts-ignore\nPersonaCoin.defaultProps = PersonaCoinDefaultProps;\nPersonaCoin.displayName = 'PersonaCoin';\n"]}
@@ -26,7 +26,7 @@
26
26
  * accessed. Once UIManager property accesses for view managers has been fully
27
27
  * deprecated, this file will also be removed.
28
28
  */
29
- module.exports = [
29
+ const UIManagerProperties: $ReadOnlyArray<string> = [
30
30
  'clearJSResponder',
31
31
  'configureNextLayoutAnimation',
32
32
  'createView',
@@ -59,3 +59,5 @@ module.exports = [
59
59
  'genericDirectEventTypes',
60
60
  'lazilyLoadView',
61
61
  ];
62
+
63
+ module.exports = UIManagerProperties;