@office-iss/react-native-win32 0.0.0-canary.299 → 0.0.0-canary.300
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 +3 -6
- package/CHANGELOG.json +46 -1
- package/CHANGELOG.md +19 -6
- package/IntegrationTests/IntegrationTestsApp.js +1 -1
- package/Libraries/Alert/RCTAlertManager.android.js +2 -0
- package/Libraries/Animated/Animated.d.ts +2 -0
- package/Libraries/Animated/AnimatedImplementation.js +2 -0
- package/Libraries/Animated/Easing.js +2 -0
- package/Libraries/Animated/animations/Animation.js +14 -14
- package/Libraries/Animated/animations/TimingAnimation.js +2 -0
- package/Libraries/Animated/nodes/AnimatedNode.js +7 -7
- package/Libraries/Animated/nodes/AnimatedObject.js +7 -7
- package/Libraries/Animated/nodes/AnimatedProps.js +30 -30
- package/Libraries/Animated/nodes/AnimatedStyle.js +17 -17
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
- package/Libraries/Animated/nodes/AnimatedValue.js +18 -18
- package/Libraries/AppState/AppState.js +3 -3
- package/Libraries/BatchedBridge/MessageQueue.js +4 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +10 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +9 -0
- package/Libraries/Components/StatusBar/StatusBar.js +2 -2
- package/Libraries/Components/Switch/Switch.js +1 -1
- package/Libraries/Components/TextInput/TextInput.js +2 -2
- package/Libraries/Components/TextInput/TextInput.win32.js +2 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -2
- package/Libraries/Components/View/View.js +86 -168
- package/Libraries/Core/ReactNativeVersion.js +37 -10
- package/Libraries/Core/Timers/queueMicrotask.js +1 -0
- package/Libraries/Core/setUpPerformance.js +2 -1
- package/Libraries/Interaction/InteractionManager.js +118 -171
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -0
- package/Libraries/LogBox/Data/LogBoxData.js +4 -1
- package/Libraries/Modal/Modal.js +1 -1
- package/Libraries/NativeComponent/ViewConfig.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +18 -5
- package/Libraries/Pressability/Pressability.js +1 -1
- package/Libraries/Pressability/Pressability.win32.js +1 -1
- package/Libraries/ReactNative/AppRegistryImpl.js +4 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/Utilities/useMergeRefs.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +17 -31
- package/flow/HermesInternalType.js +114 -0
- package/flow/Stringish.js +14 -0
- package/flow/bom.js.flow +554 -0
- package/flow/console.js +49 -0
- package/flow/cssom.js.flow +575 -0
- package/flow/dom.js.flow +6289 -0
- package/flow/global.js +88 -0
- package/flow/prettier.js.flow +14 -0
- package/flow/streams.js.flow +140 -0
- package/index.js +5 -2
- package/index.win32.js +6 -2
- package/jest/mockComponent.js +1 -1
- package/jest/setup.js +11 -0
- package/overrides.json +11 -11
- package/package.json +19 -19
- package/src/private/animated/NativeAnimatedHelper.js +8 -1
- package/src/private/animated/NativeAnimatedHelper.win32.js +8 -1
- package/src/private/animated/createAnimatedPropsHook.js +2 -49
- package/src/private/animated/createAnimatedPropsMemoHook.js +2 -48
- package/src/private/components/virtualview/VirtualView.js +22 -6
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +93 -0
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +71 -51
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +19 -0
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +15 -5
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +19 -74
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +0 -4
- package/src/private/webapis/performance/EventTiming.js +5 -9
- package/src/private/webapis/performance/Performance.js +251 -191
- package/src/private/webapis/performance/PerformanceObserver.js +8 -29
- package/src/private/webapis/performance/UserTiming.js +24 -23
- package/src/private/webapis/performance/UserTimingExtensibility.js.flow +38 -0
- package/src/private/webapis/performance/internals/Utilities.js +9 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +19 -33
- package/src/private/webapis/structuredClone/structuredClone.js +1 -1
- package/Libraries/Interaction/InteractionManagerStub.js +0 -184
- package/Libraries/Interaction/TaskQueue.js +0 -197
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -31
|
@@ -9,14 +9,41 @@
|
|
|
9
9
|
* @generated by scripts/releases/set-version.js
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Object containing the current React Native version.
|
|
14
|
+
*
|
|
15
|
+
* Specifically, this is the source of truth for the resolved `react-native`
|
|
16
|
+
* package in the JavaScript bundle. Apps and libraries can use this to
|
|
17
|
+
* determine compatibility or enable version-specific features.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```js
|
|
21
|
+
* // Get the full version string
|
|
22
|
+
* const version = ReactNativeVersion.getVersionString();
|
|
23
|
+
*
|
|
24
|
+
* // Access individual version components
|
|
25
|
+
* const major = ReactNativeVersion.major;
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export default class ReactNativeVersion {
|
|
29
|
+
static major: number = 0;
|
|
30
|
+
static minor: number = 82;
|
|
31
|
+
static patch: number = 0;
|
|
32
|
+
static prerelease: string | null = 'nightly-20250806-5936f29d6';
|
|
33
|
+
|
|
34
|
+
static getVersionString(): string {
|
|
35
|
+
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Compatibility export — please import `ReactNativeVersion` from
|
|
41
|
+
* `react-native`.
|
|
42
|
+
* See https://github.com/react-native-community/discussions-and-proposals/pull/894.
|
|
43
|
+
*/
|
|
44
|
+
export const version = {
|
|
45
|
+
major: ReactNativeVersion.major,
|
|
46
|
+
minor: ReactNativeVersion.minor,
|
|
47
|
+
patch: ReactNativeVersion.patch,
|
|
48
|
+
prerelease: ReactNativeVersion.prerelease,
|
|
22
49
|
};
|
|
@@ -30,6 +30,7 @@ export default function queueMicrotask(callback: Function) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
// Try to reuse a lazily allocated resolved promise from closure.
|
|
33
|
+
// $FlowFixMe[constant-condition]
|
|
33
34
|
(resolvedPromise || (resolvedPromise = Promise.resolve()))
|
|
34
35
|
.then(callback)
|
|
35
36
|
.catch(error =>
|
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import Performance from '../../src/private/webapis/performance/Performance';
|
|
12
11
|
import NativePerformance from '../../src/private/webapis/performance/specs/NativePerformance';
|
|
13
12
|
|
|
14
13
|
// In case if the native implementation of the Performance API is available, use it,
|
|
15
14
|
// otherwise fall back to the legacy/default one, which only defines 'Performance.now()'
|
|
16
15
|
if (NativePerformance) {
|
|
16
|
+
const Performance =
|
|
17
|
+
require('../../src/private/webapis/performance/Performance').default;
|
|
17
18
|
// $FlowExpectedError[cannot-write]
|
|
18
19
|
global.performance = new Performance();
|
|
19
20
|
} else {
|
|
@@ -4,180 +4,32 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @flow strict
|
|
7
|
+
* @flow strict
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {EventSubscription} from '../vendor/emitter/EventEmitter';
|
|
12
|
-
import type {Task} from './TaskQueue';
|
|
13
12
|
|
|
14
|
-
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
15
|
-
import EventEmitter from '../vendor/emitter/EventEmitter';
|
|
16
|
-
|
|
17
|
-
const BatchedBridge = require('../BatchedBridge/BatchedBridge').default;
|
|
18
|
-
const TaskQueue = require('./TaskQueue').default;
|
|
19
13
|
const invariant = require('invariant');
|
|
20
14
|
|
|
21
|
-
export type
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const _emitter = new EventEmitter<{
|
|
26
|
-
interactionComplete: [],
|
|
27
|
-
interactionStart: [],
|
|
28
|
-
}>();
|
|
29
|
-
|
|
30
|
-
const DEBUG_DELAY: 0 = 0;
|
|
31
|
-
const DEBUG: false = false;
|
|
32
|
-
|
|
33
|
-
const InteractionManagerImpl = {
|
|
34
|
-
Events: {
|
|
35
|
-
interactionStart: 'interactionStart',
|
|
36
|
-
interactionComplete: 'interactionComplete',
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Schedule a function to run after all interactions have completed. Returns a cancellable
|
|
41
|
-
* "promise".
|
|
42
|
-
*/
|
|
43
|
-
runAfterInteractions(task: ?Task): {
|
|
44
|
-
then: <U>(
|
|
45
|
-
onFulfill?: ?(void) => ?(Promise<U> | U),
|
|
46
|
-
onReject?: ?(error: mixed) => ?(Promise<U> | U),
|
|
47
|
-
) => Promise<U>,
|
|
48
|
-
cancel: () => void,
|
|
49
|
-
...
|
|
50
|
-
} {
|
|
51
|
-
const tasks: Array<Task> = [];
|
|
52
|
-
const promise = new Promise((resolve: () => void) => {
|
|
53
|
-
_scheduleUpdate();
|
|
54
|
-
if (task) {
|
|
55
|
-
tasks.push(task);
|
|
56
|
-
}
|
|
57
|
-
tasks.push({
|
|
58
|
-
run: resolve,
|
|
59
|
-
name: 'resolve ' + ((task && task.name) || '?'),
|
|
60
|
-
});
|
|
61
|
-
_taskQueue.enqueueTasks(tasks);
|
|
62
|
-
});
|
|
63
|
-
return {
|
|
64
|
-
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
65
|
-
then: promise.then.bind(promise),
|
|
66
|
-
cancel: function () {
|
|
67
|
-
_taskQueue.cancelTasks(tasks);
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Notify manager that an interaction has started.
|
|
74
|
-
*/
|
|
75
|
-
createInteractionHandle(): Handle {
|
|
76
|
-
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
77
|
-
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
78
|
-
DEBUG && console.log('InteractionManager: create interaction handle');
|
|
79
|
-
_scheduleUpdate();
|
|
80
|
-
const handle = ++_inc;
|
|
81
|
-
_addInteractionSet.add(handle);
|
|
82
|
-
return handle;
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Notify manager that an interaction has completed.
|
|
87
|
-
*/
|
|
88
|
-
clearInteractionHandle(handle: Handle) {
|
|
89
|
-
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
90
|
-
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
91
|
-
DEBUG && console.log('InteractionManager: clear interaction handle');
|
|
92
|
-
invariant(!!handle, 'InteractionManager: Must provide a handle to clear.');
|
|
93
|
-
_scheduleUpdate();
|
|
94
|
-
_addInteractionSet.delete(handle);
|
|
95
|
-
_deleteInteractionSet.add(handle);
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
// $FlowFixMe[unclear-type] unclear type of _emitter
|
|
99
|
-
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
100
|
-
addListener: _emitter.addListener.bind(_emitter) as (
|
|
101
|
-
eventType: string,
|
|
102
|
-
// $FlowFixMe[unclear-type] unclear type of arguments
|
|
103
|
-
listener: (...args: any) => mixed,
|
|
104
|
-
context: mixed,
|
|
105
|
-
) => EventSubscription,
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* A positive number will use setTimeout to schedule any tasks after the
|
|
109
|
-
* eventLoopRunningTime hits the deadline value, otherwise all tasks will be
|
|
110
|
-
* executed in one setImmediate batch (default).
|
|
111
|
-
*/
|
|
112
|
-
setDeadline(deadline: number) {
|
|
113
|
-
_deadline = deadline;
|
|
114
|
-
},
|
|
15
|
+
export type SimpleTask = {
|
|
16
|
+
name: string,
|
|
17
|
+
run: () => void,
|
|
115
18
|
};
|
|
19
|
+
export type PromiseTask = {
|
|
20
|
+
name: string,
|
|
21
|
+
gen: () => Promise<void>,
|
|
22
|
+
};
|
|
23
|
+
export type Task = SimpleTask | PromiseTask | (() => void);
|
|
116
24
|
|
|
117
|
-
|
|
118
|
-
const _addInteractionSet = new Set<number | Handle>();
|
|
119
|
-
const _deleteInteractionSet = new Set<Handle>();
|
|
120
|
-
const _taskQueue = new TaskQueue({onMoreTasks: _scheduleUpdate});
|
|
121
|
-
let _nextUpdateHandle: $FlowFixMe | TimeoutID = 0;
|
|
122
|
-
let _inc = 0;
|
|
123
|
-
let _deadline = -1;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Schedule an asynchronous update to the interaction state.
|
|
127
|
-
*/
|
|
128
|
-
function _scheduleUpdate() {
|
|
129
|
-
if (!_nextUpdateHandle) {
|
|
130
|
-
if (_deadline > 0) {
|
|
131
|
-
_nextUpdateHandle = setTimeout(_processUpdate, 0 + DEBUG_DELAY);
|
|
132
|
-
} else {
|
|
133
|
-
_nextUpdateHandle = setImmediate(_processUpdate);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Notify listeners, process queue, etc
|
|
140
|
-
*/
|
|
141
|
-
function _processUpdate() {
|
|
142
|
-
_nextUpdateHandle = 0;
|
|
143
|
-
|
|
144
|
-
const interactionCount = _interactionSet.size;
|
|
145
|
-
_addInteractionSet.forEach(handle => _interactionSet.add(handle));
|
|
146
|
-
_deleteInteractionSet.forEach(handle => _interactionSet.delete(handle));
|
|
147
|
-
const nextInteractionCount = _interactionSet.size;
|
|
148
|
-
|
|
149
|
-
if (interactionCount !== 0 && nextInteractionCount === 0) {
|
|
150
|
-
// transition from 1+ --> 0 interactions
|
|
151
|
-
/* $FlowFixMe[prop-missing] Natural Inference rollout. See
|
|
152
|
-
* https://fburl.com/workplace/6291gfvu */
|
|
153
|
-
/* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See
|
|
154
|
-
* https://fburl.com/workplace/6291gfvu */
|
|
155
|
-
_emitter.emit(InteractionManager.Events.interactionComplete);
|
|
156
|
-
} else if (interactionCount === 0 && nextInteractionCount !== 0) {
|
|
157
|
-
// transition from 0 --> 1+ interactions
|
|
158
|
-
/* $FlowFixMe[prop-missing] Natural Inference rollout. See
|
|
159
|
-
* https://fburl.com/workplace/6291gfvu */
|
|
160
|
-
/* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See
|
|
161
|
-
* https://fburl.com/workplace/6291gfvu */
|
|
162
|
-
_emitter.emit(InteractionManager.Events.interactionStart);
|
|
163
|
-
}
|
|
25
|
+
export type Handle = number;
|
|
164
26
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
BatchedBridge.getEventLoopRunningTime() >= _deadline
|
|
172
|
-
) {
|
|
173
|
-
// Hit deadline before processing all tasks, so process more later.
|
|
174
|
-
_scheduleUpdate();
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
_addInteractionSet.clear();
|
|
180
|
-
_deleteInteractionSet.clear();
|
|
27
|
+
// NOTE: The original implementation of `InteractionManager` never rejected
|
|
28
|
+
// the returned promise. This preserves that behavior in the stub.
|
|
29
|
+
function reject(error: Error): void {
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
throw error;
|
|
32
|
+
}, 0);
|
|
181
33
|
}
|
|
182
34
|
|
|
183
35
|
/**
|
|
@@ -231,11 +83,106 @@ function _processUpdate() {
|
|
|
231
83
|
*
|
|
232
84
|
* @deprecated
|
|
233
85
|
*/
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
86
|
+
const InteractionManagerStub = {
|
|
87
|
+
Events: {
|
|
88
|
+
interactionStart: 'interactionStart',
|
|
89
|
+
interactionComplete: 'interactionComplete',
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Schedule a function to run after all interactions have completed. Returns a cancellable
|
|
94
|
+
* "promise".
|
|
95
|
+
*
|
|
96
|
+
* @deprecated
|
|
97
|
+
*/
|
|
98
|
+
runAfterInteractions(task: ?Task): {
|
|
99
|
+
then: <U>(
|
|
100
|
+
onFulfill?: ?(void) => ?(Promise<U> | U),
|
|
101
|
+
onReject?: ?(error: mixed) => ?(Promise<U> | U),
|
|
102
|
+
) => Promise<U>,
|
|
103
|
+
cancel: () => void,
|
|
104
|
+
...
|
|
105
|
+
} {
|
|
106
|
+
let immediateID: ?$FlowFixMe;
|
|
107
|
+
const promise = new Promise(resolve => {
|
|
108
|
+
immediateID = setImmediate(() => {
|
|
109
|
+
if (typeof task === 'object' && task !== null) {
|
|
110
|
+
if (typeof task.gen === 'function') {
|
|
111
|
+
task.gen().then(resolve, reject);
|
|
112
|
+
} else if (typeof task.run === 'function') {
|
|
113
|
+
try {
|
|
114
|
+
task.run();
|
|
115
|
+
resolve();
|
|
116
|
+
} catch (error) {
|
|
117
|
+
reject(error);
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
reject(new TypeError(`Task "${task.name}" missing gen or run.`));
|
|
121
|
+
}
|
|
122
|
+
} else if (typeof task === 'function') {
|
|
123
|
+
try {
|
|
124
|
+
task();
|
|
125
|
+
resolve();
|
|
126
|
+
} catch (error) {
|
|
127
|
+
reject(error);
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
reject(new TypeError('Invalid task of type: ' + typeof task));
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
137
|
+
then: promise.then.bind(promise),
|
|
138
|
+
cancel() {
|
|
139
|
+
clearImmediate(immediateID);
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Notify manager that an interaction has started.
|
|
146
|
+
*
|
|
147
|
+
* @deprecated
|
|
148
|
+
*/
|
|
149
|
+
createInteractionHandle(): Handle {
|
|
150
|
+
return -1;
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Notify manager that an interaction has completed.
|
|
155
|
+
*
|
|
156
|
+
* @deprecated
|
|
157
|
+
*/
|
|
158
|
+
clearInteractionHandle(handle: Handle) {
|
|
159
|
+
invariant(!!handle, 'InteractionManager: Must provide a handle to clear.');
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @deprecated
|
|
164
|
+
*/
|
|
165
|
+
addListener(
|
|
166
|
+
eventType: string,
|
|
167
|
+
// $FlowIgnore[unclear-type]
|
|
168
|
+
listener: (...args: any) => mixed,
|
|
169
|
+
context: mixed,
|
|
170
|
+
): EventSubscription {
|
|
171
|
+
return {
|
|
172
|
+
remove() {},
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* A positive number will use setTimeout to schedule any tasks after the
|
|
178
|
+
* eventLoopRunningTime hits the deadline value, otherwise all tasks will be
|
|
179
|
+
* executed in one setImmediate batch (default).
|
|
180
|
+
*
|
|
181
|
+
* @deprecated
|
|
182
|
+
*/
|
|
183
|
+
setDeadline(deadline: number) {
|
|
184
|
+
// Do nothing.
|
|
185
|
+
},
|
|
186
|
+
};
|
|
240
187
|
|
|
241
|
-
export default
|
|
188
|
+
export default InteractionManagerStub;
|
|
@@ -108,6 +108,8 @@ function configureNext(
|
|
|
108
108
|
if (UIManager?.configureNextLayoutAnimation) {
|
|
109
109
|
UIManager.configureNextLayoutAnimation(
|
|
110
110
|
config,
|
|
111
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
112
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
111
113
|
onAnimationComplete ?? function () {},
|
|
112
114
|
onAnimationDidFail ??
|
|
113
115
|
function () {} /* this should never be called in Non-Fabric */,
|
|
@@ -20,7 +20,6 @@ import type {
|
|
|
20
20
|
|
|
21
21
|
import DebuggerSessionObserver from '../../../src/private/devsupport/rndevtools/FuseboxSessionObserver';
|
|
22
22
|
import parseErrorStack from '../../Core/Devtools/parseErrorStack';
|
|
23
|
-
import NativeDevSettings from '../../NativeModules/specs/NativeDevSettings';
|
|
24
23
|
import NativeLogBox from '../../NativeModules/specs/NativeLogBox';
|
|
25
24
|
import LogBoxLog from './LogBoxLog';
|
|
26
25
|
import {parseLogBoxException} from './parseLogBoxLog';
|
|
@@ -493,6 +492,10 @@ function showFuseboxWarningsMigrationMessageOnce() {
|
|
|
493
492
|
return;
|
|
494
493
|
}
|
|
495
494
|
hasShownFuseboxWarningsMigrationMessage = true;
|
|
495
|
+
|
|
496
|
+
const NativeDevSettings =
|
|
497
|
+
require('../../NativeModules/specs/NativeDevSettings').default;
|
|
498
|
+
|
|
496
499
|
appendNewLog(
|
|
497
500
|
new LogBoxLog({
|
|
498
501
|
level: 'warn',
|
package/Libraries/Modal/Modal.js
CHANGED
|
@@ -292,7 +292,7 @@ class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
292
292
|
backgroundColor:
|
|
293
293
|
this.props.transparent === true
|
|
294
294
|
? 'transparent'
|
|
295
|
-
: this.props.backdropColor ?? 'white',
|
|
295
|
+
: (this.props.backdropColor ?? 'white'),
|
|
296
296
|
};
|
|
297
297
|
|
|
298
298
|
let animationType = this.props.animationType || 'none';
|
|
@@ -34,6 +34,9 @@ const RCTNetworking = require('./RCTNetworking').default;
|
|
|
34
34
|
const base64 = require('base64-js');
|
|
35
35
|
const invariant = require('invariant');
|
|
36
36
|
|
|
37
|
+
const PERFORMANCE_TRACK_NAME = 'Network (JS-initiated only)';
|
|
38
|
+
const PERFORMANCE_TRACK_GROUP = 'Chrome DevTools Temp Compat';
|
|
39
|
+
|
|
37
40
|
declare var performance: Performance;
|
|
38
41
|
|
|
39
42
|
const DEBUG_NETWORK_SEND_DELAY: false = false; // Set to a number of milliseconds when debugging
|
|
@@ -385,6 +388,9 @@ class XMLHttpRequest extends EventTarget {
|
|
|
385
388
|
if (requestId !== this._requestId) {
|
|
386
389
|
return;
|
|
387
390
|
}
|
|
391
|
+
|
|
392
|
+
const start = XMLHttpRequest._profiling ? performance.now() : undefined;
|
|
393
|
+
|
|
388
394
|
if (!this._response) {
|
|
389
395
|
this._response = responseText;
|
|
390
396
|
} else {
|
|
@@ -392,8 +398,12 @@ class XMLHttpRequest extends EventTarget {
|
|
|
392
398
|
}
|
|
393
399
|
|
|
394
400
|
if (XMLHttpRequest._profiling) {
|
|
395
|
-
|
|
396
|
-
'
|
|
401
|
+
console.timeStamp(
|
|
402
|
+
'Incremental Data: ' + this._getMeasureURL(),
|
|
403
|
+
start,
|
|
404
|
+
undefined,
|
|
405
|
+
PERFORMANCE_TRACK_NAME,
|
|
406
|
+
PERFORMANCE_TRACK_GROUP,
|
|
397
407
|
);
|
|
398
408
|
}
|
|
399
409
|
XMLHttpRequest._interceptor &&
|
|
@@ -442,10 +452,13 @@ class XMLHttpRequest extends EventTarget {
|
|
|
442
452
|
this.setReadyState(this.DONE);
|
|
443
453
|
if (XMLHttpRequest._profiling && this._startTime != null) {
|
|
444
454
|
const start = this._startTime;
|
|
445
|
-
|
|
455
|
+
console.timeStamp(
|
|
456
|
+
this._getMeasureURL(),
|
|
446
457
|
start,
|
|
447
|
-
|
|
448
|
-
|
|
458
|
+
undefined,
|
|
459
|
+
PERFORMANCE_TRACK_NAME,
|
|
460
|
+
PERFORMANCE_TRACK_GROUP,
|
|
461
|
+
);
|
|
449
462
|
}
|
|
450
463
|
if (error) {
|
|
451
464
|
XMLHttpRequest._interceptor &&
|
|
@@ -16,8 +16,8 @@ import type {
|
|
|
16
16
|
MouseEvent,
|
|
17
17
|
} from '../Types/CoreEventTypes';
|
|
18
18
|
|
|
19
|
+
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
19
20
|
import SoundManager from '../Components/Sound/SoundManager';
|
|
20
|
-
import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags';
|
|
21
21
|
import UIManager from '../ReactNative/UIManager';
|
|
22
22
|
import {type RectOrSize, normalizeRect} from '../StyleSheet/Rect';
|
|
23
23
|
import {type PointerEvent} from '../Types/CoreEventTypes';
|
|
@@ -17,8 +17,8 @@ import type {
|
|
|
17
17
|
MouseEvent,
|
|
18
18
|
} from '../Types/CoreEventTypes';
|
|
19
19
|
|
|
20
|
+
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
20
21
|
import SoundManager from '../Components/Sound/SoundManager';
|
|
21
|
-
import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags';
|
|
22
22
|
import UIManager from '../ReactNative/UIManager';
|
|
23
23
|
import {type RectOrSize, normalizeRect} from '../StyleSheet/Rect';
|
|
24
24
|
import {type PointerEvent} from '../Types/CoreEventTypes';
|
|
@@ -26,8 +26,6 @@ import createPerformanceLogger from '../Utilities/createPerformanceLogger';
|
|
|
26
26
|
import SceneTracker from '../Utilities/SceneTracker';
|
|
27
27
|
import {coerceDisplayMode} from './DisplayMode';
|
|
28
28
|
import HeadlessJsTaskError from './HeadlessJsTaskError';
|
|
29
|
-
import NativeHeadlessJsTaskSupport from './NativeHeadlessJsTaskSupport';
|
|
30
|
-
import renderApplication from './renderApplication';
|
|
31
29
|
import {unmountComponentAtNodeAndRemoveContainer} from './RendererProxy';
|
|
32
30
|
import invariant from 'invariant';
|
|
33
31
|
|
|
@@ -86,6 +84,7 @@ export function registerComponent(
|
|
|
86
84
|
): string {
|
|
87
85
|
const scopedPerformanceLogger = createPerformanceLogger();
|
|
88
86
|
runnables[appKey] = (appParameters, displayMode) => {
|
|
87
|
+
const renderApplication = require('./renderApplication').default;
|
|
89
88
|
renderApplication(
|
|
90
89
|
componentProviderInstrumentationHook(
|
|
91
90
|
componentProvider,
|
|
@@ -258,6 +257,9 @@ export function startHeadlessTask(
|
|
|
258
257
|
taskKey: string,
|
|
259
258
|
data: any,
|
|
260
259
|
): void {
|
|
260
|
+
const NativeHeadlessJsTaskSupport =
|
|
261
|
+
require('./NativeHeadlessJsTaskSupport').default;
|
|
262
|
+
|
|
261
263
|
const taskProvider = taskProviders.get(taskKey);
|
|
262
264
|
if (!taskProvider) {
|
|
263
265
|
console.warn(`No task registered for key ${taskKey}`);
|