react-native 0.89.0-rc.0 → 0.90.0-nightly-20261106-cd45f309e
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/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedExports.js +6 -10
- package/Libraries/Animated/AnimatedExports.js.flow +6 -0
- package/Libraries/Animated/createAnimatedComponent.js +3 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
- package/Libraries/Animated/nodes/AnimatedProps.js +3 -0
- package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
- package/Libraries/AppState/AppState.js +2 -2
- package/Libraries/BatchedBridge/MessageQueue.js +11 -11
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
- package/Libraries/Components/Keyboard/Keyboard.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +6 -4
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +1 -1
- package/Libraries/Components/Switch/Switch.js +26 -34
- package/Libraries/Components/TextInput/TextInput.js +2 -2
- package/Libraries/Components/Touchable/TouchableHighlight.js +35 -8
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +6 -0
- package/Libraries/Core/Devtools/loadBundleFromServer.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +2 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/registerCallableModule.js +1 -1
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +3 -3
- package/Libraries/Image/ImageInjection.js +4 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/LogBox.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +1 -1
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Pressability/Pressability.js +2 -2
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +3 -2
- package/Libraries/StyleSheet/processBackgroundImage.js +16 -10
- package/Libraries/StyleSheet/processTransform.js +1 -1
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/ReactDevToolsTypes.js +3 -3
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Utilities/RCTLog.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +2 -2
- package/Libraries/Utilities/logError.js +1 -0
- package/Libraries/Utilities/stringifySafe.js +2 -2
- package/Libraries/WebSocket/WebSocket.js +3 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +16 -7
- package/Libraries/vendor/core/ErrorUtils.js +4 -2
- package/React/Base/RCTVersion.m +2 -2
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/Props.h +7 -7
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +1 -0
- package/React/Fabric/Utils/RCTGradientUtils.h +4 -0
- package/React/Fabric/Utils/RCTGradientUtils.mm +78 -2
- package/React/Fabric/Utils/RCTLinearGradient.mm +3 -2
- package/React/Fabric/Utils/RCTRadialGradient.mm +9 -2
- package/React/Tests/Fabric/RCTGradientUtilsTests.mm +261 -0
- package/React/Tests/Text/RCTAttributedTextUtilsTest.mm +71 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/ColorStop.kt +97 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/LinearGradient.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/RadialGradient.kt +11 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/PreparedLayoutTextView.kt +15 -21
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +18 -4
- package/ReactAndroid/src/main/jni/react/jni/InspectorNetworkRequestListener.cpp +1 -0
- package/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp +1 -0
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.h +1 -0
- package/ReactCommon/jsinspector-modern/RuntimeTargetNetwork.cpp +22 -3
- package/ReactCommon/jsinspector-modern/network/CdpNetwork.h +1 -0
- package/ReactCommon/jsinspector-modern/network/NetworkHandler.h +1 -0
- package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +69 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +2 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +1 -5
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +4 -4
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputShadowNode.h +3 -1
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +7 -0
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +1 -0
- package/ReactCommon/react/renderer/mounting/tests/MountingCoordinatorTest.cpp +94 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +7 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +15 -3
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +22 -5
- package/ReactCommon/react/renderer/uimanager/primitives.h +1 -1
- package/ReactCommon/react/utils/ReactNativeVersion.h +3 -3
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +38 -3
- package/ReactCommon/yoga/yoga/style/StyleValueHandle.h +0 -4
- package/ReactCommon/yoga/yoga/style/StyleValuePool.h +14 -3
- package/flow/HermesInternalType.js +2 -2
- package/flow/dom.js.flow +2 -2
- package/index.js +36 -9
- package/index.js.flow +6 -2
- package/package.json +8 -8
- package/scripts/cocoapods/autolinking.rb +1 -0
- package/scripts/cocoapods/utils.rb +18 -0
- package/scripts/react_native_pods.rb +3 -0
- package/scripts/setup-apple-spm.js +228 -180
- package/scripts/spm/generate-spm-xcodeproj.js +39 -3
- package/scripts/spm/read-podspec.js +1 -0
- package/scripts/spm/spm-types.js +9 -3
- package/src/private/animated/NativeAnimatedHelper.js +1 -1
- package/src/private/animated/createAnimatedPropsMemoHook.js +1 -1
- package/src/private/components/virtualcollection/VirtualCollectionView.js +6 -6
- package/src/private/components/virtualcollection/column/VirtualColumn.js +1 -1
- package/src/private/components/virtualcollection/row/VirtualRow.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +1 -1
- package/src/private/devsupport/rndevtools/setUpFuseboxReactDevToolsDispatcher.js +3 -3
- package/src/private/featureflags/ReactNativeFeatureFlags.js +2 -2
- package/src/private/renderer/events/ResponderTouchHistoryStore.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +1 -1
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +1 -1
- package/src/private/webapis/geometry/DOMRectReadOnly.js +1 -1
- package/src/private/webapis/webidl/PlatformObjects.js +3 -3
- package/types_DEPRECATED/Libraries/Animated/Animated.d.ts +42 -28
- package/types_DEPRECATED/index.d.ts +0 -1
- package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +2 -2
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +7 -1
- package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +2 -2
- package/types_generated/Libraries/AppState/AppState.d.ts +2 -2
- package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +2 -2
- package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +2 -2
- package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +2 -2
- package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +2 -2
- package/types_generated/Libraries/Core/registerCallableModule.d.ts +2 -2
- package/types_generated/Libraries/Linking/Linking.d.ts +2 -2
- package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +2 -2
- package/types_generated/Libraries/LogBox/LogBox.d.ts +2 -2
- package/types_generated/Libraries/Network/RCTNetworking.d.ts +2 -2
- package/types_generated/Libraries/Types/CodegenTypes.d.ts +2 -2
- package/types_generated/Libraries/vendor/core/ErrorUtils.d.ts +3 -3
- package/types_generated/index.d.ts +7 -2
- package/types_generated/src/private/components/virtualcollection/VirtualCollectionView.d.ts +2 -2
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumn.d.ts +2 -2
- package/types_generated/src/private/components/virtualcollection/row/VirtualRow.d.ts +2 -2
- package/sdks/.hermesv1version +0 -1
- package/types_DEPRECATED/Libraries/Components/Clipboard/Clipboard.d.ts +0 -28
- package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +0 -43
|
@@ -23,7 +23,7 @@ import invariant from 'invariant';
|
|
|
23
23
|
export type Mapping =
|
|
24
24
|
{[key: string]: Mapping, ...} | AnimatedValue | AnimatedValueXY;
|
|
25
25
|
export type EventConfig<T> = {
|
|
26
|
-
listener?: ?(NativeSyntheticEvent<T>) => unknown,
|
|
26
|
+
listener?: ?(v: NativeSyntheticEvent<T>) => unknown,
|
|
27
27
|
useNativeDriver: boolean,
|
|
28
28
|
platformConfig?: PlatformConfig,
|
|
29
29
|
};
|
|
@@ -27,41 +27,37 @@ const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
|
|
|
27
27
|
|
|
28
28
|
export default {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* @deprecated Use `AnimatedFlatList` instead.
|
|
31
31
|
*/
|
|
32
32
|
get FlatList(): AnimatedFlatList<> {
|
|
33
33
|
return require('./components/AnimatedFlatList').default;
|
|
34
34
|
},
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* props and style.
|
|
36
|
+
* @deprecated Use `AnimatedImage` instead.
|
|
38
37
|
*/
|
|
39
38
|
get Image(): AnimatedImage {
|
|
40
39
|
return require('./components/AnimatedImage').default;
|
|
41
40
|
},
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
44
|
-
* props and style.
|
|
42
|
+
* @deprecated Use `AnimatedScrollView` instead.
|
|
45
43
|
*/
|
|
46
44
|
get ScrollView(): AnimatedScrollView {
|
|
47
45
|
return require('./components/AnimatedScrollView').default;
|
|
48
46
|
},
|
|
49
47
|
/**
|
|
50
|
-
*
|
|
48
|
+
* @deprecated Use `AnimatedSectionList` instead.
|
|
51
49
|
*/
|
|
52
50
|
get SectionList(): AnimatedSectionList<> {
|
|
53
51
|
return require('./components/AnimatedSectionList').default;
|
|
54
52
|
},
|
|
55
53
|
/**
|
|
56
|
-
*
|
|
57
|
-
* props and style.
|
|
54
|
+
* @deprecated Use `AnimatedText` instead.
|
|
58
55
|
*/
|
|
59
56
|
get Text(): AnimatedText {
|
|
60
57
|
return require('./components/AnimatedText').default;
|
|
61
58
|
},
|
|
62
59
|
/**
|
|
63
|
-
*
|
|
64
|
-
* props and style.
|
|
60
|
+
* @deprecated Use `AnimatedView` instead.
|
|
65
61
|
*/
|
|
66
62
|
get View(): AnimatedView {
|
|
67
63
|
return require('./components/AnimatedView').default;
|
|
@@ -15,11 +15,17 @@ export type {DecayAnimationConfig} from './animations/DecayAnimation';
|
|
|
15
15
|
export type {SpringAnimationConfig} from './animations/SpringAnimation';
|
|
16
16
|
export type {TimingAnimationConfig} from './animations/TimingAnimation';
|
|
17
17
|
|
|
18
|
+
/** @deprecated Use `AnimatedFlatList` instead. */
|
|
18
19
|
export {default as FlatList} from './components/AnimatedFlatList';
|
|
20
|
+
/** @deprecated Use `AnimatedImage` instead. */
|
|
19
21
|
export {default as Image} from './components/AnimatedImage';
|
|
22
|
+
/** @deprecated Use `AnimatedScrollView` instead. */
|
|
20
23
|
export {default as ScrollView} from './components/AnimatedScrollView';
|
|
24
|
+
/** @deprecated Use `AnimatedSectionList` instead. */
|
|
21
25
|
export {default as SectionList} from './components/AnimatedSectionList';
|
|
26
|
+
/** @deprecated Use `AnimatedText` instead. */
|
|
22
27
|
export {default as Text} from './components/AnimatedText';
|
|
28
|
+
/** @deprecated Use `AnimatedView` instead. */
|
|
23
29
|
export {default as View} from './components/AnimatedView';
|
|
24
30
|
export {default as Color} from './nodes/AnimatedColor';
|
|
25
31
|
export {AnimatedEvent as Event} from './AnimatedEvent';
|
|
@@ -29,7 +29,9 @@ import {useMemo} from 'react';
|
|
|
29
29
|
|
|
30
30
|
type Nullable = void | null;
|
|
31
31
|
type Primitive = string | number | boolean | symbol | void;
|
|
32
|
-
type Builtin = (
|
|
32
|
+
type Builtin = (
|
|
33
|
+
...rest: ReadonlyArray<empty>
|
|
34
|
+
) => unknown | Date | Error | RegExp;
|
|
33
35
|
type ComponentProps<T> =
|
|
34
36
|
T extends React.ComponentType<infer Props> ? Props : empty;
|
|
35
37
|
|
|
@@ -469,7 +469,7 @@ export default class AnimatedInterpolation<
|
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
|
|
472
|
-
_getInterpolation(): number => OutputT {
|
|
472
|
+
_getInterpolation(): (v: number) => OutputT {
|
|
473
473
|
if (!this._interpolation) {
|
|
474
474
|
const config = this._config;
|
|
475
475
|
if (config.outputRange && typeof config.outputRange[0] === 'string') {
|
|
@@ -268,6 +268,9 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
268
268
|
if (this._target?.instance === instance) {
|
|
269
269
|
return;
|
|
270
270
|
}
|
|
271
|
+
if (this.__isNative && this._target != null) {
|
|
272
|
+
this.#disconnectAnimatedView(this._target);
|
|
273
|
+
}
|
|
271
274
|
const target = (this._target = {instance, connectedViewTag: null});
|
|
272
275
|
if (this.__isNative) {
|
|
273
276
|
this.#connectAnimatedView(target);
|
|
@@ -176,7 +176,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
176
176
|
|
|
177
177
|
function mapTransforms<T>(
|
|
178
178
|
transforms: ReadonlyArray<Transform<>>,
|
|
179
|
-
mapFunction: AnimatedNode => T,
|
|
179
|
+
mapFunction: (v: AnimatedNode) => T,
|
|
180
180
|
): ReadonlyArray<Transform<T>> {
|
|
181
181
|
return transforms.map(transform => {
|
|
182
182
|
const result: Transform<T> = {};
|
|
@@ -123,7 +123,7 @@ class AppStateImpl {
|
|
|
123
123
|
*/
|
|
124
124
|
addEventListener<K extends AppStateEvent>(
|
|
125
125
|
type: K,
|
|
126
|
-
handler: (...AppStateEventDefinitions[K]) => void,
|
|
126
|
+
handler: (...rest: AppStateEventDefinitions[K]) => void,
|
|
127
127
|
): EventSubscription {
|
|
128
128
|
const emitter = this._emitter;
|
|
129
129
|
if (emitter == null) {
|
|
@@ -132,7 +132,7 @@ class AppStateImpl {
|
|
|
132
132
|
switch (type) {
|
|
133
133
|
case 'change':
|
|
134
134
|
// $FlowFixMe[invalid-tuple-arity] Flow cannot refine handler based on the event type
|
|
135
|
-
const changeHandler: AppStateStatus => void = handler;
|
|
135
|
+
const changeHandler: (v: AppStateStatus) => void = handler;
|
|
136
136
|
return emitter.addListener('appStateDidChange', appStateData => {
|
|
137
137
|
changeHandler(appStateData.app_state);
|
|
138
138
|
});
|
|
@@ -41,10 +41,10 @@ const TRACE_TAG_REACT = 1 << 13;
|
|
|
41
41
|
const DEBUG_INFO_LIMIT = 32;
|
|
42
42
|
|
|
43
43
|
class MessageQueue {
|
|
44
|
-
_lazyCallableModules: {[key: string]: (void) => {...}, ...};
|
|
44
|
+
_lazyCallableModules: {[key: string]: (v: void) => {...}, ...};
|
|
45
45
|
_queue: [number[], number[], unknown[], number];
|
|
46
|
-
_successCallbacks: Map<number, ?(...unknown[]) => void>;
|
|
47
|
-
_failureCallbacks: Map<number, ?(...unknown[]) => void>;
|
|
46
|
+
_successCallbacks: Map<number, ?(...rest: unknown[]) => void>;
|
|
47
|
+
_failureCallbacks: Map<number, ?(...rest: unknown[]) => void>;
|
|
48
48
|
_callID: number;
|
|
49
49
|
_lastFlush: number;
|
|
50
50
|
_eventLoopStartTime: number;
|
|
@@ -148,9 +148,9 @@ class MessageQueue {
|
|
|
148
148
|
this._lazyCallableModules[name] = () => module;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
registerLazyCallableModule(name: string, factory: void => interface {}) {
|
|
151
|
+
registerLazyCallableModule(name: string, factory: (v: void) => interface {}) {
|
|
152
152
|
let module: interface {};
|
|
153
|
-
let getValue: ?(void) => interface {} = factory;
|
|
153
|
+
let getValue: ?(v: void) => interface {} = factory;
|
|
154
154
|
this._lazyCallableModules[name] = () => {
|
|
155
155
|
if (getValue) {
|
|
156
156
|
module = getValue();
|
|
@@ -173,8 +173,8 @@ class MessageQueue {
|
|
|
173
173
|
moduleID: number,
|
|
174
174
|
methodID: number,
|
|
175
175
|
params: unknown[],
|
|
176
|
-
onFail: ?(...unknown[]) => void,
|
|
177
|
-
onSucc: ?(...unknown[]) => void,
|
|
176
|
+
onFail: ?(...rest: unknown[]) => void,
|
|
177
|
+
onSucc: ?(...rest: unknown[]) => void,
|
|
178
178
|
): unknown {
|
|
179
179
|
if (__DEV__) {
|
|
180
180
|
invariant(
|
|
@@ -193,8 +193,8 @@ class MessageQueue {
|
|
|
193
193
|
moduleID: number,
|
|
194
194
|
methodID: number,
|
|
195
195
|
params: unknown[],
|
|
196
|
-
onFail: ?(...unknown[]) => void,
|
|
197
|
-
onSucc: ?(...unknown[]) => void,
|
|
196
|
+
onFail: ?(...rest: unknown[]) => void,
|
|
197
|
+
onSucc: ?(...rest: unknown[]) => void,
|
|
198
198
|
): void {
|
|
199
199
|
if (onFail || onSucc) {
|
|
200
200
|
if (__DEV__) {
|
|
@@ -244,8 +244,8 @@ class MessageQueue {
|
|
|
244
244
|
moduleID: number,
|
|
245
245
|
methodID: number,
|
|
246
246
|
params: unknown[],
|
|
247
|
-
onFail: ?(...unknown[]) => void,
|
|
248
|
-
onSucc: ?(...unknown[]) => void,
|
|
247
|
+
onFail: ?(...rest: unknown[]) => void,
|
|
248
|
+
onSucc: ?(...rest: unknown[]) => void,
|
|
249
249
|
): void {
|
|
250
250
|
this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
|
|
251
251
|
|
|
@@ -452,7 +452,7 @@ const AccessibilityInfo = {
|
|
|
452
452
|
addEventListener<K extends keyof AccessibilityEventDefinitions>(
|
|
453
453
|
eventName: K,
|
|
454
454
|
// $FlowFixMe[incompatible-type] - Flow bug with unions and generics (T128099423)
|
|
455
|
-
handler: (...AccessibilityEventDefinitions[K]) => void,
|
|
455
|
+
handler: (...rest: AccessibilityEventDefinitions[K]) => void,
|
|
456
456
|
): EventSubscription {
|
|
457
457
|
const deviceEventName = EventNames.get(eventName);
|
|
458
458
|
return deviceEventName == null
|
|
@@ -101,7 +101,7 @@ class KeyboardImpl {
|
|
|
101
101
|
*/
|
|
102
102
|
addListener<K extends keyof KeyboardEventDefinitions>(
|
|
103
103
|
eventType: K,
|
|
104
|
-
listener: (...KeyboardEventDefinitions[K]) => unknown,
|
|
104
|
+
listener: (...rest: KeyboardEventDefinitions[K]) => unknown,
|
|
105
105
|
context?: unknown,
|
|
106
106
|
): EventSubscription {
|
|
107
107
|
return this._emitter.addListener(eventType, listener);
|
|
@@ -368,7 +368,7 @@ function Pressable({
|
|
|
368
368
|
);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
function usePressState(forcePressed: boolean): [boolean, (boolean) => void] {
|
|
371
|
+
function usePressState(forcePressed: boolean): [boolean, (v: boolean) => void] {
|
|
372
372
|
const [pressed, setPressed] = useState(false);
|
|
373
373
|
return [pressed || forcePressed, setPressed];
|
|
374
374
|
}
|
|
@@ -469,7 +469,9 @@ export type ScrollViewPropsAndroid = Readonly<{
|
|
|
469
469
|
}>;
|
|
470
470
|
|
|
471
471
|
type StickyHeaderComponentType = component(
|
|
472
|
-
ref?: React.RefSetter<
|
|
472
|
+
ref?: React.RefSetter<
|
|
473
|
+
Readonly<interface {setNextHeaderY: (v: number) => void}>,
|
|
474
|
+
>,
|
|
473
475
|
...ScrollViewStickyHeaderProps
|
|
474
476
|
);
|
|
475
477
|
|
|
@@ -1986,8 +1988,8 @@ const styles = StyleSheet.create({
|
|
|
1986
1988
|
|
|
1987
1989
|
type RefForwarder<TNativeInstance, TPublicInstance> = {
|
|
1988
1990
|
getForwardingRef: (
|
|
1989
|
-
?React.RefSetter<TPublicInstance>,
|
|
1990
|
-
) => (TNativeInstance | null) => void,
|
|
1991
|
+
v: ?React.RefSetter<TPublicInstance>,
|
|
1992
|
+
) => (v: TNativeInstance | null) => void,
|
|
1991
1993
|
nativeInstance: TNativeInstance | null,
|
|
1992
1994
|
publicInstance: TPublicInstance | null,
|
|
1993
1995
|
};
|
|
@@ -1997,7 +1999,7 @@ type RefForwarder<TNativeInstance, TPublicInstance> = {
|
|
|
1997
1999
|
* once `ScrollView` is reimplemented as a functional component.
|
|
1998
2000
|
*/
|
|
1999
2001
|
function createRefForwarder<TNativeInstance, TPublicInstance>(
|
|
2000
|
-
mutator: TNativeInstance => TPublicInstance,
|
|
2002
|
+
mutator: (v: TNativeInstance) => TPublicInstance,
|
|
2001
2003
|
): RefForwarder<TNativeInstance, TPublicInstance> {
|
|
2002
2004
|
const state: RefForwarder<TNativeInstance, TPublicInstance> = {
|
|
2003
2005
|
getForwardingRef: memoize(forwardedRef => {
|
|
@@ -40,7 +40,7 @@ export type ScrollViewStickyHeaderProps = Readonly<{
|
|
|
40
40
|
}>;
|
|
41
41
|
|
|
42
42
|
interface Instance extends React.ElementRef<typeof Animated.View> {
|
|
43
|
-
readonly setNextHeaderY: number => void;
|
|
43
|
+
readonly setNextHeaderY: (v: number) => void;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const ScrollViewStickyHeader: component(
|
|
@@ -141,7 +141,7 @@ function mergePropsStack(
|
|
|
141
141
|
propsStack: Array<StackProps>,
|
|
142
142
|
defaultValues: ResolvedStackProps,
|
|
143
143
|
): ResolvedStackProps {
|
|
144
|
-
const merged: ResolvedStackProps = propsStack.reduce(
|
|
144
|
+
const merged: ResolvedStackProps = propsStack.reduce<ResolvedStackProps>(
|
|
145
145
|
(prev, cur) => {
|
|
146
146
|
for (const prop in cur) {
|
|
147
147
|
// $FlowFixMe[invalid-computed-prop] dynamic merge over the known StackProps keys
|
|
@@ -238,59 +238,51 @@ const Switch: component(
|
|
|
238
238
|
if (Platform.OS === 'android') {
|
|
239
239
|
const {onTintColor, tintColor, ...androidProps} = restProps;
|
|
240
240
|
|
|
241
|
-
const platformProps = {
|
|
242
|
-
accessibilityState: _accessibilityState,
|
|
243
|
-
enabled: _disabled !== true,
|
|
244
|
-
on: value === true,
|
|
245
|
-
style,
|
|
246
|
-
thumbTintColor: thumbColor,
|
|
247
|
-
trackColorForFalse: trackColorForFalse,
|
|
248
|
-
trackColorForTrue: trackColorForTrue,
|
|
249
|
-
trackTintColor: value === true ? trackColorForTrue : trackColorForFalse,
|
|
250
|
-
};
|
|
251
|
-
|
|
252
241
|
return (
|
|
253
242
|
<AndroidSwitchNativeComponent
|
|
254
243
|
{...androidProps}
|
|
255
|
-
{...platformProps}
|
|
256
244
|
accessibilityRole={props.accessibilityRole ?? 'switch'}
|
|
245
|
+
accessibilityState={_accessibilityState}
|
|
246
|
+
enabled={_disabled !== true}
|
|
247
|
+
on={value === true}
|
|
257
248
|
onChange={handleChange}
|
|
258
249
|
onResponderTerminationRequest={returnsFalse}
|
|
259
250
|
onStartShouldSetResponder={returnsTrue}
|
|
260
251
|
ref={ref}
|
|
252
|
+
style={style}
|
|
253
|
+
thumbTintColor={thumbColor}
|
|
254
|
+
trackColorForFalse={trackColorForFalse}
|
|
255
|
+
trackColorForTrue={trackColorForTrue}
|
|
256
|
+
trackTintColor={value === true ? trackColorForTrue : trackColorForFalse}
|
|
261
257
|
/>
|
|
262
258
|
);
|
|
263
259
|
} else {
|
|
264
|
-
const platformProps = {
|
|
265
|
-
accessibilityState: _accessibilityState,
|
|
266
|
-
disabled,
|
|
267
|
-
onTintColor: trackColorForTrue,
|
|
268
|
-
style: StyleSheet.compose(
|
|
269
|
-
{alignSelf: 'flex-start' as const},
|
|
270
|
-
StyleSheet.compose(
|
|
271
|
-
style,
|
|
272
|
-
ios_backgroundColor == null
|
|
273
|
-
? null
|
|
274
|
-
: {
|
|
275
|
-
backgroundColor: ios_backgroundColor,
|
|
276
|
-
borderRadius: 16,
|
|
277
|
-
},
|
|
278
|
-
),
|
|
279
|
-
),
|
|
280
|
-
thumbTintColor: thumbColor,
|
|
281
|
-
tintColor: trackColorForFalse,
|
|
282
|
-
value: value === true,
|
|
283
|
-
};
|
|
284
|
-
|
|
285
260
|
return (
|
|
286
261
|
<SwitchNativeComponent
|
|
287
262
|
{...restProps}
|
|
288
|
-
{...platformProps}
|
|
289
263
|
accessibilityRole={props.accessibilityRole ?? 'switch'}
|
|
264
|
+
accessibilityState={_accessibilityState}
|
|
265
|
+
disabled={disabled}
|
|
290
266
|
onChange={handleChange}
|
|
291
267
|
onResponderTerminationRequest={returnsFalse}
|
|
292
268
|
onStartShouldSetResponder={returnsTrue}
|
|
269
|
+
onTintColor={trackColorForTrue}
|
|
293
270
|
ref={ref}
|
|
271
|
+
style={StyleSheet.compose(
|
|
272
|
+
{alignSelf: 'flex-start' as const},
|
|
273
|
+
StyleSheet.compose(
|
|
274
|
+
style,
|
|
275
|
+
ios_backgroundColor == null
|
|
276
|
+
? null
|
|
277
|
+
: {
|
|
278
|
+
backgroundColor: ios_backgroundColor,
|
|
279
|
+
borderRadius: 16,
|
|
280
|
+
},
|
|
281
|
+
),
|
|
282
|
+
)}
|
|
283
|
+
thumbTintColor={thumbColor}
|
|
284
|
+
tintColor={trackColorForFalse}
|
|
285
|
+
value={value === true}
|
|
294
286
|
/>
|
|
295
287
|
);
|
|
296
288
|
}
|
|
@@ -183,8 +183,8 @@ function useTextInputStateSynchronization({
|
|
|
183
183
|
text?: string,
|
|
184
184
|
viewCommands: ViewCommands,
|
|
185
185
|
}): {
|
|
186
|
-
setLastNativeText: string => void,
|
|
187
|
-
setLastNativeSelection: LastNativeSelection => void,
|
|
186
|
+
setLastNativeText: (v: string) => void,
|
|
187
|
+
setLastNativeSelection: (v: LastNativeSelection) => void,
|
|
188
188
|
} {
|
|
189
189
|
const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
|
|
190
190
|
const [lastNativeSelectionState, setLastNativeSelection] =
|
|
@@ -222,13 +222,39 @@ class TouchableHighlightImpl extends React.Component<
|
|
|
222
222
|
const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} =
|
|
223
223
|
this.state.pressability.getEventHandlers();
|
|
224
224
|
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
225
|
+
const {
|
|
226
|
+
accessibilityState,
|
|
227
|
+
'aria-busy': ariaBusy,
|
|
228
|
+
'aria-checked': ariaChecked,
|
|
229
|
+
'aria-disabled': ariaDisabled,
|
|
230
|
+
'aria-expanded': ariaExpanded,
|
|
231
|
+
'aria-selected': ariaSelected,
|
|
232
|
+
} = this.props;
|
|
233
|
+
|
|
234
|
+
let _accessibilityState: ?AccessibilityState;
|
|
235
|
+
if (
|
|
236
|
+
accessibilityState != null ||
|
|
237
|
+
ariaBusy != null ||
|
|
238
|
+
ariaChecked != null ||
|
|
239
|
+
ariaDisabled != null ||
|
|
240
|
+
ariaExpanded != null ||
|
|
241
|
+
ariaSelected != null
|
|
242
|
+
) {
|
|
243
|
+
_accessibilityState = {
|
|
244
|
+
busy: ariaBusy ?? accessibilityState?.busy,
|
|
245
|
+
checked: ariaChecked ?? accessibilityState?.checked,
|
|
246
|
+
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
247
|
+
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
248
|
+
selected: ariaSelected ?? accessibilityState?.selected,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (this.props.disabled != null) {
|
|
253
|
+
_accessibilityState = {
|
|
254
|
+
..._accessibilityState,
|
|
255
|
+
disabled: this.props.disabled,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
232
258
|
|
|
233
259
|
const accessibilityValue = {
|
|
234
260
|
max: this.props['aria-valuemax'] ?? this.props.accessibilityValue?.max,
|
|
@@ -251,7 +277,8 @@ class TouchableHighlightImpl extends React.Component<
|
|
|
251
277
|
accessibilityHint={this.props.accessibilityHint}
|
|
252
278
|
accessibilityLanguage={this.props.accessibilityLanguage}
|
|
253
279
|
accessibilityRole={this.props.accessibilityRole}
|
|
254
|
-
|
|
280
|
+
role={this.props.role}
|
|
281
|
+
accessibilityState={_accessibilityState}
|
|
255
282
|
accessibilityValue={accessibilityValue}
|
|
256
283
|
accessibilityActions={this.props.accessibilityActions}
|
|
257
284
|
onAccessibilityAction={this.props.onAccessibilityAction}
|
|
@@ -324,6 +324,7 @@ class TouchableNativeFeedback extends React.Component<
|
|
|
324
324
|
accessibilityLanguage: this.props.accessibilityLanguage,
|
|
325
325
|
accessibilityLabel: accessibilityLabel,
|
|
326
326
|
accessibilityRole: this.props.accessibilityRole,
|
|
327
|
+
role: this.props.role,
|
|
327
328
|
accessibilityState: _accessibilityState,
|
|
328
329
|
accessibilityActions: this.props.accessibilityActions,
|
|
329
330
|
onAccessibilityAction: this.props.onAccessibilityAction,
|
|
@@ -227,6 +227,7 @@ class TouchableOpacity extends React.Component<
|
|
|
227
227
|
accessibilityHint={this.props.accessibilityHint}
|
|
228
228
|
accessibilityLanguage={this.props.accessibilityLanguage}
|
|
229
229
|
accessibilityRole={this.props.accessibilityRole}
|
|
230
|
+
role={this.props.role}
|
|
230
231
|
accessibilityState={_accessibilityState}
|
|
231
232
|
accessibilityActions={this.props.accessibilityActions}
|
|
232
233
|
onAccessibilityAction={this.props.onAccessibilityAction}
|
|
@@ -150,6 +150,7 @@ const PASSTHROUGH_PROPS = [
|
|
|
150
150
|
'onBlur',
|
|
151
151
|
'onFocus',
|
|
152
152
|
'onLayout',
|
|
153
|
+
'role',
|
|
153
154
|
'testID',
|
|
154
155
|
] as const;
|
|
155
156
|
|
|
@@ -281,6 +282,11 @@ export default function TouchableWithoutFeedback(
|
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
|
|
285
|
+
const accessibilityLabel = props['aria-label'] ?? props.accessibilityLabel;
|
|
286
|
+
if (accessibilityLabel !== undefined) {
|
|
287
|
+
elementProps.accessibilityLabel = accessibilityLabel;
|
|
288
|
+
}
|
|
289
|
+
|
|
284
290
|
// $FlowFixMe[incompatible-type]
|
|
285
291
|
return cloneElement(element, elementProps, ...children);
|
|
286
292
|
}
|
|
@@ -14,7 +14,7 @@ import HMRClient from '../../Utilities/HMRClient';
|
|
|
14
14
|
import getDevServer from './getDevServer';
|
|
15
15
|
|
|
16
16
|
declare var global: {
|
|
17
|
-
globalEvalWithSourceUrl?: (string, string) => unknown,
|
|
17
|
+
globalEvalWithSourceUrl?: (v0: string, v1: string) => unknown,
|
|
18
18
|
__BUNDLE_LOADER_REPORTER__?: {
|
|
19
19
|
onStart: (url: string | URL) => void,
|
|
20
20
|
onSuccess: (url: string | URL) => void,
|
|
@@ -17,7 +17,7 @@ export class SyntheticError extends Error {
|
|
|
17
17
|
name: string = '';
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
type ExceptionDecorator = ExceptionData => ExceptionData;
|
|
20
|
+
type ExceptionDecorator = (v: ExceptionData) => ExceptionData;
|
|
21
21
|
|
|
22
22
|
let userExceptionDecorator: ?ExceptionDecorator;
|
|
23
23
|
let inUserExceptionDecorator = false;
|
|
@@ -163,6 +163,7 @@ function handleException(e: unknown, isFatal: boolean) {
|
|
|
163
163
|
// Unfortunately there is no way to figure out the stacktrace in this
|
|
164
164
|
// case, so if you ended up here trying to trace an error, look for
|
|
165
165
|
// `throw '<error message>'` somewhere in your codebase.
|
|
166
|
+
// $FlowFixMe[incompatible-type]
|
|
166
167
|
error = new SyntheticError(e);
|
|
167
168
|
}
|
|
168
169
|
try {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
*/
|
|
28
28
|
export default class ReactNativeVersion {
|
|
29
29
|
static major: number = 0;
|
|
30
|
-
static minor: number =
|
|
30
|
+
static minor: number = 90;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = '
|
|
32
|
+
static prerelease: string | null = 'nightly-20261106-cd45f309e';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
type Module = {...};
|
|
14
14
|
type RegisterCallableModule = (
|
|
15
15
|
name: string,
|
|
16
|
-
moduleOrFactory: Module | (void => Module),
|
|
16
|
+
moduleOrFactory: Module | ((v: void) => Module),
|
|
17
17
|
) => void;
|
|
18
18
|
|
|
19
19
|
const registerCallableModule: RegisterCallableModule = (function () {
|
|
@@ -216,7 +216,7 @@ class DebuggingOverlayRegistry {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
#onDrawTraceUpdates: (
|
|
219
|
-
...ReactDevToolsAgentEvents['drawTraceUpdates']
|
|
219
|
+
...rest: ReactDevToolsAgentEvents['drawTraceUpdates']
|
|
220
220
|
) => void = traceUpdates => {
|
|
221
221
|
const modernNodesUpdates: Array<ModernNodeUpdate> = [];
|
|
222
222
|
const legacyNodesUpdates: Array<LegacyNodeUpdate> = [];
|
|
@@ -368,7 +368,7 @@ class DebuggingOverlayRegistry {
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
#onHighlightElements: (
|
|
371
|
-
...ReactDevToolsAgentEvents['showNativeHighlight']
|
|
371
|
+
...rest: ReactDevToolsAgentEvents['showNativeHighlight']
|
|
372
372
|
) => void = nodes => {
|
|
373
373
|
// First clear highlights for every container
|
|
374
374
|
for (const subscriber of this.#registry) {
|
|
@@ -510,7 +510,7 @@ class DebuggingOverlayRegistry {
|
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
#onClearElementsHighlights: (
|
|
513
|
-
...ReactDevToolsAgentEvents['hideNativeHighlight']
|
|
513
|
+
...rest: ReactDevToolsAgentEvents['hideNativeHighlight']
|
|
514
514
|
) => void = () => {
|
|
515
515
|
for (const subscriber of this.#registry) {
|
|
516
516
|
subscriber.debuggingOverlayRef.current?.clearElementsHighlight();
|
|
@@ -15,8 +15,10 @@ import useMergeRefs from '../Utilities/useMergeRefs';
|
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
import {useCallback} from 'react';
|
|
17
17
|
|
|
18
|
-
type ImageComponentDecorator = (
|
|
19
|
-
|
|
18
|
+
type ImageComponentDecorator = ((
|
|
19
|
+
v: AbstractImageAndroid,
|
|
20
|
+
) => AbstractImageAndroid) &
|
|
21
|
+
((v: AbstractImageIOS) => AbstractImageIOS);
|
|
20
22
|
|
|
21
23
|
let injectedImageComponentDecorator: ?ImageComponentDecorator;
|
|
22
24
|
|
|
@@ -31,7 +31,7 @@ class LinkingImpl extends NativeEventEmitter<LinkingEventDefinitions> {
|
|
|
31
31
|
*/
|
|
32
32
|
addEventListener<K extends keyof LinkingEventDefinitions>(
|
|
33
33
|
eventType: K,
|
|
34
|
-
listener: (...LinkingEventDefinitions[K]) => unknown,
|
|
34
|
+
listener: (...rest: LinkingEventDefinitions[K]) => unknown,
|
|
35
35
|
): EventSubscription {
|
|
36
36
|
return this.addListener(eventType, listener);
|
|
37
37
|
}
|
|
@@ -55,7 +55,7 @@ interface ILogBox {
|
|
|
55
55
|
install(): void;
|
|
56
56
|
uninstall(): void;
|
|
57
57
|
isInstalled(): boolean;
|
|
58
|
-
ignoreLogs(ReadonlyArray<IgnorePattern>): void;
|
|
58
|
+
ignoreLogs(v: ReadonlyArray<IgnorePattern>): void;
|
|
59
59
|
ignoreAllLogs(value?: boolean): void;
|
|
60
60
|
clearAllLogs(): void;
|
|
61
61
|
addLog(log: LogData): void;
|
|
@@ -25,7 +25,7 @@ component LogBoxInspectorStackFrame(
|
|
|
25
25
|
frame: StackFrame,
|
|
26
26
|
onPress?: ?(event: GestureResponderEvent) => void,
|
|
27
27
|
) {
|
|
28
|
-
const column = frame.column != null && parseInt(frame.column, 10);
|
|
28
|
+
const column = frame.column != null && parseInt(String(frame.column), 10);
|
|
29
29
|
const location =
|
|
30
30
|
getFileName(frame.file) +
|
|
31
31
|
(frame.lineNumber != null
|
|
@@ -51,7 +51,7 @@ const emitter = new NativeEventEmitter<RCTNetworkingEventDefinitions>(
|
|
|
51
51
|
const RCTNetworking = {
|
|
52
52
|
addListener<K extends keyof RCTNetworkingEventDefinitions>(
|
|
53
53
|
eventType: K,
|
|
54
|
-
listener: (...RCTNetworkingEventDefinitions[K]) => unknown,
|
|
54
|
+
listener: (...rest: RCTNetworkingEventDefinitions[K]) => unknown,
|
|
55
55
|
context?: unknown,
|
|
56
56
|
): EventSubscription {
|
|
57
57
|
return emitter.addListener(eventType, listener, context);
|
|
@@ -20,7 +20,7 @@ import {type NativeResponseType} from './XMLHttpRequest';
|
|
|
20
20
|
const RCTNetworking = {
|
|
21
21
|
addListener<K extends keyof RCTNetworkingEventDefinitions>(
|
|
22
22
|
eventType: K,
|
|
23
|
-
listener: (...RCTNetworkingEventDefinitions[K]) => unknown,
|
|
23
|
+
listener: (...rest: RCTNetworkingEventDefinitions[K]) => unknown,
|
|
24
24
|
context?: unknown,
|
|
25
25
|
): EventSubscription {
|
|
26
26
|
// $FlowFixMe[incompatible-type]
|
|
@@ -19,7 +19,7 @@ declare const RCTNetworking: interface {
|
|
|
19
19
|
addListener<K extends keyof RCTNetworkingEventDefinitions>(
|
|
20
20
|
eventType: K,
|
|
21
21
|
// $FlowFixMe[invalid-computed-prop]
|
|
22
|
-
listener: (...RCTNetworkingEventDefinitions[K]) => unknown,
|
|
22
|
+
listener: (...rest: RCTNetworkingEventDefinitions[K]) => unknown,
|
|
23
23
|
context?: unknown,
|
|
24
24
|
): EventSubscription,
|
|
25
25
|
|