@expo/cli 54.1.0-canary-20251013-623c5a6 → 54.1.0-canary-20251023-4c86f95
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/build/bin/cli +1 -1
- package/build/src/export/embed/exportEmbedAsync.js +43 -3
- package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
- package/build/src/export/embed/resolveOptions.js.map +1 -1
- package/build/src/export/index.js +2 -1
- package/build/src/export/index.js.map +1 -1
- package/build/src/export/resolveOptions.js +1 -1
- package/build/src/export/resolveOptions.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +29 -9
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +2 -4
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
- package/build/src/start/server/metro/externals.js +0 -11
- package/build/src/start/server/metro/externals.js.map +1 -1
- package/build/src/start/server/metro/fetchRouterManifest.js +1 -1
- package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
- package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +14 -10
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/log-box/LogBoxLog.js +11 -7
- package/build/src/start/server/metro/log-box/LogBoxLog.js.map +1 -1
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.js +14 -43
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +55 -43
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/middleware/metroOptions.js.map +1 -1
- package/build/src/start/server/serverLogLikeMetro.js +1 -1
- package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
- package/build/src/utils/env.js +6 -0
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/package.json +20 -18
- package/static/canary/react-is/cjs/react-is.development.js +0 -133
- package/static/canary/react-is/cjs/react-is.production.js +0 -130
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +0 -16820
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +0 -10552
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +0 -11255
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +0 -17064
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +0 -10742
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +0 -11450
- package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +0 -414
- package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -406
- package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +0 -150
- package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -140
- package/static/canary/scheduler/cjs/scheduler.development.js +0 -364
- package/static/canary/scheduler/cjs/scheduler.native.development.js +0 -350
- package/static/canary/scheduler/cjs/scheduler.native.production.js +0 -330
- package/static/canary/scheduler/cjs/scheduler.production.js +0 -340
- package/static/canary-full/node_modules/react/LICENSE +0 -21
- package/static/canary-full/node_modules/react/README.md +0 -37
- package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.development.js +0 -24
- package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.production.js +0 -16
- package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.profiling.js +0 -16
- package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.development.js +0 -349
- package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.production.js +0 -14
- package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.profiling.js +0 -14
- package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.react-server.development.js +0 -385
- package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js +0 -40
- package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.development.js +0 -358
- package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.production.js +0 -34
- package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.profiling.js +0 -34
- package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.react-server.development.js +0 -385
- package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.react-server.production.js +0 -40
- package/static/canary-full/node_modules/react/cjs/react.development.js +0 -1250
- package/static/canary-full/node_modules/react/cjs/react.production.js +0 -544
- package/static/canary-full/node_modules/react/cjs/react.react-server.development.js +0 -815
- package/static/canary-full/node_modules/react/cjs/react.react-server.production.js +0 -429
- package/static/canary-full/node_modules/react/compiler-runtime.js +0 -14
- package/static/canary-full/node_modules/react/index.js +0 -7
- package/static/canary-full/node_modules/react/jsx-dev-runtime.js +0 -7
- package/static/canary-full/node_modules/react/jsx-dev-runtime.react-server.js +0 -7
- package/static/canary-full/node_modules/react/jsx-runtime.js +0 -7
- package/static/canary-full/node_modules/react/jsx-runtime.react-server.js +0 -7
- package/static/canary-full/node_modules/react/package.json +0 -51
- package/static/canary-full/node_modules/react/react.react-server.js +0 -7
- package/static/canary-full/node_modules/react-dom/LICENSE +0 -21
- package/static/canary-full/node_modules/react-dom/README.md +0 -60
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-client.development.js +0 -25089
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-client.production.js +0 -15426
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-profiling.development.js +0 -25476
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-profiling.profiling.js +0 -16296
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -9035
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +0 -5892
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js +0 -9035
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +0 -5972
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -9424
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.browser.production.js +0 -6384
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.bun.development.js +0 -8739
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.bun.production.js +0 -5967
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.edge.development.js +0 -9443
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.edge.production.js +0 -6477
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.node.development.js +0 -9317
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.node.production.js +0 -6372
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-test-utils.development.js +0 -24
- package/static/canary-full/node_modules/react-dom/cjs/react-dom-test-utils.production.js +0 -21
- package/static/canary-full/node_modules/react-dom/cjs/react-dom.development.js +0 -424
- package/static/canary-full/node_modules/react-dom/cjs/react-dom.production.js +0 -210
- package/static/canary-full/node_modules/react-dom/cjs/react-dom.react-server.development.js +0 -340
- package/static/canary-full/node_modules/react-dom/cjs/react-dom.react-server.production.js +0 -152
- package/static/canary-full/node_modules/react-dom/client.js +0 -38
- package/static/canary-full/node_modules/react-dom/client.react-server.js +0 -5
- package/static/canary-full/node_modules/react-dom/index.js +0 -38
- package/static/canary-full/node_modules/react-dom/package.json +0 -117
- package/static/canary-full/node_modules/react-dom/profiling.js +0 -38
- package/static/canary-full/node_modules/react-dom/profiling.react-server.js +0 -5
- package/static/canary-full/node_modules/react-dom/react-dom.react-server.js +0 -7
- package/static/canary-full/node_modules/react-dom/server.browser.js +0 -18
- package/static/canary-full/node_modules/react-dom/server.bun.js +0 -19
- package/static/canary-full/node_modules/react-dom/server.edge.js +0 -19
- package/static/canary-full/node_modules/react-dom/server.js +0 -3
- package/static/canary-full/node_modules/react-dom/server.node.js +0 -18
- package/static/canary-full/node_modules/react-dom/server.react-server.js +0 -5
- package/static/canary-full/node_modules/react-dom/static.browser.js +0 -12
- package/static/canary-full/node_modules/react-dom/static.edge.js +0 -12
- package/static/canary-full/node_modules/react-dom/static.js +0 -3
- package/static/canary-full/node_modules/react-dom/static.node.js +0 -12
- package/static/canary-full/node_modules/react-dom/static.react-server.js +0 -5
- package/static/canary-full/node_modules/react-dom/test-utils.js +0 -7
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license React
|
|
3
|
-
* scheduler.development.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
"use strict";
|
|
12
|
-
"production" !== process.env.NODE_ENV &&
|
|
13
|
-
(function () {
|
|
14
|
-
function performWorkUntilDeadline() {
|
|
15
|
-
needsPaint = !1;
|
|
16
|
-
if (isMessageLoopRunning) {
|
|
17
|
-
var currentTime = exports.unstable_now();
|
|
18
|
-
startTime = currentTime;
|
|
19
|
-
var hasMoreWork = !0;
|
|
20
|
-
try {
|
|
21
|
-
a: {
|
|
22
|
-
isHostCallbackScheduled = !1;
|
|
23
|
-
isHostTimeoutScheduled &&
|
|
24
|
-
((isHostTimeoutScheduled = !1),
|
|
25
|
-
localClearTimeout(taskTimeoutID),
|
|
26
|
-
(taskTimeoutID = -1));
|
|
27
|
-
isPerformingWork = !0;
|
|
28
|
-
var previousPriorityLevel = currentPriorityLevel;
|
|
29
|
-
try {
|
|
30
|
-
b: {
|
|
31
|
-
advanceTimers(currentTime);
|
|
32
|
-
for (
|
|
33
|
-
currentTask = peek(taskQueue);
|
|
34
|
-
null !== currentTask &&
|
|
35
|
-
!(
|
|
36
|
-
currentTask.expirationTime > currentTime &&
|
|
37
|
-
shouldYieldToHost()
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
) {
|
|
41
|
-
var callback = currentTask.callback;
|
|
42
|
-
if ("function" === typeof callback) {
|
|
43
|
-
currentTask.callback = null;
|
|
44
|
-
currentPriorityLevel = currentTask.priorityLevel;
|
|
45
|
-
var continuationCallback = callback(
|
|
46
|
-
currentTask.expirationTime <= currentTime
|
|
47
|
-
);
|
|
48
|
-
currentTime = exports.unstable_now();
|
|
49
|
-
if ("function" === typeof continuationCallback) {
|
|
50
|
-
currentTask.callback = continuationCallback;
|
|
51
|
-
advanceTimers(currentTime);
|
|
52
|
-
hasMoreWork = !0;
|
|
53
|
-
break b;
|
|
54
|
-
}
|
|
55
|
-
currentTask === peek(taskQueue) && pop(taskQueue);
|
|
56
|
-
advanceTimers(currentTime);
|
|
57
|
-
} else pop(taskQueue);
|
|
58
|
-
currentTask = peek(taskQueue);
|
|
59
|
-
}
|
|
60
|
-
if (null !== currentTask) hasMoreWork = !0;
|
|
61
|
-
else {
|
|
62
|
-
var firstTimer = peek(timerQueue);
|
|
63
|
-
null !== firstTimer &&
|
|
64
|
-
requestHostTimeout(
|
|
65
|
-
handleTimeout,
|
|
66
|
-
firstTimer.startTime - currentTime
|
|
67
|
-
);
|
|
68
|
-
hasMoreWork = !1;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
break a;
|
|
72
|
-
} finally {
|
|
73
|
-
(currentTask = null),
|
|
74
|
-
(currentPriorityLevel = previousPriorityLevel),
|
|
75
|
-
(isPerformingWork = !1);
|
|
76
|
-
}
|
|
77
|
-
hasMoreWork = void 0;
|
|
78
|
-
}
|
|
79
|
-
} finally {
|
|
80
|
-
hasMoreWork
|
|
81
|
-
? schedulePerformWorkUntilDeadline()
|
|
82
|
-
: (isMessageLoopRunning = !1);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function push(heap, node) {
|
|
87
|
-
var index = heap.length;
|
|
88
|
-
heap.push(node);
|
|
89
|
-
a: for (; 0 < index; ) {
|
|
90
|
-
var parentIndex = (index - 1) >>> 1,
|
|
91
|
-
parent = heap[parentIndex];
|
|
92
|
-
if (0 < compare(parent, node))
|
|
93
|
-
(heap[parentIndex] = node),
|
|
94
|
-
(heap[index] = parent),
|
|
95
|
-
(index = parentIndex);
|
|
96
|
-
else break a;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function peek(heap) {
|
|
100
|
-
return 0 === heap.length ? null : heap[0];
|
|
101
|
-
}
|
|
102
|
-
function pop(heap) {
|
|
103
|
-
if (0 === heap.length) return null;
|
|
104
|
-
var first = heap[0],
|
|
105
|
-
last = heap.pop();
|
|
106
|
-
if (last !== first) {
|
|
107
|
-
heap[0] = last;
|
|
108
|
-
a: for (
|
|
109
|
-
var index = 0, length = heap.length, halfLength = length >>> 1;
|
|
110
|
-
index < halfLength;
|
|
111
|
-
|
|
112
|
-
) {
|
|
113
|
-
var leftIndex = 2 * (index + 1) - 1,
|
|
114
|
-
left = heap[leftIndex],
|
|
115
|
-
rightIndex = leftIndex + 1,
|
|
116
|
-
right = heap[rightIndex];
|
|
117
|
-
if (0 > compare(left, last))
|
|
118
|
-
rightIndex < length && 0 > compare(right, left)
|
|
119
|
-
? ((heap[index] = right),
|
|
120
|
-
(heap[rightIndex] = last),
|
|
121
|
-
(index = rightIndex))
|
|
122
|
-
: ((heap[index] = left),
|
|
123
|
-
(heap[leftIndex] = last),
|
|
124
|
-
(index = leftIndex));
|
|
125
|
-
else if (rightIndex < length && 0 > compare(right, last))
|
|
126
|
-
(heap[index] = right),
|
|
127
|
-
(heap[rightIndex] = last),
|
|
128
|
-
(index = rightIndex);
|
|
129
|
-
else break a;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return first;
|
|
133
|
-
}
|
|
134
|
-
function compare(a, b) {
|
|
135
|
-
var diff = a.sortIndex - b.sortIndex;
|
|
136
|
-
return 0 !== diff ? diff : a.id - b.id;
|
|
137
|
-
}
|
|
138
|
-
function advanceTimers(currentTime) {
|
|
139
|
-
for (var timer = peek(timerQueue); null !== timer; ) {
|
|
140
|
-
if (null === timer.callback) pop(timerQueue);
|
|
141
|
-
else if (timer.startTime <= currentTime)
|
|
142
|
-
pop(timerQueue),
|
|
143
|
-
(timer.sortIndex = timer.expirationTime),
|
|
144
|
-
push(taskQueue, timer);
|
|
145
|
-
else break;
|
|
146
|
-
timer = peek(timerQueue);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
function handleTimeout(currentTime) {
|
|
150
|
-
isHostTimeoutScheduled = !1;
|
|
151
|
-
advanceTimers(currentTime);
|
|
152
|
-
if (!isHostCallbackScheduled)
|
|
153
|
-
if (null !== peek(taskQueue))
|
|
154
|
-
(isHostCallbackScheduled = !0),
|
|
155
|
-
isMessageLoopRunning ||
|
|
156
|
-
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
|
|
157
|
-
else {
|
|
158
|
-
var firstTimer = peek(timerQueue);
|
|
159
|
-
null !== firstTimer &&
|
|
160
|
-
requestHostTimeout(
|
|
161
|
-
handleTimeout,
|
|
162
|
-
firstTimer.startTime - currentTime
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function shouldYieldToHost() {
|
|
167
|
-
return needsPaint
|
|
168
|
-
? !0
|
|
169
|
-
: exports.unstable_now() - startTime < frameInterval
|
|
170
|
-
? !1
|
|
171
|
-
: !0;
|
|
172
|
-
}
|
|
173
|
-
function requestHostTimeout(callback, ms) {
|
|
174
|
-
taskTimeoutID = localSetTimeout(function () {
|
|
175
|
-
callback(exports.unstable_now());
|
|
176
|
-
}, ms);
|
|
177
|
-
}
|
|
178
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
179
|
-
"function" ===
|
|
180
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
|
|
181
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
182
|
-
exports.unstable_now = void 0;
|
|
183
|
-
if (
|
|
184
|
-
"object" === typeof performance &&
|
|
185
|
-
"function" === typeof performance.now
|
|
186
|
-
) {
|
|
187
|
-
var localPerformance = performance;
|
|
188
|
-
exports.unstable_now = function () {
|
|
189
|
-
return localPerformance.now();
|
|
190
|
-
};
|
|
191
|
-
} else {
|
|
192
|
-
var localDate = Date,
|
|
193
|
-
initialTime = localDate.now();
|
|
194
|
-
exports.unstable_now = function () {
|
|
195
|
-
return localDate.now() - initialTime;
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
var taskQueue = [],
|
|
199
|
-
timerQueue = [],
|
|
200
|
-
taskIdCounter = 1,
|
|
201
|
-
currentTask = null,
|
|
202
|
-
currentPriorityLevel = 3,
|
|
203
|
-
isPerformingWork = !1,
|
|
204
|
-
isHostCallbackScheduled = !1,
|
|
205
|
-
isHostTimeoutScheduled = !1,
|
|
206
|
-
needsPaint = !1,
|
|
207
|
-
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
|
|
208
|
-
localClearTimeout =
|
|
209
|
-
"function" === typeof clearTimeout ? clearTimeout : null,
|
|
210
|
-
localSetImmediate =
|
|
211
|
-
"undefined" !== typeof setImmediate ? setImmediate : null,
|
|
212
|
-
isMessageLoopRunning = !1,
|
|
213
|
-
taskTimeoutID = -1,
|
|
214
|
-
frameInterval = 5,
|
|
215
|
-
startTime = -1;
|
|
216
|
-
if ("function" === typeof localSetImmediate)
|
|
217
|
-
var schedulePerformWorkUntilDeadline = function () {
|
|
218
|
-
localSetImmediate(performWorkUntilDeadline);
|
|
219
|
-
};
|
|
220
|
-
else if ("undefined" !== typeof MessageChannel) {
|
|
221
|
-
var channel = new MessageChannel(),
|
|
222
|
-
port = channel.port2;
|
|
223
|
-
channel.port1.onmessage = performWorkUntilDeadline;
|
|
224
|
-
schedulePerformWorkUntilDeadline = function () {
|
|
225
|
-
port.postMessage(null);
|
|
226
|
-
};
|
|
227
|
-
} else
|
|
228
|
-
schedulePerformWorkUntilDeadline = function () {
|
|
229
|
-
localSetTimeout(performWorkUntilDeadline, 0);
|
|
230
|
-
};
|
|
231
|
-
exports.unstable_IdlePriority = 5;
|
|
232
|
-
exports.unstable_ImmediatePriority = 1;
|
|
233
|
-
exports.unstable_LowPriority = 4;
|
|
234
|
-
exports.unstable_NormalPriority = 3;
|
|
235
|
-
exports.unstable_Profiling = null;
|
|
236
|
-
exports.unstable_UserBlockingPriority = 2;
|
|
237
|
-
exports.unstable_cancelCallback = function (task) {
|
|
238
|
-
task.callback = null;
|
|
239
|
-
};
|
|
240
|
-
exports.unstable_forceFrameRate = function (fps) {
|
|
241
|
-
0 > fps || 125 < fps
|
|
242
|
-
? console.error(
|
|
243
|
-
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
|
|
244
|
-
)
|
|
245
|
-
: (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
|
|
246
|
-
};
|
|
247
|
-
exports.unstable_getCurrentPriorityLevel = function () {
|
|
248
|
-
return currentPriorityLevel;
|
|
249
|
-
};
|
|
250
|
-
exports.unstable_next = function (eventHandler) {
|
|
251
|
-
switch (currentPriorityLevel) {
|
|
252
|
-
case 1:
|
|
253
|
-
case 2:
|
|
254
|
-
case 3:
|
|
255
|
-
var priorityLevel = 3;
|
|
256
|
-
break;
|
|
257
|
-
default:
|
|
258
|
-
priorityLevel = currentPriorityLevel;
|
|
259
|
-
}
|
|
260
|
-
var previousPriorityLevel = currentPriorityLevel;
|
|
261
|
-
currentPriorityLevel = priorityLevel;
|
|
262
|
-
try {
|
|
263
|
-
return eventHandler();
|
|
264
|
-
} finally {
|
|
265
|
-
currentPriorityLevel = previousPriorityLevel;
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
exports.unstable_requestPaint = function () {
|
|
269
|
-
needsPaint = !0;
|
|
270
|
-
};
|
|
271
|
-
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
|
|
272
|
-
switch (priorityLevel) {
|
|
273
|
-
case 1:
|
|
274
|
-
case 2:
|
|
275
|
-
case 3:
|
|
276
|
-
case 4:
|
|
277
|
-
case 5:
|
|
278
|
-
break;
|
|
279
|
-
default:
|
|
280
|
-
priorityLevel = 3;
|
|
281
|
-
}
|
|
282
|
-
var previousPriorityLevel = currentPriorityLevel;
|
|
283
|
-
currentPriorityLevel = priorityLevel;
|
|
284
|
-
try {
|
|
285
|
-
return eventHandler();
|
|
286
|
-
} finally {
|
|
287
|
-
currentPriorityLevel = previousPriorityLevel;
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
exports.unstable_scheduleCallback = function (
|
|
291
|
-
priorityLevel,
|
|
292
|
-
callback,
|
|
293
|
-
options
|
|
294
|
-
) {
|
|
295
|
-
var currentTime = exports.unstable_now();
|
|
296
|
-
"object" === typeof options && null !== options
|
|
297
|
-
? ((options = options.delay),
|
|
298
|
-
(options =
|
|
299
|
-
"number" === typeof options && 0 < options
|
|
300
|
-
? currentTime + options
|
|
301
|
-
: currentTime))
|
|
302
|
-
: (options = currentTime);
|
|
303
|
-
switch (priorityLevel) {
|
|
304
|
-
case 1:
|
|
305
|
-
var timeout = -1;
|
|
306
|
-
break;
|
|
307
|
-
case 2:
|
|
308
|
-
timeout = 250;
|
|
309
|
-
break;
|
|
310
|
-
case 5:
|
|
311
|
-
timeout = 1073741823;
|
|
312
|
-
break;
|
|
313
|
-
case 4:
|
|
314
|
-
timeout = 1e4;
|
|
315
|
-
break;
|
|
316
|
-
default:
|
|
317
|
-
timeout = 5e3;
|
|
318
|
-
}
|
|
319
|
-
timeout = options + timeout;
|
|
320
|
-
priorityLevel = {
|
|
321
|
-
id: taskIdCounter++,
|
|
322
|
-
callback: callback,
|
|
323
|
-
priorityLevel: priorityLevel,
|
|
324
|
-
startTime: options,
|
|
325
|
-
expirationTime: timeout,
|
|
326
|
-
sortIndex: -1
|
|
327
|
-
};
|
|
328
|
-
options > currentTime
|
|
329
|
-
? ((priorityLevel.sortIndex = options),
|
|
330
|
-
push(timerQueue, priorityLevel),
|
|
331
|
-
null === peek(taskQueue) &&
|
|
332
|
-
priorityLevel === peek(timerQueue) &&
|
|
333
|
-
(isHostTimeoutScheduled
|
|
334
|
-
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
|
|
335
|
-
: (isHostTimeoutScheduled = !0),
|
|
336
|
-
requestHostTimeout(handleTimeout, options - currentTime)))
|
|
337
|
-
: ((priorityLevel.sortIndex = timeout),
|
|
338
|
-
push(taskQueue, priorityLevel),
|
|
339
|
-
isHostCallbackScheduled ||
|
|
340
|
-
isPerformingWork ||
|
|
341
|
-
((isHostCallbackScheduled = !0),
|
|
342
|
-
isMessageLoopRunning ||
|
|
343
|
-
((isMessageLoopRunning = !0),
|
|
344
|
-
schedulePerformWorkUntilDeadline())));
|
|
345
|
-
return priorityLevel;
|
|
346
|
-
};
|
|
347
|
-
exports.unstable_shouldYield = shouldYieldToHost;
|
|
348
|
-
exports.unstable_wrapCallback = function (callback) {
|
|
349
|
-
var parentPriorityLevel = currentPriorityLevel;
|
|
350
|
-
return function () {
|
|
351
|
-
var previousPriorityLevel = currentPriorityLevel;
|
|
352
|
-
currentPriorityLevel = parentPriorityLevel;
|
|
353
|
-
try {
|
|
354
|
-
return callback.apply(this, arguments);
|
|
355
|
-
} finally {
|
|
356
|
-
currentPriorityLevel = previousPriorityLevel;
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
361
|
-
"function" ===
|
|
362
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
|
363
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
364
|
-
})();
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license React
|
|
3
|
-
* scheduler.native.development.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
"use strict";
|
|
12
|
-
"production" !== process.env.NODE_ENV &&
|
|
13
|
-
(function () {
|
|
14
|
-
function performWorkUntilDeadline() {
|
|
15
|
-
needsPaint = !1;
|
|
16
|
-
if (isMessageLoopRunning) {
|
|
17
|
-
var currentTime = getCurrentTime();
|
|
18
|
-
startTime = currentTime;
|
|
19
|
-
var hasMoreWork = !0;
|
|
20
|
-
try {
|
|
21
|
-
a: {
|
|
22
|
-
isHostCallbackScheduled = !1;
|
|
23
|
-
isHostTimeoutScheduled &&
|
|
24
|
-
((isHostTimeoutScheduled = !1),
|
|
25
|
-
localClearTimeout(taskTimeoutID),
|
|
26
|
-
(taskTimeoutID = -1));
|
|
27
|
-
isPerformingWork = !0;
|
|
28
|
-
var previousPriorityLevel = currentPriorityLevel;
|
|
29
|
-
try {
|
|
30
|
-
b: {
|
|
31
|
-
advanceTimers(currentTime);
|
|
32
|
-
for (
|
|
33
|
-
currentTask = peek(taskQueue);
|
|
34
|
-
null !== currentTask &&
|
|
35
|
-
!(
|
|
36
|
-
currentTask.expirationTime > currentTime &&
|
|
37
|
-
shouldYieldToHost()
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
) {
|
|
41
|
-
var callback = currentTask.callback;
|
|
42
|
-
if ("function" === typeof callback) {
|
|
43
|
-
currentTask.callback = null;
|
|
44
|
-
currentPriorityLevel = currentTask.priorityLevel;
|
|
45
|
-
var continuationCallback = callback(
|
|
46
|
-
currentTask.expirationTime <= currentTime
|
|
47
|
-
);
|
|
48
|
-
currentTime = getCurrentTime();
|
|
49
|
-
if ("function" === typeof continuationCallback) {
|
|
50
|
-
currentTask.callback = continuationCallback;
|
|
51
|
-
advanceTimers(currentTime);
|
|
52
|
-
hasMoreWork = !0;
|
|
53
|
-
break b;
|
|
54
|
-
}
|
|
55
|
-
currentTask === peek(taskQueue) && pop(taskQueue);
|
|
56
|
-
advanceTimers(currentTime);
|
|
57
|
-
} else pop(taskQueue);
|
|
58
|
-
currentTask = peek(taskQueue);
|
|
59
|
-
}
|
|
60
|
-
if (null !== currentTask) hasMoreWork = !0;
|
|
61
|
-
else {
|
|
62
|
-
var firstTimer = peek(timerQueue);
|
|
63
|
-
null !== firstTimer &&
|
|
64
|
-
requestHostTimeout(
|
|
65
|
-
handleTimeout,
|
|
66
|
-
firstTimer.startTime - currentTime
|
|
67
|
-
);
|
|
68
|
-
hasMoreWork = !1;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
break a;
|
|
72
|
-
} finally {
|
|
73
|
-
(currentTask = null),
|
|
74
|
-
(currentPriorityLevel = previousPriorityLevel),
|
|
75
|
-
(isPerformingWork = !1);
|
|
76
|
-
}
|
|
77
|
-
hasMoreWork = void 0;
|
|
78
|
-
}
|
|
79
|
-
} finally {
|
|
80
|
-
hasMoreWork
|
|
81
|
-
? schedulePerformWorkUntilDeadline()
|
|
82
|
-
: (isMessageLoopRunning = !1);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function push(heap, node) {
|
|
87
|
-
var index = heap.length;
|
|
88
|
-
heap.push(node);
|
|
89
|
-
a: for (; 0 < index; ) {
|
|
90
|
-
var parentIndex = (index - 1) >>> 1,
|
|
91
|
-
parent = heap[parentIndex];
|
|
92
|
-
if (0 < compare(parent, node))
|
|
93
|
-
(heap[parentIndex] = node),
|
|
94
|
-
(heap[index] = parent),
|
|
95
|
-
(index = parentIndex);
|
|
96
|
-
else break a;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function peek(heap) {
|
|
100
|
-
return 0 === heap.length ? null : heap[0];
|
|
101
|
-
}
|
|
102
|
-
function pop(heap) {
|
|
103
|
-
if (0 === heap.length) return null;
|
|
104
|
-
var first = heap[0],
|
|
105
|
-
last = heap.pop();
|
|
106
|
-
if (last !== first) {
|
|
107
|
-
heap[0] = last;
|
|
108
|
-
a: for (
|
|
109
|
-
var index = 0, length = heap.length, halfLength = length >>> 1;
|
|
110
|
-
index < halfLength;
|
|
111
|
-
|
|
112
|
-
) {
|
|
113
|
-
var leftIndex = 2 * (index + 1) - 1,
|
|
114
|
-
left = heap[leftIndex],
|
|
115
|
-
rightIndex = leftIndex + 1,
|
|
116
|
-
right = heap[rightIndex];
|
|
117
|
-
if (0 > compare(left, last))
|
|
118
|
-
rightIndex < length && 0 > compare(right, left)
|
|
119
|
-
? ((heap[index] = right),
|
|
120
|
-
(heap[rightIndex] = last),
|
|
121
|
-
(index = rightIndex))
|
|
122
|
-
: ((heap[index] = left),
|
|
123
|
-
(heap[leftIndex] = last),
|
|
124
|
-
(index = leftIndex));
|
|
125
|
-
else if (rightIndex < length && 0 > compare(right, last))
|
|
126
|
-
(heap[index] = right),
|
|
127
|
-
(heap[rightIndex] = last),
|
|
128
|
-
(index = rightIndex);
|
|
129
|
-
else break a;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return first;
|
|
133
|
-
}
|
|
134
|
-
function compare(a, b) {
|
|
135
|
-
var diff = a.sortIndex - b.sortIndex;
|
|
136
|
-
return 0 !== diff ? diff : a.id - b.id;
|
|
137
|
-
}
|
|
138
|
-
function advanceTimers(currentTime) {
|
|
139
|
-
for (var timer = peek(timerQueue); null !== timer; ) {
|
|
140
|
-
if (null === timer.callback) pop(timerQueue);
|
|
141
|
-
else if (timer.startTime <= currentTime)
|
|
142
|
-
pop(timerQueue),
|
|
143
|
-
(timer.sortIndex = timer.expirationTime),
|
|
144
|
-
push(taskQueue, timer);
|
|
145
|
-
else break;
|
|
146
|
-
timer = peek(timerQueue);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
function handleTimeout(currentTime) {
|
|
150
|
-
isHostTimeoutScheduled = !1;
|
|
151
|
-
advanceTimers(currentTime);
|
|
152
|
-
if (!isHostCallbackScheduled)
|
|
153
|
-
if (null !== peek(taskQueue))
|
|
154
|
-
(isHostCallbackScheduled = !0),
|
|
155
|
-
isMessageLoopRunning ||
|
|
156
|
-
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
|
|
157
|
-
else {
|
|
158
|
-
var firstTimer = peek(timerQueue);
|
|
159
|
-
null !== firstTimer &&
|
|
160
|
-
requestHostTimeout(
|
|
161
|
-
handleTimeout,
|
|
162
|
-
firstTimer.startTime - currentTime
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function unstable_scheduleCallback$1(priorityLevel, callback, options) {
|
|
167
|
-
var currentTime = getCurrentTime();
|
|
168
|
-
"object" === typeof options && null !== options
|
|
169
|
-
? ((options = options.delay),
|
|
170
|
-
(options =
|
|
171
|
-
"number" === typeof options && 0 < options
|
|
172
|
-
? currentTime + options
|
|
173
|
-
: currentTime))
|
|
174
|
-
: (options = currentTime);
|
|
175
|
-
switch (priorityLevel) {
|
|
176
|
-
case 1:
|
|
177
|
-
var timeout = -1;
|
|
178
|
-
break;
|
|
179
|
-
case 2:
|
|
180
|
-
timeout = 250;
|
|
181
|
-
break;
|
|
182
|
-
case 5:
|
|
183
|
-
timeout = 1073741823;
|
|
184
|
-
break;
|
|
185
|
-
case 4:
|
|
186
|
-
timeout = 1e4;
|
|
187
|
-
break;
|
|
188
|
-
default:
|
|
189
|
-
timeout = 5e3;
|
|
190
|
-
}
|
|
191
|
-
timeout = options + timeout;
|
|
192
|
-
priorityLevel = {
|
|
193
|
-
id: taskIdCounter++,
|
|
194
|
-
callback: callback,
|
|
195
|
-
priorityLevel: priorityLevel,
|
|
196
|
-
startTime: options,
|
|
197
|
-
expirationTime: timeout,
|
|
198
|
-
sortIndex: -1
|
|
199
|
-
};
|
|
200
|
-
options > currentTime
|
|
201
|
-
? ((priorityLevel.sortIndex = options),
|
|
202
|
-
push(timerQueue, priorityLevel),
|
|
203
|
-
null === peek(taskQueue) &&
|
|
204
|
-
priorityLevel === peek(timerQueue) &&
|
|
205
|
-
(isHostTimeoutScheduled
|
|
206
|
-
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
|
|
207
|
-
: (isHostTimeoutScheduled = !0),
|
|
208
|
-
requestHostTimeout(handleTimeout, options - currentTime)))
|
|
209
|
-
: ((priorityLevel.sortIndex = timeout),
|
|
210
|
-
push(taskQueue, priorityLevel),
|
|
211
|
-
isHostCallbackScheduled ||
|
|
212
|
-
isPerformingWork ||
|
|
213
|
-
((isHostCallbackScheduled = !0),
|
|
214
|
-
isMessageLoopRunning ||
|
|
215
|
-
((isMessageLoopRunning = !0),
|
|
216
|
-
schedulePerformWorkUntilDeadline())));
|
|
217
|
-
return priorityLevel;
|
|
218
|
-
}
|
|
219
|
-
function unstable_cancelCallback$1(task) {
|
|
220
|
-
task.callback = null;
|
|
221
|
-
}
|
|
222
|
-
function unstable_getCurrentPriorityLevel$1() {
|
|
223
|
-
return currentPriorityLevel;
|
|
224
|
-
}
|
|
225
|
-
function shouldYieldToHost() {
|
|
226
|
-
return needsPaint
|
|
227
|
-
? !0
|
|
228
|
-
: getCurrentTime() - startTime < frameInterval
|
|
229
|
-
? !1
|
|
230
|
-
: !0;
|
|
231
|
-
}
|
|
232
|
-
function requestPaint() {
|
|
233
|
-
needsPaint = !0;
|
|
234
|
-
}
|
|
235
|
-
function requestHostTimeout(callback, ms) {
|
|
236
|
-
taskTimeoutID = localSetTimeout(function () {
|
|
237
|
-
callback(getCurrentTime());
|
|
238
|
-
}, ms);
|
|
239
|
-
}
|
|
240
|
-
function throwNotImplemented() {
|
|
241
|
-
throw Error("Not implemented.");
|
|
242
|
-
}
|
|
243
|
-
if (
|
|
244
|
-
"object" === typeof performance &&
|
|
245
|
-
"function" === typeof performance.now
|
|
246
|
-
) {
|
|
247
|
-
var localPerformance = performance;
|
|
248
|
-
var getCurrentTime = function () {
|
|
249
|
-
return localPerformance.now();
|
|
250
|
-
};
|
|
251
|
-
} else {
|
|
252
|
-
var localDate = Date,
|
|
253
|
-
initialTime = localDate.now();
|
|
254
|
-
getCurrentTime = function () {
|
|
255
|
-
return localDate.now() - initialTime;
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
var taskQueue = [],
|
|
259
|
-
timerQueue = [],
|
|
260
|
-
taskIdCounter = 1,
|
|
261
|
-
currentTask = null,
|
|
262
|
-
currentPriorityLevel = 3,
|
|
263
|
-
isPerformingWork = !1,
|
|
264
|
-
isHostCallbackScheduled = !1,
|
|
265
|
-
isHostTimeoutScheduled = !1,
|
|
266
|
-
needsPaint = !1,
|
|
267
|
-
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
|
|
268
|
-
localClearTimeout =
|
|
269
|
-
"function" === typeof clearTimeout ? clearTimeout : null,
|
|
270
|
-
localSetImmediate =
|
|
271
|
-
"undefined" !== typeof setImmediate ? setImmediate : null,
|
|
272
|
-
isMessageLoopRunning = !1,
|
|
273
|
-
taskTimeoutID = -1,
|
|
274
|
-
frameInterval = 5,
|
|
275
|
-
startTime = -1;
|
|
276
|
-
if ("function" === typeof localSetImmediate)
|
|
277
|
-
var schedulePerformWorkUntilDeadline = function () {
|
|
278
|
-
localSetImmediate(performWorkUntilDeadline);
|
|
279
|
-
};
|
|
280
|
-
else if ("undefined" !== typeof MessageChannel) {
|
|
281
|
-
var channel = new MessageChannel(),
|
|
282
|
-
port = channel.port2;
|
|
283
|
-
channel.port1.onmessage = performWorkUntilDeadline;
|
|
284
|
-
schedulePerformWorkUntilDeadline = function () {
|
|
285
|
-
port.postMessage(null);
|
|
286
|
-
};
|
|
287
|
-
} else
|
|
288
|
-
schedulePerformWorkUntilDeadline = function () {
|
|
289
|
-
localSetTimeout(performWorkUntilDeadline, 0);
|
|
290
|
-
};
|
|
291
|
-
channel =
|
|
292
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
293
|
-
? nativeRuntimeScheduler.unstable_UserBlockingPriority
|
|
294
|
-
: 2;
|
|
295
|
-
var unstable_NormalPriority =
|
|
296
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
297
|
-
? nativeRuntimeScheduler.unstable_NormalPriority
|
|
298
|
-
: 3,
|
|
299
|
-
unstable_LowPriority =
|
|
300
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
301
|
-
? nativeRuntimeScheduler.unstable_LowPriority
|
|
302
|
-
: 4,
|
|
303
|
-
unstable_ImmediatePriority =
|
|
304
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
305
|
-
? nativeRuntimeScheduler.unstable_ImmediatePriority
|
|
306
|
-
: 1,
|
|
307
|
-
unstable_scheduleCallback =
|
|
308
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
309
|
-
? nativeRuntimeScheduler.unstable_scheduleCallback
|
|
310
|
-
: unstable_scheduleCallback$1,
|
|
311
|
-
unstable_cancelCallback =
|
|
312
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
313
|
-
? nativeRuntimeScheduler.unstable_cancelCallback
|
|
314
|
-
: unstable_cancelCallback$1,
|
|
315
|
-
unstable_getCurrentPriorityLevel =
|
|
316
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
317
|
-
? nativeRuntimeScheduler.unstable_getCurrentPriorityLevel
|
|
318
|
-
: unstable_getCurrentPriorityLevel$1,
|
|
319
|
-
unstable_shouldYield =
|
|
320
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
321
|
-
? nativeRuntimeScheduler.unstable_shouldYield
|
|
322
|
-
: shouldYieldToHost,
|
|
323
|
-
unstable_requestPaint =
|
|
324
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
325
|
-
? nativeRuntimeScheduler.unstable_requestPaint
|
|
326
|
-
: requestPaint,
|
|
327
|
-
unstable_now =
|
|
328
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
329
|
-
? nativeRuntimeScheduler.unstable_now
|
|
330
|
-
: getCurrentTime;
|
|
331
|
-
exports.unstable_IdlePriority =
|
|
332
|
-
"undefined" !== typeof nativeRuntimeScheduler
|
|
333
|
-
? nativeRuntimeScheduler.unstable_IdlePriority
|
|
334
|
-
: 5;
|
|
335
|
-
exports.unstable_ImmediatePriority = unstable_ImmediatePriority;
|
|
336
|
-
exports.unstable_LowPriority = unstable_LowPriority;
|
|
337
|
-
exports.unstable_NormalPriority = unstable_NormalPriority;
|
|
338
|
-
exports.unstable_Profiling = null;
|
|
339
|
-
exports.unstable_UserBlockingPriority = channel;
|
|
340
|
-
exports.unstable_cancelCallback = unstable_cancelCallback;
|
|
341
|
-
exports.unstable_forceFrameRate = throwNotImplemented;
|
|
342
|
-
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
|
|
343
|
-
exports.unstable_next = throwNotImplemented;
|
|
344
|
-
exports.unstable_now = unstable_now;
|
|
345
|
-
exports.unstable_requestPaint = unstable_requestPaint;
|
|
346
|
-
exports.unstable_runWithPriority = throwNotImplemented;
|
|
347
|
-
exports.unstable_scheduleCallback = unstable_scheduleCallback;
|
|
348
|
-
exports.unstable_shouldYield = unstable_shouldYield;
|
|
349
|
-
exports.unstable_wrapCallback = throwNotImplemented;
|
|
350
|
-
})();
|