@office-iss/react-native-win32 0.0.0-canary.307 → 0.0.0-canary.309
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 +2 -2
- package/CHANGELOG.json +36 -0
- package/CHANGELOG.md +18 -1
- package/IntegrationTests/AccessibilityManagerTest.js +10 -7
- package/IntegrationTests/ImageCachePolicyTest.js +8 -8
- package/IntegrationTests/IntegrationTestsApp.js +3 -3
- package/IntegrationTests/LayoutEventsTest.js +1 -1
- package/IntegrationTests/TimersTest.js +1 -1
- package/IntegrationTests/WebSocketTest.js +1 -1
- package/Libraries/Animated/AnimatedEvent.js +2 -2
- package/Libraries/Animated/animations/Animation.js +1 -3
- package/Libraries/Animated/createAnimatedComponent.js +8 -5
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +40 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +16 -11
- package/Libraries/Animated/nodes/AnimatedProps.js +43 -12
- package/Libraries/Animated/nodes/AnimatedStyle.js +12 -12
- package/Libraries/Animated/nodes/AnimatedValue.js +6 -3
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +24 -22
- package/Libraries/BatchedBridge/NativeModules.js +8 -6
- package/Libraries/Blob/URL.js +34 -3
- package/Libraries/Blob/URLSearchParams.js +1 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +6 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +13 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +15 -2
- package/Libraries/Components/Button.js +2 -5
- package/Libraries/Components/Button.win32.js +2 -5
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +4 -4
- package/Libraries/Components/Keyboard/Keyboard.js +2 -2
- package/Libraries/Components/Pressable/Pressable.js +8 -8
- package/Libraries/Components/Pressable/Pressable.win32.js +14 -13
- package/Libraries/Components/TextInput/TextInput.flow.js +13 -13
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +13 -13
- package/Libraries/Components/TextInput/TextInput.js +33 -34
- package/Libraries/Components/TextInput/TextInput.win32.js +39 -39
- package/Libraries/Components/Touchable/PooledClass.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +3 -3
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +9 -6
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +9 -9
- package/Libraries/Components/View/View.win32.js +5 -5
- package/Libraries/Components/View/ViewPropTypes.js +16 -6
- package/Libraries/Components/View/ViewPropTypes.win32.js +20 -10
- package/Libraries/Core/Devtools/loadBundleFromServer.js +6 -3
- package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +6 -3
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +2 -2
- package/Libraries/Image/Image.android.js +2 -2
- package/Libraries/Image/Image.ios.js +2 -2
- package/Libraries/Image/Image.win32.js +1 -1
- package/Libraries/Image/ImageProps.js +1 -1
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Interaction/InteractionManager.js +3 -3
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +31 -4
- package/Libraries/LogBox/Data/LogBoxLog.js +2 -2
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +5 -5
- package/Libraries/LogBox/LogBox.js +7 -7
- package/Libraries/NativeComponent/BaseViewConfig.android.js +12 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +4 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -1
- package/Libraries/Network/RCTNetworking.android.js +3 -3
- package/Libraries/Network/RCTNetworking.ios.js +2 -2
- package/Libraries/Network/RCTNetworking.js.flow +2 -2
- package/Libraries/Network/RCTNetworking.win32.js +2 -2
- package/Libraries/Pressability/Pressability.js +9 -9
- package/Libraries/Pressability/Pressability.win32.js +17 -16
- package/Libraries/Pressability/usePressability.js +3 -14
- package/Libraries/ReactNative/AppRegistry.flow.js +1 -1
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -1
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/PaperUIManager.js +1 -1
- package/Libraries/ReactNative/PaperUIManager.win32.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +1 -1
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +11 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +11 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11 -3
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +2 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/Settings/Settings.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +4 -2
- package/Libraries/StyleSheet/StyleSheetExports.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +99 -4
- package/Libraries/StyleSheet/StyleSheetTypes.js +6 -8
- package/Libraries/StyleSheet/processFilter.js +1 -1
- package/Libraries/Text/Text.js +46 -6
- package/Libraries/Text/Text.win32.js +46 -6
- package/Libraries/Text/TextNativeComponent.js +1 -1
- package/Libraries/Text/TextNativeComponent.win32.js +1 -1
- package/Libraries/Text/TextProps.js +7 -7
- package/Libraries/Text/TextProps.win32.js +7 -7
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +31 -0
- package/Libraries/Types/CoreEventTypes.win32.js +30 -13
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +2 -2
- package/Libraries/Utilities/DevLoadingView.js +8 -1
- package/Libraries/Utilities/DevSettings.js +3 -3
- package/Libraries/Utilities/HMRClient.js +4 -3
- package/Libraries/Utilities/RCTLog.js +3 -3
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +3 -3
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +7 -7
- package/Libraries/Utilities/useRefEffect.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +3 -3
- package/Libraries/promiseRejectionTrackingOptions.js +8 -8
- package/Libraries/vendor/core/ErrorUtils.js +10 -10
- package/Libraries/vendor/emitter/EventEmitter.js +6 -6
- package/flow/HermesInternalType.js +6 -6
- package/flow/bom.js.flow +35 -28
- package/flow/cssom.js.flow +3 -3
- package/flow/dom.js.flow +34 -33
- package/index.js +3 -0
- package/index.win32.js +3 -0
- package/index.win32.js.flow +8 -0
- package/jest/mock.js +2 -2
- package/jest/mockComponent.js +1 -1
- package/jest/setup.js +1 -1
- package/overrides.json +23 -23
- package/package.json +25 -23
- package/src/private/animated/NativeAnimatedHelper.js +130 -125
- package/src/private/animated/NativeAnimatedHelper.win32.js +130 -125
- package/src/private/animated/NativeAnimatedValidation.js +7 -4
- package/src/private/animated/createAnimatedPropsHook.js +13 -5
- package/src/private/animated/createAnimatedPropsMemoHook.js +10 -10
- package/src/private/components/virtualview/VirtualView.js +16 -9
- package/src/private/components/virtualview/logger/VirtualViewLogger.js +21 -0
- package/src/private/components/virtualview/logger/VirtualViewLoggerTypes.js +24 -0
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +6 -25
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +1 -27
- package/src/private/devsupport/devmenu/elementinspector/XHRInterceptor.js +3 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +75 -55
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +3 -3
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -10
- package/src/private/renderer/errorhandling/ErrorHandlers.js +7 -4
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/modules/NativeAccessibilityManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +4 -0
- package/src/private/specs_DEPRECATED/modules/NativeDevLoadingView.js +1 -0
- package/src/private/webapis/dom/events/CustomEvent.js +3 -3
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +29 -29
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +1 -1
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectReadOnly.js +1 -1
- package/src/private/webapis/html/events/MessageEvent.js +3 -3
- package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +3 -3
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +5 -5
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +2 -2
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +4 -4
- package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +1 -1
- package/src/private/webapis/mutationobserver/MutationObserver.js +1 -1
- package/src/private/webapis/mutationobserver/MutationRecord.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +4 -4
- package/src/private/webapis/performance/Performance.js +1 -1
- package/src/private/webapis/performance/UserTiming.js +1 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +3 -3
- package/src/private/webapis/structuredClone/structuredClone.js +3 -3
- package/src/types/globals.d.ts +30 -1
- package/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +6 -0
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +6 -3
- package/src-win/index.win32.js.flow +8 -0
- package/src/private/devsupport/devmenu/elementinspector/NetworkOverlay.js +0 -628
- package/src/private/devsupport/devmenu/perfmonitor/PerformanceOverlay.js +0 -66
|
@@ -21,17 +21,17 @@ import AnimatedWithChildren from './AnimatedWithChildren';
|
|
|
21
21
|
|
|
22
22
|
export type AnimatedStyleAllowlist = $ReadOnly<{[string]: true}>;
|
|
23
23
|
|
|
24
|
-
type FlatStyle = {[string]:
|
|
25
|
-
type FlatStyleForWeb<TStyle: FlatStyle> = [
|
|
24
|
+
type FlatStyle = {[string]: unknown};
|
|
25
|
+
type FlatStyleForWeb<TStyle: FlatStyle> = [unknown, TStyle];
|
|
26
26
|
|
|
27
27
|
function createAnimatedStyle(
|
|
28
28
|
flatStyle: FlatStyle,
|
|
29
29
|
allowlist: ?AnimatedStyleAllowlist,
|
|
30
30
|
keepUnanimatedValues: boolean,
|
|
31
|
-
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, {[string]:
|
|
31
|
+
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, {[string]: unknown}] {
|
|
32
32
|
const nodeKeys: Array<string> = [];
|
|
33
33
|
const nodes: Array<AnimatedNode> = [];
|
|
34
|
-
const style: {[string]:
|
|
34
|
+
const style: {[string]: unknown} = {};
|
|
35
35
|
|
|
36
36
|
const keys = Object.keys(flatStyle);
|
|
37
37
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
@@ -82,10 +82,10 @@ function createAnimatedStyle(
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export default class AnimatedStyle extends AnimatedWithChildren {
|
|
85
|
-
_originalStyleForWeb: ?
|
|
85
|
+
_originalStyleForWeb: ?unknown;
|
|
86
86
|
_nodeKeys: $ReadOnlyArray<string>;
|
|
87
87
|
_nodes: $ReadOnlyArray<AnimatedNode>;
|
|
88
|
-
_style: {[string]:
|
|
88
|
+
_style: {[string]: unknown};
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Creates an `AnimatedStyle` if `value` contains `AnimatedNode` instances.
|
|
@@ -94,7 +94,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
94
94
|
static from(
|
|
95
95
|
flatStyle: ?FlatStyle,
|
|
96
96
|
allowlist: ?AnimatedStyleAllowlist,
|
|
97
|
-
originalStyleForWeb: ?
|
|
97
|
+
originalStyleForWeb: ?unknown,
|
|
98
98
|
): ?AnimatedStyle {
|
|
99
99
|
if (flatStyle == null) {
|
|
100
100
|
return null;
|
|
@@ -115,8 +115,8 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
115
115
|
constructor(
|
|
116
116
|
nodeKeys: $ReadOnlyArray<string>,
|
|
117
117
|
nodes: $ReadOnlyArray<AnimatedNode>,
|
|
118
|
-
style: {[string]:
|
|
119
|
-
originalStyleForWeb: ?
|
|
118
|
+
style: {[string]: unknown},
|
|
119
|
+
originalStyleForWeb: ?unknown,
|
|
120
120
|
config?: ?AnimatedNodeConfig,
|
|
121
121
|
) {
|
|
122
122
|
super(config);
|
|
@@ -134,7 +134,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
__getValue(): FlatStyleForWeb<FlatStyle> | FlatStyle {
|
|
137
|
-
const style: {[string]:
|
|
137
|
+
const style: {[string]: unknown} = {};
|
|
138
138
|
|
|
139
139
|
const keys = Object.keys(this._style);
|
|
140
140
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
@@ -164,7 +164,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
164
164
|
* Mutates the supplied `style` object such that animated nodes are replaced
|
|
165
165
|
* with rasterized values.
|
|
166
166
|
*/
|
|
167
|
-
__replaceAnimatedNodeWithValues(style: {[string]:
|
|
167
|
+
__replaceAnimatedNodeWithValues(style: {[string]: unknown}): void {
|
|
168
168
|
const keys = Object.keys(style);
|
|
169
169
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
170
170
|
const key = keys[ii];
|
|
@@ -185,7 +185,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
__getAnimatedValue(): Object {
|
|
188
|
-
const style: {[string]:
|
|
188
|
+
const style: {[string]: unknown} = {};
|
|
189
189
|
|
|
190
190
|
const nodeKeys = this._nodeKeys;
|
|
191
191
|
const nodes = this._nodes;
|
|
@@ -12,7 +12,10 @@ import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
|
12
12
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
13
13
|
import type Animation from '../animations/Animation';
|
|
14
14
|
import type {EndCallback} from '../animations/Animation';
|
|
15
|
-
import type {
|
|
15
|
+
import type {
|
|
16
|
+
InterpolationConfigSupportedOutputType,
|
|
17
|
+
InterpolationConfigType,
|
|
18
|
+
} from './AnimatedInterpolation';
|
|
16
19
|
import type AnimatedNode from './AnimatedNode';
|
|
17
20
|
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
18
21
|
import type AnimatedTracking from './AnimatedTracking';
|
|
@@ -131,7 +134,7 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
|
|
134
|
-
addListener(callback: (value: any) =>
|
|
137
|
+
addListener(callback: (value: any) => unknown): string {
|
|
135
138
|
const id = super.addListener(callback);
|
|
136
139
|
this._listenerCount++;
|
|
137
140
|
if (this.__isNative) {
|
|
@@ -298,7 +301,7 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
298
301
|
* Interpolates the value before updating the property, e.g. mapping 0-1 to
|
|
299
302
|
* 0-10.
|
|
300
303
|
*/
|
|
301
|
-
interpolate<OutputT:
|
|
304
|
+
interpolate<OutputT: InterpolationConfigSupportedOutputType>(
|
|
302
305
|
config: InterpolationConfigType<OutputT>,
|
|
303
306
|
): AnimatedInterpolation<OutputT> {
|
|
304
307
|
return new AnimatedInterpolation(this, config);
|
|
@@ -21,7 +21,7 @@ export type AnimatedValueXYConfig = $ReadOnly<{
|
|
|
21
21
|
...AnimatedNodeConfig,
|
|
22
22
|
useNativeDriver: boolean,
|
|
23
23
|
}>;
|
|
24
|
-
type ValueXYListenerCallback = (value: {x: number, y: number, ...}) =>
|
|
24
|
+
type ValueXYListenerCallback = (value: {x: number, y: number, ...}) => unknown;
|
|
25
25
|
|
|
26
26
|
let _uniqueId = 1;
|
|
27
27
|
|
|
@@ -23,7 +23,7 @@ export type SpyData = {
|
|
|
23
23
|
type: number,
|
|
24
24
|
module: ?string,
|
|
25
25
|
method: string | number,
|
|
26
|
-
args:
|
|
26
|
+
args: unknown[],
|
|
27
27
|
...
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -42,9 +42,9 @@ const DEBUG_INFO_LIMIT = 32;
|
|
|
42
42
|
|
|
43
43
|
class MessageQueue {
|
|
44
44
|
_lazyCallableModules: {[key: string]: (void) => {...}, ...};
|
|
45
|
-
_queue: [number[], number[],
|
|
46
|
-
_successCallbacks: Map<number, ?(...
|
|
47
|
-
_failureCallbacks: Map<number, ?(...
|
|
45
|
+
_queue: [number[], number[], unknown[], number];
|
|
46
|
+
_successCallbacks: Map<number, ?(...unknown[]) => void>;
|
|
47
|
+
_failureCallbacks: Map<number, ?(...unknown[]) => void>;
|
|
48
48
|
_callID: number;
|
|
49
49
|
_lastFlush: number;
|
|
50
50
|
_eventLoopStartTime: number;
|
|
@@ -109,8 +109,8 @@ class MessageQueue {
|
|
|
109
109
|
callFunctionReturnFlushedQueue(
|
|
110
110
|
module: string,
|
|
111
111
|
method: string,
|
|
112
|
-
args:
|
|
113
|
-
): null | [Array<number>, Array<number>, Array<
|
|
112
|
+
args: unknown[],
|
|
113
|
+
): null | [Array<number>, Array<number>, Array<unknown>, number] {
|
|
114
114
|
this.__guard(() => {
|
|
115
115
|
this.__callFunction(module, method, args);
|
|
116
116
|
});
|
|
@@ -120,8 +120,8 @@ class MessageQueue {
|
|
|
120
120
|
|
|
121
121
|
invokeCallbackAndReturnFlushedQueue(
|
|
122
122
|
cbID: number,
|
|
123
|
-
args:
|
|
124
|
-
): null | [Array<number>, Array<number>, Array<
|
|
123
|
+
args: unknown[],
|
|
124
|
+
): null | [Array<number>, Array<number>, Array<unknown>, number] {
|
|
125
125
|
this.__guard(() => {
|
|
126
126
|
this.__invokeCallback(cbID, args);
|
|
127
127
|
});
|
|
@@ -129,7 +129,9 @@ class MessageQueue {
|
|
|
129
129
|
return this.flushedQueue();
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
flushedQueue():
|
|
132
|
+
flushedQueue():
|
|
133
|
+
| null
|
|
134
|
+
| [Array<number>, Array<number>, Array<unknown>, number] {
|
|
133
135
|
this.__guard(() => {
|
|
134
136
|
this.__callReactNativeMicrotasks();
|
|
135
137
|
});
|
|
@@ -171,10 +173,10 @@ class MessageQueue {
|
|
|
171
173
|
callNativeSyncHook(
|
|
172
174
|
moduleID: number,
|
|
173
175
|
methodID: number,
|
|
174
|
-
params:
|
|
175
|
-
onFail: ?(...
|
|
176
|
-
onSucc: ?(...
|
|
177
|
-
):
|
|
176
|
+
params: unknown[],
|
|
177
|
+
onFail: ?(...unknown[]) => void,
|
|
178
|
+
onSucc: ?(...unknown[]) => void,
|
|
179
|
+
): unknown {
|
|
178
180
|
if (__DEV__) {
|
|
179
181
|
invariant(
|
|
180
182
|
global.nativeCallSyncHook,
|
|
@@ -191,9 +193,9 @@ class MessageQueue {
|
|
|
191
193
|
processCallbacks(
|
|
192
194
|
moduleID: number,
|
|
193
195
|
methodID: number,
|
|
194
|
-
params:
|
|
195
|
-
onFail: ?(...
|
|
196
|
-
onSucc: ?(...
|
|
196
|
+
params: unknown[],
|
|
197
|
+
onFail: ?(...unknown[]) => void,
|
|
198
|
+
onSucc: ?(...unknown[]) => void,
|
|
197
199
|
): void {
|
|
198
200
|
if (onFail || onSucc) {
|
|
199
201
|
if (__DEV__) {
|
|
@@ -242,9 +244,9 @@ class MessageQueue {
|
|
|
242
244
|
enqueueNativeCall(
|
|
243
245
|
moduleID: number,
|
|
244
246
|
methodID: number,
|
|
245
|
-
params:
|
|
246
|
-
onFail: ?(...
|
|
247
|
-
onSucc: ?(...
|
|
247
|
+
params: unknown[],
|
|
248
|
+
onFail: ?(...unknown[]) => void,
|
|
249
|
+
onSucc: ?(...unknown[]) => void,
|
|
248
250
|
): void {
|
|
249
251
|
this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
|
|
250
252
|
|
|
@@ -256,7 +258,7 @@ class MessageQueue {
|
|
|
256
258
|
// folly-convertible. As a special case, if a prop value is a
|
|
257
259
|
// function it is permitted here, and special-cased in the
|
|
258
260
|
// conversion.
|
|
259
|
-
const isValidArgument = (val:
|
|
261
|
+
const isValidArgument = (val: unknown): boolean => {
|
|
260
262
|
switch (typeof val) {
|
|
261
263
|
case 'undefined':
|
|
262
264
|
case 'boolean':
|
|
@@ -401,7 +403,7 @@ class MessageQueue {
|
|
|
401
403
|
}
|
|
402
404
|
}
|
|
403
405
|
|
|
404
|
-
__callFunction(module: string, method: string, args:
|
|
406
|
+
__callFunction(module: string, method: string, args: unknown[]): void {
|
|
405
407
|
this._lastFlush = Date.now();
|
|
406
408
|
this._eventLoopStartTime = this._lastFlush;
|
|
407
409
|
if (__DEV__ || this.__spy) {
|
|
@@ -441,7 +443,7 @@ class MessageQueue {
|
|
|
441
443
|
}
|
|
442
444
|
}
|
|
443
445
|
|
|
444
|
-
__invokeCallback(cbID: number, args:
|
|
446
|
+
__invokeCallback(cbID: number, args: unknown[]): void {
|
|
445
447
|
this._lastFlush = Date.now();
|
|
446
448
|
this._eventLoopStartTime = this._lastFlush;
|
|
447
449
|
|
|
@@ -50,7 +50,7 @@ function genModule(
|
|
|
50
50
|
return {name: moduleName};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
const module: {[string]:
|
|
53
|
+
const module: {[string]: unknown} = {};
|
|
54
54
|
methods &&
|
|
55
55
|
methods.forEach((methodName, methodID) => {
|
|
56
56
|
const isPromise =
|
|
@@ -99,7 +99,7 @@ function loadModule(name: string, moduleID: number): ?{...} {
|
|
|
99
99
|
function genMethod(moduleID: number, methodID: number, type: MethodType) {
|
|
100
100
|
let fn = null;
|
|
101
101
|
if (type === 'promise') {
|
|
102
|
-
fn = function promiseMethodWrapper(...args: Array<
|
|
102
|
+
fn = function promiseMethodWrapper(...args: Array<unknown>) {
|
|
103
103
|
// In case we reject, capture a useful stack trace here.
|
|
104
104
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
105
105
|
* this parameters */
|
|
@@ -122,7 +122,7 @@ function genMethod(moduleID: number, methodID: number, type: MethodType) {
|
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
124
|
} else {
|
|
125
|
-
fn = function nonPromiseMethodWrapper(...args: Array<
|
|
125
|
+
fn = function nonPromiseMethodWrapper(...args: Array<unknown>) {
|
|
126
126
|
const lastArg = args.length > 0 ? args[args.length - 1] : null;
|
|
127
127
|
const secondLastArg = args.length > 1 ? args[args.length - 2] : null;
|
|
128
128
|
const hasSuccessCallback = typeof lastArg === 'function';
|
|
@@ -133,9 +133,11 @@ function genMethod(moduleID: number, methodID: number, type: MethodType) {
|
|
|
133
133
|
'Cannot have a non-function arg after a function arg.',
|
|
134
134
|
);
|
|
135
135
|
// $FlowFixMe[incompatible-type]
|
|
136
|
-
const onSuccess: ?(
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
const onSuccess: ?(unknown) => void = hasSuccessCallback ? lastArg : null;
|
|
137
|
+
const onFail: ?(unknown) => void = hasErrorCallback
|
|
138
|
+
? // $FlowFixMe[incompatible-type]
|
|
139
|
+
secondLastArg
|
|
140
|
+
: null;
|
|
139
141
|
// $FlowFixMe[unsafe-addition]
|
|
140
142
|
const callbackCount = hasSuccessCallback + hasErrorCallback;
|
|
141
143
|
const newArgs = args.slice(0, args.length - callbackCount);
|
package/Libraries/Blob/URL.js
CHANGED
|
@@ -90,11 +90,15 @@ export class URL {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// Only add trailing slash if URL has no path (just domain)
|
|
93
94
|
if (
|
|
94
95
|
!this._url.endsWith('/') &&
|
|
95
96
|
!(this._url.includes('?') || this._url.includes('#'))
|
|
96
97
|
) {
|
|
97
|
-
this._url
|
|
98
|
+
const afterProtocol = this._url.split('://')[1];
|
|
99
|
+
if (afterProtocol && !afterProtocol.includes('/')) {
|
|
100
|
+
this._url += '/';
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
} else {
|
|
100
104
|
if (typeof base === 'string') {
|
|
@@ -170,6 +174,24 @@ export class URL {
|
|
|
170
174
|
return searchMatch ? `?${searchMatch[1]}` : '';
|
|
171
175
|
}
|
|
172
176
|
|
|
177
|
+
set search(value: string) {
|
|
178
|
+
// Remove leading '?' if present
|
|
179
|
+
const searchString = value.startsWith('?') ? value.slice(1) : value;
|
|
180
|
+
|
|
181
|
+
// Update the internal URL
|
|
182
|
+
const baseUrl = this._url.split('?')[0].split('#')[0];
|
|
183
|
+
const hash = this.hash;
|
|
184
|
+
|
|
185
|
+
if (searchString) {
|
|
186
|
+
this._url = baseUrl + '?' + searchString + hash;
|
|
187
|
+
} else {
|
|
188
|
+
this._url = baseUrl + hash;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Reset the searchParams instance so it gets recreated with new values
|
|
192
|
+
this._searchParamsInstance = null;
|
|
193
|
+
}
|
|
194
|
+
|
|
173
195
|
get searchParams(): URLSearchParams {
|
|
174
196
|
if (this._searchParamsInstance == null) {
|
|
175
197
|
this._searchParamsInstance = new URLSearchParams(this.search);
|
|
@@ -185,10 +207,19 @@ export class URL {
|
|
|
185
207
|
if (this._searchParamsInstance === null) {
|
|
186
208
|
return this._url;
|
|
187
209
|
}
|
|
210
|
+
|
|
211
|
+
// Remove existing search params and hash from the URL
|
|
212
|
+
const baseUrl = this._url.split('?')[0].split('#')[0];
|
|
213
|
+
const hash = this.hash;
|
|
214
|
+
|
|
188
215
|
// $FlowFixMe[incompatible-use]
|
|
189
216
|
const instanceString = this._searchParamsInstance.toString();
|
|
190
|
-
|
|
191
|
-
|
|
217
|
+
|
|
218
|
+
if (instanceString) {
|
|
219
|
+
return baseUrl + '?' + instanceString + hash;
|
|
220
|
+
} else {
|
|
221
|
+
return baseUrl + hash;
|
|
222
|
+
}
|
|
192
223
|
}
|
|
193
224
|
|
|
194
225
|
get username(): string {
|
|
@@ -150,12 +150,18 @@ export interface AccessibilityInfoStatic {
|
|
|
150
150
|
* - `announcement`: The string announced by the screen reader.
|
|
151
151
|
* - `options`: An object that configures the reading options.
|
|
152
152
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
153
|
+
* - `priority`: The priority of the announcement. Possible values: 'low' | 'default' | 'high'.
|
|
154
|
+
* High priority announcements will interrupt any ongoing speech and cannot be interrupted.
|
|
155
|
+
* Default priority announcements will interrupt any ongoing speech but can be interrupted.
|
|
156
|
+
* Low priority announcements will not interrupt ongoing speech and can be interrupted.
|
|
157
|
+
* (iOS only).
|
|
153
158
|
* - `nativeID`: The nativeID of the element to send the announcement from. win32 only.
|
|
154
159
|
*/
|
|
155
160
|
announceForAccessibilityWithOptions(
|
|
156
161
|
announcement: string,
|
|
157
162
|
options: {
|
|
158
163
|
queue?: boolean | undefined;
|
|
164
|
+
priority?: 'low' | 'default' | 'high' | undefined;
|
|
159
165
|
nativeID?: string | undefined; // win32
|
|
160
166
|
},
|
|
161
167
|
): void;
|
|
@@ -42,7 +42,11 @@ type AccessibilityEventDefinitions = {
|
|
|
42
42
|
screenReaderChanged: [boolean],
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
type AccessibilityEventTypes =
|
|
45
|
+
type AccessibilityEventTypes =
|
|
46
|
+
| 'click'
|
|
47
|
+
| 'focus'
|
|
48
|
+
| 'viewHoverEnter'
|
|
49
|
+
| 'windowStateChange';
|
|
46
50
|
|
|
47
51
|
// Mapping of public event names to platform-specific event names.
|
|
48
52
|
const EventNames: Map<
|
|
@@ -438,6 +442,8 @@ const AccessibilityInfo = {
|
|
|
438
442
|
* Set accessibility focus to a React component.
|
|
439
443
|
*
|
|
440
444
|
* See https://reactnative.dev/docs/accessibilityinfo#setaccessibilityfocus
|
|
445
|
+
*
|
|
446
|
+
* @deprecated Use `sendAccessibilityEvent` with eventType `focus` instead.
|
|
441
447
|
*/
|
|
442
448
|
setAccessibilityFocus(reactTag: number): void {
|
|
443
449
|
legacySendAccessibilityEvent(reactTag, 'focus');
|
|
@@ -476,10 +482,15 @@ const AccessibilityInfo = {
|
|
|
476
482
|
* - `announcement`: The string announced by the screen reader.
|
|
477
483
|
* - `options`: An object that configures the reading options.
|
|
478
484
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
485
|
+
* - `priority`: The priority of the announcement. Possible values: 'low' | 'default' | 'high'.
|
|
486
|
+
* High priority announcements will interrupt any ongoing speech and cannot be interrupted.
|
|
487
|
+
* Default priority announcements will interrupt any ongoing speech but can be interrupted.
|
|
488
|
+
* Low priority announcements will not interrupt ongoing speech and can be interrupted.
|
|
489
|
+
* (iOS only).
|
|
479
490
|
*/
|
|
480
491
|
announceForAccessibilityWithOptions(
|
|
481
492
|
announcement: string,
|
|
482
|
-
options: {queue?: boolean},
|
|
493
|
+
options: {queue?: boolean, priority?: 'low' | 'default' | 'high'},
|
|
483
494
|
): void {
|
|
484
495
|
if (Platform.OS === 'android') {
|
|
485
496
|
NativeAccessibilityInfoAndroid?.announceForAccessibility(announcement);
|
|
@@ -44,7 +44,11 @@ type AccessibilityEventDefinitions = {
|
|
|
44
44
|
screenReaderChanged: [boolean],
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
type AccessibilityEventTypes =
|
|
47
|
+
type AccessibilityEventTypes =
|
|
48
|
+
| 'click'
|
|
49
|
+
| 'focus'
|
|
50
|
+
| 'viewHoverEnter'
|
|
51
|
+
| 'windowStateChange';
|
|
48
52
|
|
|
49
53
|
// Mapping of public event names to platform-specific event names.
|
|
50
54
|
const EventNames: Map<
|
|
@@ -462,6 +466,8 @@ const AccessibilityInfo = {
|
|
|
462
466
|
* Set accessibility focus to a React component.
|
|
463
467
|
*
|
|
464
468
|
* See https://reactnative.dev/docs/accessibilityinfo#setaccessibilityfocus
|
|
469
|
+
*
|
|
470
|
+
* @deprecated Use `sendAccessibilityEvent` with eventType `focus` instead.
|
|
465
471
|
*/
|
|
466
472
|
setAccessibilityFocus(reactTag: number): void {
|
|
467
473
|
legacySendAccessibilityEvent(reactTag, 'focus');
|
|
@@ -502,12 +508,18 @@ const AccessibilityInfo = {
|
|
|
502
508
|
* - `announcement`: The string announced by the screen reader.
|
|
503
509
|
* - `options`: An object that configures the reading options.
|
|
504
510
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
511
|
+
* - `priority`: The priority of the announcement. Possible values: 'low' | 'default' | 'high'.
|
|
512
|
+
* High priority announcements will interrupt any ongoing speech and cannot be interrupted.
|
|
513
|
+
* Default priority announcements will interrupt any ongoing speech but can be interrupted.
|
|
514
|
+
* Low priority announcements will not interrupt ongoing speech and can be interrupted.
|
|
515
|
+
* (iOS only).
|
|
505
516
|
* - `nativeID`: The nativeID of the element to send the announcement from. win32 only.
|
|
506
517
|
*/
|
|
507
518
|
announceForAccessibilityWithOptions(
|
|
508
519
|
announcement: string,
|
|
509
520
|
options: {
|
|
510
521
|
queue?: boolean,
|
|
522
|
+
priority?: 'low' | 'default' | 'high',
|
|
511
523
|
nativeID?: string, // win32
|
|
512
524
|
},
|
|
513
525
|
): void {
|
|
@@ -515,9 +527,10 @@ const AccessibilityInfo = {
|
|
|
515
527
|
NativeAccessibilityInfo?.announceForAccessibility(announcement);
|
|
516
528
|
} else if (Platform.OS === 'win32') {
|
|
517
529
|
if (NativeAccessibilityInfoWin32?.announceForAccessibilityWithOptions) {
|
|
530
|
+
const {priority: _, ...win32Options} = options;
|
|
518
531
|
NativeAccessibilityInfoWin32?.announceForAccessibilityWithOptions(
|
|
519
532
|
announcement,
|
|
520
|
-
|
|
533
|
+
win32Options,
|
|
521
534
|
);
|
|
522
535
|
} else {
|
|
523
536
|
NativeAccessibilityInfoWin32?.announceForAccessibility(announcement);
|
|
@@ -38,7 +38,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
38
38
|
Handler to be called when the user taps the button. The first function
|
|
39
39
|
argument is an event in form of [GestureResponderEvent](pressevent).
|
|
40
40
|
*/
|
|
41
|
-
onPress?: (event?: GestureResponderEvent) =>
|
|
41
|
+
onPress?: (event?: GestureResponderEvent) => unknown,
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
If `true`, doesn't play system sound on touch.
|
|
@@ -148,7 +148,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
148
148
|
*/
|
|
149
149
|
accessible?: ?boolean,
|
|
150
150
|
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
|
|
151
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
151
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
152
152
|
accessibilityState?: ?AccessibilityState,
|
|
153
153
|
|
|
154
154
|
/**
|
|
@@ -184,9 +184,6 @@ export type ButtonProps = $ReadOnly<{
|
|
|
184
184
|
[button:source]:
|
|
185
185
|
https://github.com/facebook/react-native/blob/HEAD/Libraries/Components/Button.js
|
|
186
186
|
|
|
187
|
-
[button:examples]:
|
|
188
|
-
https://js.coach/?menu%5Bcollections%5D=React%20Native&page=1&query=button
|
|
189
|
-
|
|
190
187
|
```jsx
|
|
191
188
|
<Button
|
|
192
189
|
onPress={onPressLearnMore}
|
|
@@ -39,7 +39,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
39
39
|
Handler to be called when the user taps the button. The first function
|
|
40
40
|
argument is an event in form of [GestureResponderEvent](pressevent).
|
|
41
41
|
*/
|
|
42
|
-
onPress?: (event?: GestureResponderEvent) =>
|
|
42
|
+
onPress?: (event?: GestureResponderEvent) => unknown,
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
If `true`, doesn't play system sound on touch.
|
|
@@ -149,7 +149,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
149
149
|
*/
|
|
150
150
|
accessible?: ?boolean,
|
|
151
151
|
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
|
|
152
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
152
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
153
153
|
accessibilityState?: ?AccessibilityState,
|
|
154
154
|
|
|
155
155
|
/**
|
|
@@ -187,9 +187,6 @@ export type ButtonProps = $ReadOnly<{
|
|
|
187
187
|
[button:source]:
|
|
188
188
|
https://github.com/facebook/react-native/blob/HEAD/Libraries/Components/Button.js
|
|
189
189
|
|
|
190
|
-
[button:examples]:
|
|
191
|
-
https://js.coach/?menu%5Bcollections%5D=React%20Native&page=1&query=button
|
|
192
|
-
|
|
193
190
|
```jsx
|
|
194
191
|
<Button
|
|
195
192
|
onPress={onPressLearnMore}
|
|
@@ -67,7 +67,7 @@ class DrawerLayoutAndroid
|
|
|
67
67
|
extends React.Component<DrawerLayoutAndroidProps, DrawerLayoutAndroidState>
|
|
68
68
|
implements DrawerLayoutAndroidMethods
|
|
69
69
|
{
|
|
70
|
-
static get positions():
|
|
70
|
+
static get positions(): unknown {
|
|
71
71
|
console.warn(
|
|
72
72
|
'Setting DrawerLayoutAndroid drawerPosition using `DrawerLayoutAndroid.positions` is deprecated. Instead pass the string value "left" or "right"',
|
|
73
73
|
);
|
|
@@ -73,7 +73,7 @@ export type DrawerLayoutAndroidProps = $ReadOnly<{
|
|
|
73
73
|
/**
|
|
74
74
|
* Function called whenever there is an interaction with the navigation view.
|
|
75
75
|
*/
|
|
76
|
-
onDrawerSlide?: ?(event: DrawerSlideEvent) =>
|
|
76
|
+
onDrawerSlide?: ?(event: DrawerSlideEvent) => unknown,
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Function called when the drawer state has changed. The drawer can be in 3 states:
|
|
@@ -82,17 +82,17 @@ export type DrawerLayoutAndroidProps = $ReadOnly<{
|
|
|
82
82
|
* - Settling, meaning that there was an interaction with the navigation view, and the
|
|
83
83
|
* navigation view is now finishing its closing or opening animation
|
|
84
84
|
*/
|
|
85
|
-
onDrawerStateChanged?: ?(state: DrawerStates) =>
|
|
85
|
+
onDrawerStateChanged?: ?(state: DrawerStates) => unknown,
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Function called whenever the navigation view has been opened.
|
|
89
89
|
*/
|
|
90
|
-
onDrawerOpen?: ?() =>
|
|
90
|
+
onDrawerOpen?: ?() => unknown,
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Function called whenever the navigation view has been closed.
|
|
94
94
|
*/
|
|
95
|
-
onDrawerClose?: ?() =>
|
|
95
|
+
onDrawerClose?: ?() => unknown,
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* The navigation view that will be rendered to the side of the screen and can be pulled in.
|
|
@@ -148,8 +148,8 @@ class KeyboardImpl {
|
|
|
148
148
|
*/
|
|
149
149
|
addListener<K: $Keys<KeyboardEventDefinitions>>(
|
|
150
150
|
eventType: K,
|
|
151
|
-
listener: (...KeyboardEventDefinitions[K]) =>
|
|
152
|
-
context?:
|
|
151
|
+
listener: (...KeyboardEventDefinitions[K]) => unknown,
|
|
152
|
+
context?: unknown,
|
|
153
153
|
): EventSubscription {
|
|
154
154
|
return this._emitter.addListener(eventType, listener);
|
|
155
155
|
}
|
|
@@ -80,41 +80,41 @@ type PressableBaseProps = $ReadOnly<{
|
|
|
80
80
|
/**
|
|
81
81
|
* Called when this view's layout changes.
|
|
82
82
|
*/
|
|
83
|
-
onLayout?: ?(event: LayoutChangeEvent) =>
|
|
83
|
+
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* Called when the hover is activated to provide visual feedback.
|
|
87
87
|
*/
|
|
88
|
-
onHoverIn?: ?(event: MouseEvent) =>
|
|
88
|
+
onHoverIn?: ?(event: MouseEvent) => unknown,
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Called when the hover is deactivated to undo visual feedback.
|
|
92
92
|
*/
|
|
93
|
-
onHoverOut?: ?(event: MouseEvent) =>
|
|
93
|
+
onHoverOut?: ?(event: MouseEvent) => unknown,
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* Called when a long-tap gesture is detected.
|
|
97
97
|
*/
|
|
98
|
-
onLongPress?: ?(event: GestureResponderEvent) =>
|
|
98
|
+
onLongPress?: ?(event: GestureResponderEvent) => unknown,
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* Called when a single tap gesture is detected.
|
|
102
102
|
*/
|
|
103
|
-
onPress?: ?(event: GestureResponderEvent) =>
|
|
103
|
+
onPress?: ?(event: GestureResponderEvent) => unknown,
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Called when a touch is engaged before `onPress`.
|
|
107
107
|
*/
|
|
108
|
-
onPressIn?: ?(event: GestureResponderEvent) =>
|
|
108
|
+
onPressIn?: ?(event: GestureResponderEvent) => unknown,
|
|
109
109
|
/**
|
|
110
110
|
* Called when the press location moves.
|
|
111
111
|
*/
|
|
112
|
-
onPressMove?: ?(event: GestureResponderEvent) =>
|
|
112
|
+
onPressMove?: ?(event: GestureResponderEvent) => unknown,
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* Called when a touch is released before `onPress`.
|
|
116
116
|
*/
|
|
117
|
-
onPressOut?: ?(event: GestureResponderEvent) =>
|
|
117
|
+
onPressOut?: ?(event: GestureResponderEvent) => unknown,
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* Whether to prevent any other native components from becoming responder
|