@office-iss/react-native-win32 0.0.0-canary.278 → 0.0.0-canary.279

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 (48) hide show
  1. package/.flowconfig +1 -2
  2. package/CHANGELOG.json +40 -1
  3. package/CHANGELOG.md +16 -4
  4. package/Libraries/Animated/animations/Animation.js +10 -1
  5. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +1 -1
  6. package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
  7. package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
  8. package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
  9. package/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
  10. package/Libraries/Components/View/ViewPropTypes.js +0 -9
  11. package/Libraries/Components/View/ViewPropTypes.win32.js +0 -9
  12. package/Libraries/Core/ReactNativeVersion.js +1 -1
  13. package/Libraries/Core/setUpBatchedBridge.js +1 -16
  14. package/Libraries/EventEmitter/RCTEventEmitter.js +2 -6
  15. package/Libraries/Lists/FlatList.d.ts +1 -1
  16. package/Libraries/Modal/Modal.js +2 -0
  17. package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -2
  18. package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -2
  19. package/Libraries/NativeComponent/BaseViewConfig.win32.js +0 -2
  20. package/Libraries/Network/RCTNetworking.android.js +24 -16
  21. package/Libraries/Network/RCTNetworking.ios.js +1 -46
  22. package/Libraries/Network/RCTNetworking.win32.js +1 -46
  23. package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
  24. package/Libraries/PersonaCoin/PersonaCoin.js +1 -0
  25. package/Libraries/PersonaCoin/PersonaCoin.js.map +1 -1
  26. package/Libraries/Renderer/implementations/ReactFabric-dev.js +15828 -26461
  27. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3907 -2560
  28. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4399 -2878
  29. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16102 -26908
  30. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +4034 -2695
  31. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4535 -3045
  32. package/Libraries/Renderer/shims/ReactNativeTypes.js +5 -6
  33. package/Libraries/StyleSheet/processTransform.js +6 -0
  34. package/index.js +5 -0
  35. package/index.win32.js +5 -0
  36. package/overrides.json +7 -7
  37. package/package.json +19 -19
  38. package/src/private/animated/NativeAnimatedValidation.js +1 -1
  39. package/src/private/featureflags/ReactNativeFeatureFlags.js +16 -6
  40. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
  41. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
  42. package/src-win/Libraries/PersonaCoin/PersonaCoin.tsx +1 -0
  43. package/types/index.d.ts +1 -0
  44. package/Libraries/HeapCapture/HeapCapture.js +0 -29
  45. package/Libraries/HeapCapture/NativeJSCHeapCapture.js +0 -13
  46. package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -13
  47. package/Libraries/Performance/SamplingProfiler.js +0 -39
  48. package/src/private/specs/modules/NativeJSCSamplingProfiler.js +0 -19
package/.flowconfig CHANGED
@@ -107,7 +107,6 @@ flow/
107
107
 
108
108
  [options]
109
109
  enums=true
110
- as_const=true
111
110
  casting_syntax=both
112
111
 
113
112
  emoji=true
@@ -165,4 +164,4 @@ untyped-import
165
164
  untyped-type-import
166
165
 
167
166
  [version]
168
- ^0.255.0
167
+ ^0.257.1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,46 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 08 Jan 2025 06:30:20 GMT",
5
+ "date": "Fri, 10 Jan 2025 06:21:26 GMT",
6
+ "version": "0.0.0-canary.279",
7
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.279",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "34109996+chiaramooney@users.noreply.github.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "31b5dea7f76db31d1cfbda276b61d2fbfb116698",
14
+ "comment": "Integrate 12/20"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@office-iss/react-native-win32",
19
+ "comment": "Bump @rnw-scripts/eslint-config to v1.2.31",
20
+ "commit": "not available"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@office-iss/react-native-win32",
25
+ "comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.35",
26
+ "commit": "not available"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@office-iss/react-native-win32",
31
+ "comment": "Bump @rnw-scripts/just-task to v2.3.48",
32
+ "commit": "not available"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@office-iss/react-native-win32",
37
+ "comment": "Bump react-native-platform-override to v1.9.50",
38
+ "commit": "not available"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "date": "Wed, 08 Jan 2025 06:31:13 GMT",
6
45
  "version": "0.0.0-canary.278",
7
46
  "tag": "@office-iss/react-native-win32_v0.0.0-canary.278",
8
47
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,17 +1,29 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- <!-- This log was last generated on Wed, 08 Jan 2025 06:30:20 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Fri, 10 Jan 2025 06:21:26 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.0.0-canary.278
7
+ ## 0.0.0-canary.279
8
8
 
9
- Wed, 08 Jan 2025 06:30:20 GMT
9
+ Fri, 10 Jan 2025 06:21:26 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - Integrate 12/10 (34109996+chiaramooney@users.noreply.github.com)
13
+ - Integrate 12/20 (34109996+chiaramooney@users.noreply.github.com)
14
+ - Bump @rnw-scripts/eslint-config to v1.2.31
15
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.35
16
+ - Bump @rnw-scripts/just-task to v2.3.48
17
+ - Bump react-native-platform-override to v1.9.50
14
18
 
19
+ ## 0.0.0-canary.278
20
+
21
+ Wed, 08 Jan 2025 06:31:13 GMT
22
+
23
+ ### Changes
24
+
25
+ - Integrate 12/10 (34109996+chiaramooney@users.noreply.github.com)
26
+
15
27
  ## 0.0.0-canary.277
16
28
 
17
29
  Fri, 20 Dec 2024 06:22:28 GMT
@@ -79,7 +79,16 @@ export default class Animation {
79
79
 
80
80
  stop(): void {
81
81
  if (this.#nativeID != null) {
82
- NativeAnimatedHelper.API.stopAnimation(this.#nativeID);
82
+ const nativeID = this.#nativeID;
83
+ const identifier = `${nativeID}:stopAnimation`;
84
+ try {
85
+ // This is only required when singleOpBatching is used, as otherwise
86
+ // we flush calls immediately when there's no pending queue.
87
+ NativeAnimatedHelper.API.setWaitingForIdentifier(identifier);
88
+ NativeAnimatedHelper.API.stopAnimation(nativeID);
89
+ } finally {
90
+ NativeAnimatedHelper.API.unsetWaitingForIdentifier(identifier);
91
+ }
83
92
  }
84
93
  this.__active = false;
85
94
  }
@@ -105,7 +105,7 @@ export interface DrawerLayoutAndroidProps extends ViewProps {
105
105
  * The navigation view that will be rendered to the side of the
106
106
  * screen and can be pulled in.
107
107
  */
108
- renderNavigationView: () => JSX.Element;
108
+ renderNavigationView: () => React.JSX.Element;
109
109
 
110
110
  /**
111
111
  * Make the drawer take the entire screen and draw the background of
@@ -0,0 +1,21 @@
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
+ */
9
+
10
+ import type * as React from 'react';
11
+
12
+ type LayoutConformanceProps = {
13
+ /**
14
+ * strict: Layout in accordance with W3C spec, even when breaking
15
+ * compatibility: Layout with the same behavior as previous versions of React Native
16
+ */
17
+ mode: 'strict' | 'compatibility';
18
+ children: React.ReactNode;
19
+ };
20
+
21
+ export const experimental_LayoutConformance: React.ComponentType<LayoutConformanceProps>;
@@ -0,0 +1,59 @@
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
+ * @oncall react_native
10
+ */
11
+
12
+ import StyleSheet from '../../StyleSheet/StyleSheet';
13
+ import LayoutConformanceNativeComponent from './LayoutConformanceNativeComponent';
14
+ import * as React from 'react';
15
+
16
+ type Props = $ReadOnly<{
17
+ /**
18
+ * strict: Layout in accordance with W3C spec, even when breaking
19
+ * compatibility: Layout with the same behavior as previous versions of React Native
20
+ */
21
+ mode: 'strict' | 'compatibility',
22
+
23
+ children: React.Node,
24
+ }>;
25
+
26
+ // We want a graceful fallback for apps using legacy arch, but need to know
27
+ // ahead of time whether the component is available, so we test for global.
28
+ // This does not correctly handle mixed arch apps (which is okay, since we just
29
+ // degrade the error experience).
30
+ const isFabricUIManagerInstalled = global?.nativeFabricUIManager != null;
31
+
32
+ function LayoutConformance(props: Props): React.Node {
33
+ return (
34
+ <LayoutConformanceNativeComponent {...props} style={styles.container} />
35
+ );
36
+ }
37
+
38
+ function UnimplementedLayoutConformance(props: Props): React.Node {
39
+ if (__DEV__) {
40
+ const warnOnce = require('../../Utilities/warnOnce');
41
+
42
+ warnOnce(
43
+ 'layoutconformance-unsupported',
44
+ '"LayoutConformance" is only supported in the New Architecture',
45
+ );
46
+ }
47
+
48
+ return props.children;
49
+ }
50
+
51
+ export default (isFabricUIManagerInstalled
52
+ ? LayoutConformance
53
+ : UnimplementedLayoutConformance) as component(...Props);
54
+
55
+ const styles = StyleSheet.create({
56
+ container: {
57
+ display: 'contents',
58
+ },
59
+ });
@@ -0,0 +1,29 @@
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
+ import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
12
+ import type {ViewProps} from '../View/ViewPropTypes';
13
+
14
+ import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';
15
+
16
+ type Props = $ReadOnly<{
17
+ mode: 'strict' | 'compatibility',
18
+ ...ViewProps,
19
+ }>;
20
+
21
+ const LayoutConformanceNativeComponent: HostComponent<Props> =
22
+ NativeComponentRegistry.get<Props>('LayoutConformance', () => ({
23
+ uiViewClassName: 'LayoutConformance',
24
+ validAttributes: {
25
+ mode: true,
26
+ },
27
+ }));
28
+
29
+ export default LayoutConformanceNativeComponent;
@@ -343,13 +343,6 @@ export interface ViewProps
343
343
  * Used to reference react managed views from native code.
344
344
  */
345
345
  nativeID?: string | undefined;
346
-
347
- /**
348
- * Contols whether this view, and its transitive children, are laid in a way
349
- * consistent with web browsers ('strict'), or consistent with existing
350
- * React Native code which may rely on incorrect behavior ('classic').
351
- */
352
- experimental_layoutConformance?: 'strict' | 'classic' | undefined;
353
346
  }
354
347
 
355
348
  // For backwards compat.... // Win32
@@ -578,15 +578,6 @@ export type ViewProps = $ReadOnly<{|
578
578
  */
579
579
  collapsableChildren?: ?boolean,
580
580
 
581
- /**
582
- * Contols whether this view, and its transitive children, are laid in a way
583
- * consistent with web browsers ('strict'), or consistent with existing
584
- * React Native code which may rely on incorrect behavior ('classic').
585
- *
586
- * This prop only works when using Fabric.
587
- */
588
- experimental_layoutConformance?: ?('strict' | 'classic'),
589
-
590
581
  /**
591
582
  * Used to locate this view from native classes. Has precedence over `nativeID` prop.
592
583
  *
@@ -639,15 +639,6 @@ export type ViewProps = $ReadOnly<{|
639
639
  */
640
640
  collapsableChildren?: ?boolean,
641
641
 
642
- /**
643
- * Contols whether this view, and its transitive children, are laid in a way
644
- * consistent with web browsers ('strict'), or consistent with existing
645
- * React Native code which may rely on incorrect behavior ('classic').
646
- *
647
- * This prop only works when using Fabric.
648
- */
649
- experimental_layoutConformance?: ?('strict' | 'classic'),
650
-
651
642
  /**
652
643
  * Used to locate this view from native classes. Has precedence over `nativeID` prop.
653
644
  *
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 78,
19
19
  patch: 0,
20
- prerelease: 'nightly-20241210-6d235853f',
20
+ prerelease: 'nightly-20241221-66342d3cc',
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -10,27 +10,12 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- let registerModule;
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
- const BatchedBridge = require('../BatchedBridge/BatchedBridge');
13
+ import registerCallableModule from '../Core/registerCallableModule';
14
14
 
15
15
  const RCTEventEmitter = {
16
16
  register(eventEmitter: any) {
17
- if (global.RN$Bridgeless) {
18
- global.RN$registerCallableModule('RCTEventEmitter', () => eventEmitter);
19
- } else {
20
- BatchedBridge.registerCallableModule('RCTEventEmitter', eventEmitter);
21
- }
17
+ registerCallableModule('RCTEventEmitter', eventEmitter);
22
18
  },
23
19
  };
24
20
 
@@ -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
@@ -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,
@@ -293,8 +293,6 @@ const validAttributesForNonEventProps = {
293
293
 
294
294
  style: ReactNativeStyleAttributes,
295
295
 
296
- experimental_layoutConformance: true,
297
-
298
296
  // ReactClippingViewManager @ReactProps
299
297
  removeClippedSubviews: true,
300
298
 
@@ -357,8 +357,6 @@ const validAttributesForNonEventProps = {
357
357
  direction: true,
358
358
 
359
359
  style: ReactNativeStyleAttributes,
360
-
361
- experimental_layoutConformance: true,
362
360
  };
363
361
 
364
362
  // Props for bubbling and direct events
@@ -348,8 +348,6 @@ const validAttributesForNonEventProps = {
348
348
  direction: true,
349
349
 
350
350
  style: ReactNativeStyleAttributes,
351
-
352
- experimental_layoutConformance: true,
353
351
  };
354
352
 
355
353
  // Props for bubbling and direct events
@@ -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"]}