@office-iss/react-native-win32 0.0.0-canary.292 → 0.0.0-canary.293
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 +1 -1
- package/CHANGELOG.json +28 -1
- package/CHANGELOG.md +14 -4
- package/Libraries/Blob/URL.js +13 -1
- package/Libraries/Components/Pressable/Pressable.js +4 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +4 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
- package/Libraries/Components/Switch/Switch.js +7 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +25 -0
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +25 -1
- package/Libraries/Components/TextInput/TextInput.js +2 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +2 -0
- package/Libraries/Components/View/View.js +18 -21
- package/Libraries/Components/View/View.win32.js +21 -24
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +5 -5
- package/Libraries/Image/ImageProps.js +2 -3
- package/Libraries/Image/ImageSource.js +3 -1
- package/Libraries/Image/ImageSourceUtils.js +4 -2
- package/Libraries/Lists/FlatList.d.ts +2 -2
- package/Libraries/Lists/SectionListModern.js +1 -2
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +3 -2
- package/Libraries/ReactNative/RendererImplementation.js +6 -5
- package/Libraries/ReactNative/renderApplication.js +9 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +47 -3
- package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
- package/Libraries/Text/TextNativeComponent.js +0 -4
- package/Libraries/Text/TextNativeComponent.win32.js +0 -4
- package/index.js +1 -288
- package/index.win32.js +3 -292
- package/overrides.json +11 -11
- package/package.json +15 -15
- package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +5 -4
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +7 -5
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +10 -9
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +13 -11
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +4 -3
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +8 -7
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +9 -8
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +6 -5
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +5 -4
- package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
- package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
- package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +22 -17
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -4
- package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
- package/src/private/types/HostInstance.js +2 -2
- package/types/index.d.ts +1 -1
- package/types/public/ReactNativeTypes.d.ts +2 -2
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
- package/Libraries/Blob/__mocks__/BlobModule.js +0 -16
- package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
- package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
- package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
- package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
- package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
- package/jest/__tests__/setup-test.js +0 -18
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
- /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
- /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
package/.flowconfig
CHANGED
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,34 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu,
|
|
5
|
+
"date": "Thu, 17 Jul 2025 05:25:18 GMT",
|
|
6
|
+
"version": "0.0.0-canary.293",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.293",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "10109130+sharath2727@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "b4ad43a0d79d39aae1c1ecf91d3a0089c0e334ec",
|
|
14
|
+
"comment": "Integrate RN Nightly Build 0.80.0-nightly-20250428-9efcdc091"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@office-iss/react-native-win32",
|
|
19
|
+
"comment": "Bump @rnw-scripts/just-task to v2.3.54",
|
|
20
|
+
"commit": "not available"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@office-iss/react-native-win32",
|
|
25
|
+
"comment": "Bump react-native-platform-override to v1.9.56",
|
|
26
|
+
"commit": "not available"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Thu, 03 Jul 2025 05:24:24 GMT",
|
|
6
33
|
"version": "0.0.0-canary.292",
|
|
7
34
|
"tag": "@office-iss/react-native-win32_v0.0.0-canary.292",
|
|
8
35
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Thu,
|
|
3
|
+
<!-- This log was last generated on Thu, 17 Jul 2025 05:25:18 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.0.0-canary.
|
|
7
|
+
## 0.0.0-canary.293
|
|
8
8
|
|
|
9
|
-
Thu,
|
|
9
|
+
Thu, 17 Jul 2025 05:25:18 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Integrate RN Nightly Build 0.80.0-nightly-20250428-9efcdc091 (10109130+sharath2727@users.noreply.github.com)
|
|
14
|
+
- Bump @rnw-scripts/just-task to v2.3.54
|
|
15
|
+
- Bump react-native-platform-override to v1.9.56
|
|
14
16
|
|
|
17
|
+
## 0.0.0-canary.292
|
|
18
|
+
|
|
19
|
+
Thu, 03 Jul 2025 05:24:24 GMT
|
|
20
|
+
|
|
21
|
+
### Changes
|
|
22
|
+
|
|
23
|
+
- intergrate rn 0.80.0-nightly-20250414-70cdf12c4 (satkh@microsoft.com)
|
|
24
|
+
|
|
15
25
|
## 0.0.0-canary.291
|
|
16
26
|
|
|
17
27
|
Sat, 21 Jun 2025 05:21:48 GMT
|
package/Libraries/Blob/URL.js
CHANGED
|
@@ -81,7 +81,19 @@ export class URL {
|
|
|
81
81
|
let baseUrl = null;
|
|
82
82
|
if (!base || validateBaseUrl(url)) {
|
|
83
83
|
this._url = url;
|
|
84
|
-
if (
|
|
84
|
+
if (this._url.includes('#')) {
|
|
85
|
+
const split = this._url.split('#');
|
|
86
|
+
const beforeHash = split[0];
|
|
87
|
+
const website = beforeHash.split('://')[1];
|
|
88
|
+
if (!website.includes('/')) {
|
|
89
|
+
this._url = split.join('/#');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (
|
|
94
|
+
!this._url.endsWith('/') &&
|
|
95
|
+
!(this._url.includes('?') || this._url.includes('#'))
|
|
96
|
+
) {
|
|
85
97
|
this._url += '/';
|
|
86
98
|
}
|
|
87
99
|
} else {
|
|
@@ -152,7 +152,10 @@ type PressableBaseProps = $ReadOnly<{
|
|
|
152
152
|
}>;
|
|
153
153
|
|
|
154
154
|
export type PressableProps = $ReadOnly<{
|
|
155
|
-
|
|
155
|
+
// Pressability may override `onMouseEnter` and `onMouseLeave` to
|
|
156
|
+
// implement `onHoverIn` and `onHoverOut` in a platform-agnostic way.
|
|
157
|
+
// Hover events should be used instead of mouse events.
|
|
158
|
+
...Omit<ViewProps, 'onMouseEnter' | 'onMouseLeave'>,
|
|
156
159
|
...PressableBaseProps,
|
|
157
160
|
}>;
|
|
158
161
|
|
|
@@ -198,7 +198,10 @@ type PressableBaseProps = $ReadOnly<{
|
|
|
198
198
|
}>;
|
|
199
199
|
|
|
200
200
|
export type PressableProps = $ReadOnly<{
|
|
201
|
-
|
|
201
|
+
// Pressability may override `onMouseEnter` and `onMouseLeave` to
|
|
202
|
+
// implement `onHoverIn` and `onHoverOut` in a platform-agnostic way.
|
|
203
|
+
// Hover events should be used instead of mouse events.
|
|
204
|
+
...Omit<ViewProps, 'onMouseEnter' | 'onMouseLeave'>,
|
|
202
205
|
...PressableBaseProps,
|
|
203
206
|
}>;
|
|
204
207
|
|
|
@@ -869,7 +869,7 @@ export class ScrollView extends ScrollViewBase {
|
|
|
869
869
|
* This function sends props straight to native. They will not participate in
|
|
870
870
|
* future diff process - this means that if you do not include them in the
|
|
871
871
|
* next render, they will remain active (see [Direct
|
|
872
|
-
* Manipulation](https://reactnative.dev/docs/direct-manipulation)).
|
|
872
|
+
* Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture)).
|
|
873
873
|
*/
|
|
874
874
|
setNativeProps(nativeProps: object): void;
|
|
875
875
|
}
|
|
@@ -22,6 +22,7 @@ import SwitchNativeComponent, {
|
|
|
22
22
|
Commands as SwitchCommands,
|
|
23
23
|
} from './SwitchNativeComponent';
|
|
24
24
|
import * as React from 'react';
|
|
25
|
+
import {useLayoutEffect, useRef, useState} from 'react';
|
|
25
26
|
|
|
26
27
|
export type SwitchPropsIOS = {
|
|
27
28
|
/**
|
|
@@ -179,13 +180,16 @@ const Switch: component(
|
|
|
179
180
|
const trackColorForFalse = trackColor?.false;
|
|
180
181
|
const trackColorForTrue = trackColor?.true;
|
|
181
182
|
|
|
182
|
-
const nativeSwitchRef =
|
|
183
|
+
const nativeSwitchRef = useRef<React.ElementRef<
|
|
183
184
|
typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent,
|
|
184
185
|
> | null>(null);
|
|
185
186
|
|
|
186
187
|
const ref = useMergeRefs(nativeSwitchRef, forwardedRef);
|
|
187
188
|
|
|
188
|
-
|
|
189
|
+
// We wrap the native state in an object to force the layout-effect
|
|
190
|
+
// below to re-run whenever we get an update from native, even if it's
|
|
191
|
+
// not different from the previous native state.
|
|
192
|
+
const [native, setNative] = useState({value: (null: ?boolean)});
|
|
189
193
|
|
|
190
194
|
const handleChange = (event: SwitchChangeEvent) => {
|
|
191
195
|
// $FlowFixMe[unused-promise]
|
|
@@ -195,7 +199,7 @@ const Switch: component(
|
|
|
195
199
|
setNative({value: event.nativeEvent.value});
|
|
196
200
|
};
|
|
197
201
|
|
|
198
|
-
|
|
202
|
+
useLayoutEffect(() => {
|
|
199
203
|
// This is necessary in case native updates the switch and JS decides
|
|
200
204
|
// that the update should be ignored and we should stick with the value
|
|
201
205
|
// that we have in JS.
|
|
@@ -514,6 +514,26 @@ export type TextInputAndroidProps = $ReadOnly<{
|
|
|
514
514
|
}>;
|
|
515
515
|
|
|
516
516
|
type TextInputBaseProps = $ReadOnly<{
|
|
517
|
+
/**
|
|
518
|
+
* When provided, the text input will only accept drag and drop events for the specified
|
|
519
|
+
* types. If null or not provided, the text input will accept all types of drag and drop events.
|
|
520
|
+
* An empty array will accept no drag and drop events.
|
|
521
|
+
* Defaults to null.
|
|
522
|
+
*
|
|
523
|
+
* On Android, types must correspond to MIME types from ClipData:
|
|
524
|
+
* https://developer.android.com/reference/android/content/ClipData
|
|
525
|
+
* (e.g. "text/plain" or "image/*")
|
|
526
|
+
*
|
|
527
|
+
* On iOS, types must correspond to UTIs:
|
|
528
|
+
* https://developer.apple.com/documentation/uniformtypeidentifiers
|
|
529
|
+
* (e.g. "public.plain-text" or "public.image")
|
|
530
|
+
*
|
|
531
|
+
* *NOTE*: This prop is experimental and its API may change in the future. Use at your own risk.
|
|
532
|
+
*
|
|
533
|
+
* @see https://developer.android.com/reference/android/content/ClipData for more information on MIME types
|
|
534
|
+
*/
|
|
535
|
+
experimental_acceptDragAndDropTypes?: ?$ReadOnlyArray<string>,
|
|
536
|
+
|
|
517
537
|
/**
|
|
518
538
|
* Can tell `TextInput` to automatically capitalize certain characters.
|
|
519
539
|
*
|
|
@@ -1005,6 +1025,11 @@ type TextInputBaseProps = $ReadOnly<{
|
|
|
1005
1025
|
* unwanted edits without flicker.
|
|
1006
1026
|
*/
|
|
1007
1027
|
value?: ?Stringish,
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Align the input text to the left, center, or right sides of the input field.
|
|
1031
|
+
*/
|
|
1032
|
+
textAlign?: ?('left' | 'center' | 'right'),
|
|
1008
1033
|
}>;
|
|
1009
1034
|
|
|
1010
1035
|
export type TextInputProps = $ReadOnly<{
|
|
@@ -540,6 +540,25 @@ export type TextInputWindowsProps = $ReadOnly<{|
|
|
|
540
540
|
// Windows]
|
|
541
541
|
|
|
542
542
|
type TextInputBaseProps = $ReadOnly<{
|
|
543
|
+
/**
|
|
544
|
+
* When provided, the text input will only accept drag and drop events for the specified
|
|
545
|
+
* types. If null or not provided, the text input will accept all types of drag and drop events.
|
|
546
|
+
* An empty array will accept no drag and drop events.
|
|
547
|
+
* Defaults to null.
|
|
548
|
+
*
|
|
549
|
+
* On Android, types must correspond to MIME types from ClipData:
|
|
550
|
+
* https://developer.android.com/reference/android/content/ClipData
|
|
551
|
+
* (e.g. "text/plain" or "image/*")
|
|
552
|
+
*
|
|
553
|
+
* On iOS, types must correspond to UTIs:
|
|
554
|
+
* https://developer.apple.com/documentation/uniformtypeidentifiers
|
|
555
|
+
* (e.g. "public.plain-text" or "public.image")
|
|
556
|
+
*
|
|
557
|
+
* *NOTE*: This prop is experimental and its API may change in the future. Use at your own risk.
|
|
558
|
+
*
|
|
559
|
+
* @see https://developer.android.com/reference/android/content/ClipData for more information on MIME types
|
|
560
|
+
*/
|
|
561
|
+
experimental_acceptDragAndDropTypes?: ?$ReadOnlyArray<string>,
|
|
543
562
|
/**
|
|
544
563
|
* String to be read by screenreaders to indicate an error state. The acceptable parameters
|
|
545
564
|
* of accessibilityErrorMessage is a string. Setting accessibilityInvalid to true activates
|
|
@@ -1039,10 +1058,15 @@ type TextInputBaseProps = $ReadOnly<{
|
|
|
1039
1058
|
* unwanted edits without flicker.
|
|
1040
1059
|
*/
|
|
1041
1060
|
value?: ?Stringish,
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Align the input text to the left, center, or right sides of the input field.
|
|
1064
|
+
*/
|
|
1065
|
+
textAlign?: ?('left' | 'center' | 'right'),
|
|
1042
1066
|
}>;
|
|
1043
1067
|
|
|
1044
1068
|
export type TextInputProps = $ReadOnly<{
|
|
1045
|
-
|
|
1069
|
+
...Omit<ViewProps, 'style'>,
|
|
1046
1070
|
...TextInputIOSProps,
|
|
1047
1071
|
...TextInputAndroidProps,
|
|
1048
1072
|
...TextInputBaseProps,
|
|
@@ -675,6 +675,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
675
675
|
ref={(ref: $FlowFixMe)}
|
|
676
676
|
{...otherProps}
|
|
677
677
|
{...eventHandlers}
|
|
678
|
+
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
|
678
679
|
accessibilityState={_accessibilityState}
|
|
679
680
|
accessible={accessible}
|
|
680
681
|
submitBehavior={submitBehavior}
|
|
@@ -741,6 +742,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
741
742
|
accessibilityState={_accessibilityState}
|
|
742
743
|
accessibilityLabelledBy={_accessibilityLabelledBy}
|
|
743
744
|
accessible={accessible}
|
|
745
|
+
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
|
744
746
|
autoCapitalize={autoCapitalize}
|
|
745
747
|
submitBehavior={submitBehavior}
|
|
746
748
|
caretHidden={caretHidden}
|
|
@@ -758,6 +758,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
758
758
|
ref={(ref: $FlowFixMe)}
|
|
759
759
|
{...otherProps}
|
|
760
760
|
{...eventHandlers}
|
|
761
|
+
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
|
761
762
|
accessibilityErrorMessage={accessibilityErrorMessage}
|
|
762
763
|
accessibilityState={_accessibilityState}
|
|
763
764
|
accessible={accessible}
|
|
@@ -826,6 +827,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
826
827
|
accessibilityState={_accessibilityState}
|
|
827
828
|
accessibilityLabelledBy={_accessibilityLabelledBy}
|
|
828
829
|
accessible={accessible}
|
|
830
|
+
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
|
829
831
|
autoCapitalize={autoCapitalize}
|
|
830
832
|
submitBehavior={submitBehavior}
|
|
831
833
|
caretHidden={caretHidden}
|
|
@@ -61,38 +61,35 @@ const View: component(
|
|
|
61
61
|
const _accessibilityLabelledBy =
|
|
62
62
|
ariaLabelledBy?.split(/\s*,\s*/g) ?? accessibilityLabelledBy;
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
if (
|
|
64
|
+
const _accessibilityState =
|
|
66
65
|
accessibilityState != null ||
|
|
67
66
|
ariaBusy != null ||
|
|
68
67
|
ariaChecked != null ||
|
|
69
68
|
ariaDisabled != null ||
|
|
70
69
|
ariaExpanded != null ||
|
|
71
70
|
ariaSelected != null
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (
|
|
71
|
+
? {
|
|
72
|
+
busy: ariaBusy ?? accessibilityState?.busy,
|
|
73
|
+
checked: ariaChecked ?? accessibilityState?.checked,
|
|
74
|
+
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
75
|
+
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
76
|
+
selected: ariaSelected ?? accessibilityState?.selected,
|
|
77
|
+
}
|
|
78
|
+
: undefined;
|
|
79
|
+
|
|
80
|
+
const _accessibilityValue =
|
|
83
81
|
accessibilityValue != null ||
|
|
84
82
|
ariaValueMax != null ||
|
|
85
83
|
ariaValueMin != null ||
|
|
86
84
|
ariaValueNow != null ||
|
|
87
85
|
ariaValueText != null
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
86
|
+
? {
|
|
87
|
+
max: ariaValueMax ?? accessibilityValue?.max,
|
|
88
|
+
min: ariaValueMin ?? accessibilityValue?.min,
|
|
89
|
+
now: ariaValueNow ?? accessibilityValue?.now,
|
|
90
|
+
text: ariaValueText ?? accessibilityValue?.text,
|
|
91
|
+
}
|
|
92
|
+
: undefined;
|
|
96
93
|
|
|
97
94
|
const actualView = (
|
|
98
95
|
<ViewNativeComponent
|
|
@@ -78,8 +78,7 @@ const View: component(
|
|
|
78
78
|
const _accessibilityLabelledBy =
|
|
79
79
|
ariaLabelledBy?.split(/\s*,\s*/g) ?? accessibilityLabelledBy;
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
if (
|
|
81
|
+
const _accessibilityState =
|
|
83
82
|
accessibilityState != null ||
|
|
84
83
|
ariaBusy != null ||
|
|
85
84
|
ariaChecked != null ||
|
|
@@ -88,33 +87,31 @@ const View: component(
|
|
|
88
87
|
ariaMultiselectable != null ||
|
|
89
88
|
ariaRequired != null ||
|
|
90
89
|
ariaSelected != null
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (
|
|
90
|
+
? {
|
|
91
|
+
busy: ariaBusy ?? accessibilityState?.busy,
|
|
92
|
+
checked: ariaChecked ?? accessibilityState?.checked,
|
|
93
|
+
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
94
|
+
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
95
|
+
multiselectable:
|
|
96
|
+
ariaMultiselectable ?? accessibilityState?.multiselectable, // Win32
|
|
97
|
+
required: ariaRequired ?? accessibilityState?.required, // Win32
|
|
98
|
+
selected: ariaSelected ?? accessibilityState?.selected,
|
|
99
|
+
}
|
|
100
|
+
: undefined;
|
|
101
|
+
|
|
102
|
+
const _accessibilityValue =
|
|
105
103
|
accessibilityValue != null ||
|
|
106
104
|
ariaValueMax != null ||
|
|
107
105
|
ariaValueMin != null ||
|
|
108
106
|
ariaValueNow != null ||
|
|
109
107
|
ariaValueText != null
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
108
|
+
? {
|
|
109
|
+
max: ariaValueMax ?? accessibilityValue?.max,
|
|
110
|
+
min: ariaValueMin ?? accessibilityValue?.min,
|
|
111
|
+
now: ariaValueNow ?? accessibilityValue?.now,
|
|
112
|
+
text: ariaValueText ?? accessibilityValue?.text,
|
|
113
|
+
}
|
|
114
|
+
: undefined;
|
|
118
115
|
|
|
119
116
|
const _keyDown = (event: KeyEvent) => {
|
|
120
117
|
if (otherProps.keyDownEvents && event.isPropagationStopped() !== true) {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import type {Domain} from '../../src/private/
|
|
14
|
-
import type {Spec as NativeReactDevToolsRuntimeSettingsModuleSpec} from '../../src/private/
|
|
13
|
+
import type {Domain} from '../../src/private/devsupport/rndevtools/setUpFuseboxReactDevToolsDispatcher';
|
|
14
|
+
import type {Spec as NativeReactDevToolsRuntimeSettingsModuleSpec} from '../../src/private/devsupport/rndevtools/specs/NativeReactDevToolsRuntimeSettingsModule';
|
|
15
15
|
|
|
16
16
|
if (__DEV__) {
|
|
17
17
|
if (typeof global.queueMicrotask !== 'function') {
|
|
@@ -31,18 +31,18 @@ if (__DEV__) {
|
|
|
31
31
|
|
|
32
32
|
if (__DEV__) {
|
|
33
33
|
// Register dispatcher on global, which can be used later by Chrome DevTools frontend
|
|
34
|
-
require('../../src/private/
|
|
34
|
+
require('../../src/private/devsupport/rndevtools/setUpFuseboxReactDevToolsDispatcher');
|
|
35
35
|
const {
|
|
36
36
|
initialize,
|
|
37
37
|
connectToDevTools,
|
|
38
38
|
connectWithCustomMessagingProtocol,
|
|
39
39
|
} = require('react-devtools-core');
|
|
40
40
|
|
|
41
|
-
const reactDevToolsSettingsManager = require('../../src/private/
|
|
41
|
+
const reactDevToolsSettingsManager = require('../../src/private/devsupport/rndevtools/ReactDevToolsSettingsManager');
|
|
42
42
|
const serializedHookSettings =
|
|
43
43
|
reactDevToolsSettingsManager.getGlobalHookSettings();
|
|
44
44
|
const maybeReactDevToolsRuntimeSettingsModuleModule =
|
|
45
|
-
require('../../src/private/
|
|
45
|
+
require('../../src/private/devsupport/rndevtools/specs/NativeReactDevToolsRuntimeSettingsModule').default;
|
|
46
46
|
|
|
47
47
|
let hookSettings = null;
|
|
48
48
|
if (serializedHookSettings != null) {
|
|
@@ -21,10 +21,9 @@ import type {
|
|
|
21
21
|
LayoutChangeEvent,
|
|
22
22
|
NativeSyntheticEvent,
|
|
23
23
|
} from '../Types/CoreEventTypes';
|
|
24
|
-
import type {ImageType} from './ImageTypes.flow';
|
|
25
24
|
import type {ImageResizeMode} from './ImageResizeMode';
|
|
26
25
|
import type {ImageSource, ImageURISource} from './ImageSource';
|
|
27
|
-
import type {
|
|
26
|
+
import type {ImageType} from './ImageTypes.flow';
|
|
28
27
|
|
|
29
28
|
import * as React from 'react';
|
|
30
29
|
|
|
@@ -368,5 +367,5 @@ export type ImageBackgroundProps = $ReadOnly<{
|
|
|
368
367
|
*
|
|
369
368
|
* See https://reactnative.dev/docs/imagebackground#imageref
|
|
370
369
|
*/
|
|
371
|
-
imageRef?: RefSetter<ElementRef<ImageType>>,
|
|
370
|
+
imageRef?: React.RefSetter<React.ElementRef<ImageType>>,
|
|
372
371
|
}>;
|
|
@@ -52,14 +52,14 @@ export function getImageSourcesFromImageProps(
|
|
|
52
52
|
// 1x scale is provided in `srcSet` prop so ignore the `src` prop if provided.
|
|
53
53
|
shouldUseSrcForDefaultScale =
|
|
54
54
|
scale === 1 ? false : shouldUseSrcForDefaultScale;
|
|
55
|
-
sourceList.push({headers
|
|
55
|
+
sourceList.push({headers, scale, uri, width, height});
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
if (shouldUseSrcForDefaultScale && src != null) {
|
|
61
61
|
sourceList.push({
|
|
62
|
-
headers
|
|
62
|
+
headers,
|
|
63
63
|
scale: 1,
|
|
64
64
|
uri: src,
|
|
65
65
|
width,
|
|
@@ -73,6 +73,8 @@ export function getImageSourcesFromImageProps(
|
|
|
73
73
|
sources = sourceList;
|
|
74
74
|
} else if (src != null) {
|
|
75
75
|
sources = [{uri: src, headers: headers, width, height}];
|
|
76
|
+
} else if (source != null && source.uri && Object.keys(headers).length > 0) {
|
|
77
|
+
sources = [{...source, headers}];
|
|
76
78
|
} else {
|
|
77
79
|
sources = source;
|
|
78
80
|
}
|
|
@@ -228,8 +228,8 @@ export abstract class FlatListComponent<
|
|
|
228
228
|
* Provides a reference to the underlying host component
|
|
229
229
|
*/
|
|
230
230
|
getNativeScrollRef: () =>
|
|
231
|
-
| React.
|
|
232
|
-
| React.
|
|
231
|
+
| React.ComponentRef<typeof View>
|
|
232
|
+
| React.ComponentRef<typeof ScrollViewComponent>
|
|
233
233
|
| null
|
|
234
234
|
| undefined;
|
|
235
235
|
|
|
@@ -17,7 +17,6 @@ import type {
|
|
|
17
17
|
SectionData,
|
|
18
18
|
VirtualizedSectionListProps,
|
|
19
19
|
} from '@react-native/virtualized-lists';
|
|
20
|
-
import type {ElementRef} from 'react';
|
|
21
20
|
|
|
22
21
|
import Platform from '../Utilities/Platform';
|
|
23
22
|
import VirtualizedLists from '@react-native/virtualized-lists';
|
|
@@ -175,7 +174,7 @@ const SectionList: component(
|
|
|
175
174
|
...props,
|
|
176
175
|
};
|
|
177
176
|
|
|
178
|
-
const wrapperRef = useRef<?ElementRef<typeof VirtualizedSectionList>>();
|
|
177
|
+
const wrapperRef = useRef<?React.ElementRef<typeof VirtualizedSectionList>>();
|
|
179
178
|
|
|
180
179
|
useImperativeHandle(
|
|
181
180
|
ref,
|
|
@@ -18,7 +18,7 @@ import type {
|
|
|
18
18
|
Message,
|
|
19
19
|
} from './parseLogBoxLog';
|
|
20
20
|
|
|
21
|
-
import DebuggerSessionObserver from '../../../src/private/
|
|
21
|
+
import DebuggerSessionObserver from '../../../src/private/devsupport/rndevtools/FuseboxSessionObserver';
|
|
22
22
|
import parseErrorStack from '../../Core/Devtools/parseErrorStack';
|
|
23
23
|
import NativeDevSettings from '../../NativeModules/specs/NativeDevSettings';
|
|
24
24
|
import NativeLogBox from '../../NativeModules/specs/NativeLogBox';
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
export * from '../../../src/private/
|
|
12
|
-
import NativeDevMenu from '../../../src/private/
|
|
11
|
+
export * from '../../../src/private/devsupport/devmenu/specs/NativeDevMenu';
|
|
12
|
+
import NativeDevMenu from '../../../src/private/devsupport/devmenu/specs/NativeDevMenu';
|
|
13
13
|
export default NativeDevMenu;
|
|
@@ -53,7 +53,8 @@ const InspectorDeferred = ({
|
|
|
53
53
|
}: InspectorDeferredProps) => {
|
|
54
54
|
// D39382967 adds a require cycle: InitializeCore -> AppContainer -> Inspector -> InspectorPanel -> ScrollView -> InitializeCore
|
|
55
55
|
// We can't remove it yet, fallback to dynamic require for now. This is the only reason why this logic is in a separate function.
|
|
56
|
-
const Inspector =
|
|
56
|
+
const Inspector =
|
|
57
|
+
require('../../src/private/devsupport/devmenu/elementinspector/Inspector').default;
|
|
57
58
|
|
|
58
59
|
return (
|
|
59
60
|
<Inspector
|
|
@@ -74,7 +75,7 @@ const ReactDevToolsOverlayDeferred = ({
|
|
|
74
75
|
reactDevToolsAgent,
|
|
75
76
|
}: ReactDevToolsOverlayDeferredProps) => {
|
|
76
77
|
const ReactDevToolsOverlay =
|
|
77
|
-
require('../../src/private/
|
|
78
|
+
require('../../src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay').default;
|
|
78
79
|
|
|
79
80
|
return (
|
|
80
81
|
<ReactDevToolsOverlay
|
|
@@ -13,7 +13,6 @@ import type {
|
|
|
13
13
|
InternalInstanceHandle,
|
|
14
14
|
Node,
|
|
15
15
|
} from '../Renderer/shims/ReactNativeTypes';
|
|
16
|
-
import type {ElementRef, ElementType} from 'react';
|
|
17
16
|
|
|
18
17
|
import {
|
|
19
18
|
onCaughtError,
|
|
@@ -21,6 +20,8 @@ import {
|
|
|
21
20
|
onUncaughtError,
|
|
22
21
|
} from '../../src/private/renderer/errorhandling/ErrorHandlers';
|
|
23
22
|
import {type RootTag} from './RootTag';
|
|
23
|
+
import * as React from 'react';
|
|
24
|
+
|
|
24
25
|
export function renderElement({
|
|
25
26
|
element,
|
|
26
27
|
rootTag,
|
|
@@ -58,9 +59,9 @@ export function renderElement({
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
export function findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
62
|
+
export function findHostInstance_DEPRECATED<TElementType: React.ElementType>(
|
|
62
63
|
// $FlowFixMe[incompatible-call]
|
|
63
|
-
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
64
|
+
componentOrHandle: ?(React.ElementRef<TElementType> | number),
|
|
64
65
|
): ?HostInstance {
|
|
65
66
|
return require('../Renderer/shims/ReactNative').default.findHostInstance_DEPRECATED(
|
|
66
67
|
// $FlowFixMe[incompatible-call]
|
|
@@ -68,9 +69,9 @@ export function findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
export function findNodeHandle<TElementType: ElementType>(
|
|
72
|
+
export function findNodeHandle<TElementType: React.ElementType>(
|
|
72
73
|
// $FlowFixMe[incompatible-call]
|
|
73
|
-
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
74
|
+
componentOrHandle: ?(React.ElementRef<TElementType> | number),
|
|
74
75
|
): ?number {
|
|
75
76
|
return require('../Renderer/shims/ReactNative').default.findNodeHandle(
|
|
76
77
|
// $FlowFixMe[incompatible-call]
|