@office-iss/react-native-win32 0.0.0-canary.292 → 0.0.0-canary.294
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 +8 -1
- package/CHANGELOG.json +58 -1
- package/CHANGELOG.md +22 -4
- package/IntegrationTests/ImageCachePolicyTest.js +1 -1
- package/IntegrationTests/LayoutEventsTest.js +1 -4
- package/Libraries/Animated/AnimatedExports.js.flow +126 -0
- package/Libraries/Animated/AnimatedImplementation.js +0 -121
- package/Libraries/Animated/animations/Animation.js +8 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
- package/Libraries/Animated/nodes/AnimatedValue.js +8 -4
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Blob/BlobManager.js +1 -0
- 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 +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +1 -0
- 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 +3 -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/Components/View/ViewAccessibility.js +16 -0
- 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/NativeComponent/BaseViewConfig.android.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +1 -0
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +3 -2
- package/Libraries/ReactNative/FabricUIManager.js +10 -0
- package/Libraries/ReactNative/RendererImplementation.js +6 -5
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
- package/Libraries/ReactNative/renderApplication.js +9 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -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/Settings/Settings.ios.js +1 -0
- 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 +14 -14
- package/package.json +20 -20
- 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 +48 -18
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +11 -5
- package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
- package/src/private/types/HostInstance.js +2 -2
- package/src/private/webapis/performance/PerformanceEntry.js +6 -1
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
- package/types/index.d.ts +1 -2
- 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/NewAppScreen/components/Colors.js +0 -19
- package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -39
- package/Libraries/NewAppScreen/components/Header.js +0 -75
- package/Libraries/NewAppScreen/components/HermesBadge.js +0 -51
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -146
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -37
- package/Libraries/NewAppScreen/components/logo.png +0 -0
- package/Libraries/NewAppScreen/index.js +0 -25
- 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/types/modules/LaunchScreen.d.ts +0 -26
- /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
- /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
|
@@ -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,
|
|
@@ -446,6 +446,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
446
446
|
*/
|
|
447
447
|
if (instance != null) {
|
|
448
448
|
// $FlowFixMe[prop-missing] - See the explanation above.
|
|
449
|
+
// $FlowFixMe[unsafe-object-assign]
|
|
449
450
|
Object.assign(instance, {
|
|
450
451
|
clear(): void {
|
|
451
452
|
if (inputRef.current != null) {
|
|
@@ -675,6 +676,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
675
676
|
ref={(ref: $FlowFixMe)}
|
|
676
677
|
{...otherProps}
|
|
677
678
|
{...eventHandlers}
|
|
679
|
+
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
|
678
680
|
accessibilityState={_accessibilityState}
|
|
679
681
|
accessible={accessible}
|
|
680
682
|
submitBehavior={submitBehavior}
|
|
@@ -741,6 +743,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
741
743
|
accessibilityState={_accessibilityState}
|
|
742
744
|
accessibilityLabelledBy={_accessibilityLabelledBy}
|
|
743
745
|
accessible={accessible}
|
|
746
|
+
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
|
744
747
|
autoCapitalize={autoCapitalize}
|
|
745
748
|
submitBehavior={submitBehavior}
|
|
746
749
|
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) {
|
|
@@ -258,6 +258,14 @@ export type AccessibilityPropsAndroid = $ReadOnly<{
|
|
|
258
258
|
* See https://reactnative.dev/docs/view#importantforaccessibility
|
|
259
259
|
*/
|
|
260
260
|
importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'),
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Enables the view to be screen reader focusable, not keyboard focusable. This has lower priority
|
|
264
|
+
* than focusable or accessible props.
|
|
265
|
+
*
|
|
266
|
+
* @platform android
|
|
267
|
+
*/
|
|
268
|
+
screenReaderFocusable?: boolean,
|
|
261
269
|
}>;
|
|
262
270
|
|
|
263
271
|
export type AccessibilityPropsIOS = $ReadOnly<{
|
|
@@ -320,6 +328,14 @@ export type AccessibilityPropsIOS = $ReadOnly<{
|
|
|
320
328
|
* @platform ios
|
|
321
329
|
*/
|
|
322
330
|
accessibilityLanguage?: ?Stringish,
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Blocks the user from interacting with the component through keyboard while still allowing
|
|
334
|
+
* screen reader to interact with it if this View is still accessible.
|
|
335
|
+
*
|
|
336
|
+
* @platform ios
|
|
337
|
+
*/
|
|
338
|
+
accessibilityRespondsToUserInteraction?: ?boolean,
|
|
323
339
|
}>;
|
|
324
340
|
|
|
325
341
|
export type AccessibilityProps = $ReadOnly<{
|
|
@@ -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';
|
|
@@ -198,6 +198,7 @@ const validAttributesForNonEventProps = {
|
|
|
198
198
|
accessibilityShowsLargeContentViewer: true,
|
|
199
199
|
accessibilityLargeContentTitle: true,
|
|
200
200
|
experimental_accessibilityOrder: true,
|
|
201
|
+
accessibilityRespondsToUserInteraction: true,
|
|
201
202
|
testID: true,
|
|
202
203
|
backgroundColor: {process: require('../StyleSheet/processColor').default},
|
|
203
204
|
backfaceVisibility: true,
|
|
@@ -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
|
|
@@ -92,6 +92,11 @@ export interface Spec {
|
|
|
92
92
|
/* width: */ number,
|
|
93
93
|
/* height: */ number,
|
|
94
94
|
];
|
|
95
|
+
+unstable_DefaultEventPriority: number;
|
|
96
|
+
+unstable_DiscreteEventPriority: number;
|
|
97
|
+
+unstable_ContinuousEventPriority: number;
|
|
98
|
+
+unstable_IdleEventPriority: number;
|
|
99
|
+
+unstable_getCurrentEventPriority: () => number;
|
|
95
100
|
}
|
|
96
101
|
|
|
97
102
|
let nativeFabricUIManagerProxy: ?Spec;
|
|
@@ -119,6 +124,11 @@ const CACHED_PROPERTIES = [
|
|
|
119
124
|
'dispatchCommand',
|
|
120
125
|
'compareDocumentPosition',
|
|
121
126
|
'getBoundingClientRect',
|
|
127
|
+
'unstable_DefaultEventPriority',
|
|
128
|
+
'unstable_DiscreteEventPriority',
|
|
129
|
+
'unstable_ContinuousEventPriority',
|
|
130
|
+
'unstable_IdleEventPriority',
|
|
131
|
+
'unstable_getCurrentEventPriority',
|
|
122
132
|
];
|
|
123
133
|
|
|
124
134
|
// This is exposed as a getter because apps using the legacy renderer AND
|
|
@@ -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]
|
|
@@ -90,6 +90,7 @@ function getNativeComponentAttributes(uiViewClassName: string): any {
|
|
|
90
90
|
// top-level props on the native side.
|
|
91
91
|
validAttributes.style = ReactNativeStyleAttributes;
|
|
92
92
|
|
|
93
|
+
// $FlowFixMe[unsafe-object-assign]
|
|
93
94
|
Object.assign(viewConfig, {
|
|
94
95
|
uiViewClassName,
|
|
95
96
|
validAttributes,
|
|
@@ -13,6 +13,7 @@ import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
|
|
|
13
13
|
|
|
14
14
|
import GlobalPerformanceLogger from '../Utilities/GlobalPerformanceLogger';
|
|
15
15
|
import PerformanceLoggerContext from '../Utilities/PerformanceLoggerContext';
|
|
16
|
+
import warnOnce from '../Utilities/warnOnce';
|
|
16
17
|
import AppContainer from './AppContainer';
|
|
17
18
|
import DisplayMode, {type DisplayModeType} from './DisplayMode';
|
|
18
19
|
import getCachedComponentWithDebugName from './getCachedComponentWithDebugName';
|
|
@@ -104,5 +105,13 @@ export default function renderApplication<Props: Object>(
|
|
|
104
105
|
useFabric: Boolean(fabric),
|
|
105
106
|
useConcurrentRoot,
|
|
106
107
|
});
|
|
108
|
+
|
|
109
|
+
const newArchitecture = !!fabric;
|
|
110
|
+
if (!newArchitecture) {
|
|
111
|
+
warnOnce(
|
|
112
|
+
'[OSS][OldArchDeprecatedWarning]',
|
|
113
|
+
'The app is running using the Legacy Architecture. The Legacy Architecture is deprecated and will be removed in a future version of React Native. Please consider migrating to the New Architecture. For more information, please see https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-here',
|
|
114
|
+
);
|
|
115
|
+
}
|
|
107
116
|
performanceLogger.stopTimespan('renderApplication_React_render');
|
|
108
117
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 strict-local
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import typeof {createPublicTextInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
12
|
+
|
|
13
|
+
export type {
|
|
14
|
+
HostInstance as PublicInstance,
|
|
15
|
+
|
|
16
|
+
// These types are only necessary for Paper
|
|
17
|
+
NativeMethods as LegacyPublicInstance,
|
|
18
|
+
MeasureOnSuccessCallback,
|
|
19
|
+
MeasureInWindowOnSuccessCallback,
|
|
20
|
+
MeasureLayoutOnSuccessCallback,
|
|
21
|
+
} from '../../src/private/types/HostInstance';
|
|
22
|
+
|
|
23
|
+
export type {PublicRootInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
24
|
+
export type PublicTextInstance = ReturnType<createPublicTextInstance>;
|
|
25
|
+
|
|
26
|
+
export {default as BatchedBridge} from '../BatchedBridge/BatchedBridge';
|
|
27
|
+
export {default as ExceptionsManager} from '../Core/ExceptionsManager';
|
|
28
|
+
export {default as Platform} from '../Utilities/Platform';
|
|
29
|
+
export {default as RCTEventEmitter} from '../EventEmitter/RCTEventEmitter';
|
|
30
|
+
export * as ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';
|
|
31
|
+
export {default as TextInputState} from '../Components/TextInput/TextInputState';
|
|
32
|
+
export {default as UIManager} from '../ReactNative/UIManager';
|
|
33
|
+
export {default as deepDiffer} from '../Utilities/differ/deepDiffer';
|
|
34
|
+
export {default as deepFreezeAndThrowOnMutationInDev} from '../Utilities/deepFreezeAndThrowOnMutationInDev';
|
|
35
|
+
export {default as flattenStyle} from '../StyleSheet/flattenStyle';
|
|
36
|
+
export {default as ReactFiberErrorDialog} from '../Core/ReactFiberErrorDialog';
|
|
37
|
+
export {default as legacySendAccessibilityEvent} from '../Components/AccessibilityInfo/legacySendAccessibilityEvent';
|
|
38
|
+
export {default as RawEventEmitter} from '../Core/RawEventEmitter';
|
|
39
|
+
export {default as CustomEvent} from '../../src/private/webapis/dom/events/CustomEvent';
|
|
40
|
+
export {
|
|
41
|
+
create as createAttributePayload,
|
|
42
|
+
diff as diffAttributePayloads,
|
|
43
|
+
} from '../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload';
|
|
44
|
+
export {
|
|
45
|
+
createPublicRootInstance,
|
|
46
|
+
createPublicInstance,
|
|
47
|
+
createPublicTextInstance,
|
|
48
|
+
getNativeTagFromPublicInstance,
|
|
49
|
+
getNodeFromPublicInstance,
|
|
50
|
+
getInternalInstanceHandleFromPublicInstance,
|
|
51
|
+
} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|