@expo/cli 54.1.0-canary-20251023-4c86f95 → 54.1.0-canary-20260119-17896bf

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.
Files changed (186) hide show
  1. package/add-module.js +4 -1
  2. package/build/bin/cli +3 -1
  3. package/build/bin/cli.map +1 -1
  4. package/build/src/export/embed/exportEmbedAsync.js +1 -2
  5. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  6. package/build/src/install/applyPlugins.js +2 -1
  7. package/build/src/install/applyPlugins.js.map +1 -1
  8. package/build/src/install/fixPackages.js +1 -1
  9. package/build/src/install/fixPackages.js.map +1 -1
  10. package/build/src/install/installAsync.js +1 -1
  11. package/build/src/install/installAsync.js.map +1 -1
  12. package/build/src/install/utils/parsePackageSpecifier.js +24 -0
  13. package/build/src/install/utils/parsePackageSpecifier.js.map +1 -0
  14. package/build/src/run/ios/runIosAsync.js +8 -0
  15. package/build/src/run/ios/runIosAsync.js.map +1 -1
  16. package/build/src/start/interface/commandsTable.js.map +1 -1
  17. package/build/src/start/interface/interactiveActions.js +14 -9
  18. package/build/src/start/interface/interactiveActions.js.map +1 -1
  19. package/build/src/start/interface/startInterface.js +3 -0
  20. package/build/src/start/interface/startInterface.js.map +1 -1
  21. package/build/src/start/platforms/android/adb.js +1 -1
  22. package/build/src/start/platforms/android/adb.js.map +1 -1
  23. package/build/src/start/server/DevToolsPluginManager.js +8 -4
  24. package/build/src/start/server/DevToolsPluginManager.js.map +1 -1
  25. package/build/src/start/server/MCP.js +28 -5
  26. package/build/src/start/server/MCP.js.map +1 -1
  27. package/build/src/start/server/UrlCreator.js +1 -1
  28. package/build/src/start/server/UrlCreator.js.map +1 -1
  29. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js +10 -2
  30. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js.map +1 -1
  31. package/build/src/start/server/metro/MetroBundlerDevServer.js +29 -155
  32. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  33. package/build/src/start/server/metro/MetroTerminalReporter.js +151 -33
  34. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  35. package/build/src/start/server/metro/createExpoAutolinkingResolver.js +1 -3
  36. package/build/src/start/server/metro/createExpoAutolinkingResolver.js.map +1 -1
  37. package/build/src/start/server/metro/createExpoFallbackResolver.js +1 -3
  38. package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
  39. package/build/src/start/server/metro/createServerComponentsMiddleware.js +1 -2
  40. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  41. package/build/src/start/server/metro/createServerRouteMiddleware.js +2 -2
  42. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  43. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +23 -9
  44. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  45. package/build/src/start/server/metro/dev-server/compression.js +45 -0
  46. package/build/src/start/server/metro/dev-server/compression.js.map +1 -0
  47. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js +2 -2
  48. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js.map +1 -1
  49. package/build/src/start/server/metro/externals.js +11 -0
  50. package/build/src/start/server/metro/externals.js.map +1 -1
  51. package/build/src/start/server/metro/fetchRouterManifest.js +1 -1
  52. package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
  53. package/build/src/start/server/metro/instantiateMetro.js +98 -27
  54. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  55. package/build/src/start/server/metro/log-box/LogBoxLog.js +7 -11
  56. package/build/src/start/server/metro/log-box/LogBoxLog.js.map +1 -1
  57. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  58. package/build/src/start/server/metro/metroErrorInterface.js +43 -14
  59. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  60. package/build/src/start/server/metro/withMetroMultiPlatform.js +74 -57
  61. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  62. package/build/src/start/server/middleware/CorsMiddleware.js +43 -12
  63. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  64. package/build/src/start/server/middleware/CreateFileMiddleware.js +63 -24
  65. package/build/src/start/server/middleware/CreateFileMiddleware.js.map +1 -1
  66. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js +3 -1
  67. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js.map +1 -1
  68. package/build/src/start/server/middleware/ManifestMiddleware.js +14 -9
  69. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  70. package/build/src/start/startAsync.js +12 -9
  71. package/build/src/start/startAsync.js.map +1 -1
  72. package/build/src/utils/env.js +36 -2
  73. package/build/src/utils/env.js.map +1 -1
  74. package/build/src/utils/interactive.js +1 -1
  75. package/build/src/utils/interactive.js.map +1 -1
  76. package/build/src/utils/jsonl.js +243 -0
  77. package/build/src/utils/jsonl.js.map +1 -0
  78. package/build/src/utils/net.js +43 -0
  79. package/build/src/utils/net.js.map +1 -0
  80. package/build/src/utils/progress.js +5 -0
  81. package/build/src/utils/progress.js.map +1 -1
  82. package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
  83. package/build/src/utils/telemetry/utils/context.js +1 -1
  84. package/build/src/utils/url.js +4 -8
  85. package/build/src/utils/url.js.map +1 -1
  86. package/package.json +25 -28
  87. package/static/canary/react-is/cjs/react-is.development.js +133 -0
  88. package/static/canary/react-is/cjs/react-is.production.js +130 -0
  89. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +16820 -0
  90. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +10552 -0
  91. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +11255 -0
  92. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +17064 -0
  93. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +10742 -0
  94. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11450 -0
  95. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +414 -0
  96. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +406 -0
  97. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +150 -0
  98. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +140 -0
  99. package/static/canary/scheduler/cjs/scheduler.development.js +364 -0
  100. package/static/canary/scheduler/cjs/scheduler.native.development.js +350 -0
  101. package/static/canary/scheduler/cjs/scheduler.native.production.js +330 -0
  102. package/static/canary/scheduler/cjs/scheduler.production.js +340 -0
  103. package/static/canary-full/node_modules/react/LICENSE +21 -0
  104. package/static/canary-full/node_modules/react/README.md +37 -0
  105. package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.development.js +24 -0
  106. package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
  107. package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.profiling.js +16 -0
  108. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.development.js +349 -0
  109. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
  110. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.profiling.js +14 -0
  111. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.react-server.development.js +385 -0
  112. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js +40 -0
  113. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.development.js +358 -0
  114. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
  115. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.profiling.js +34 -0
  116. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.react-server.development.js +385 -0
  117. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.react-server.production.js +40 -0
  118. package/static/canary-full/node_modules/react/cjs/react.development.js +1250 -0
  119. package/static/canary-full/node_modules/react/cjs/react.production.js +544 -0
  120. package/static/canary-full/node_modules/react/cjs/react.react-server.development.js +815 -0
  121. package/static/canary-full/node_modules/react/cjs/react.react-server.production.js +429 -0
  122. package/static/canary-full/node_modules/react/compiler-runtime.js +14 -0
  123. package/static/canary-full/node_modules/react/index.js +7 -0
  124. package/static/canary-full/node_modules/react/jsx-dev-runtime.js +7 -0
  125. package/static/canary-full/node_modules/react/jsx-dev-runtime.react-server.js +7 -0
  126. package/static/canary-full/node_modules/react/jsx-runtime.js +7 -0
  127. package/static/canary-full/node_modules/react/jsx-runtime.react-server.js +7 -0
  128. package/static/canary-full/node_modules/react/package.json +51 -0
  129. package/static/canary-full/node_modules/react/react.react-server.js +7 -0
  130. package/static/canary-full/node_modules/react-dom/LICENSE +21 -0
  131. package/static/canary-full/node_modules/react-dom/README.md +60 -0
  132. package/static/canary-full/node_modules/react-dom/cjs/react-dom-client.development.js +25089 -0
  133. package/static/canary-full/node_modules/react-dom/cjs/react-dom-client.production.js +15426 -0
  134. package/static/canary-full/node_modules/react-dom/cjs/react-dom-profiling.development.js +25476 -0
  135. package/static/canary-full/node_modules/react-dom/cjs/react-dom-profiling.profiling.js +16296 -0
  136. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +9035 -0
  137. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +5892 -0
  138. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js +9035 -0
  139. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +5972 -0
  140. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.browser.development.js +9424 -0
  141. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.browser.production.js +6384 -0
  142. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.bun.development.js +8739 -0
  143. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.bun.production.js +5967 -0
  144. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.edge.development.js +9443 -0
  145. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.edge.production.js +6477 -0
  146. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.node.development.js +9317 -0
  147. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.node.production.js +6372 -0
  148. package/static/canary-full/node_modules/react-dom/cjs/react-dom-test-utils.development.js +24 -0
  149. package/static/canary-full/node_modules/react-dom/cjs/react-dom-test-utils.production.js +21 -0
  150. package/static/canary-full/node_modules/react-dom/cjs/react-dom.development.js +424 -0
  151. package/static/canary-full/node_modules/react-dom/cjs/react-dom.production.js +210 -0
  152. package/static/canary-full/node_modules/react-dom/cjs/react-dom.react-server.development.js +340 -0
  153. package/static/canary-full/node_modules/react-dom/cjs/react-dom.react-server.production.js +152 -0
  154. package/static/canary-full/node_modules/react-dom/client.js +38 -0
  155. package/static/canary-full/node_modules/react-dom/client.react-server.js +5 -0
  156. package/static/canary-full/node_modules/react-dom/index.js +38 -0
  157. package/static/canary-full/node_modules/react-dom/package.json +117 -0
  158. package/static/canary-full/node_modules/react-dom/profiling.js +38 -0
  159. package/static/canary-full/node_modules/react-dom/profiling.react-server.js +5 -0
  160. package/static/canary-full/node_modules/react-dom/react-dom.react-server.js +7 -0
  161. package/static/canary-full/node_modules/react-dom/server.browser.js +18 -0
  162. package/static/canary-full/node_modules/react-dom/server.bun.js +19 -0
  163. package/static/canary-full/node_modules/react-dom/server.edge.js +19 -0
  164. package/static/canary-full/node_modules/react-dom/server.js +3 -0
  165. package/static/canary-full/node_modules/react-dom/server.node.js +18 -0
  166. package/static/canary-full/node_modules/react-dom/server.react-server.js +5 -0
  167. package/static/canary-full/node_modules/react-dom/static.browser.js +12 -0
  168. package/static/canary-full/node_modules/react-dom/static.edge.js +12 -0
  169. package/static/canary-full/node_modules/react-dom/static.js +3 -0
  170. package/static/canary-full/node_modules/react-dom/static.node.js +12 -0
  171. package/static/canary-full/node_modules/react-dom/static.react-server.js +5 -0
  172. package/static/canary-full/node_modules/react-dom/test-utils.js +7 -0
  173. package/build/src/start/interface/cliExtensionMenuItemHandler.js +0 -173
  174. package/build/src/start/interface/cliExtensionMenuItemHandler.js.map +0 -1
  175. package/build/src/start/interface/createDevToolsMenuItems.js +0 -159
  176. package/build/src/start/interface/createDevToolsMenuItems.js.map +0 -1
  177. package/build/src/start/server/DevToolsPlugin.js +0 -60
  178. package/build/src/start/server/DevToolsPlugin.js.map +0 -1
  179. package/build/src/start/server/DevToolsPlugin.schema.js +0 -79
  180. package/build/src/start/server/DevToolsPlugin.schema.js.map +0 -1
  181. package/build/src/start/server/DevToolsPluginCliExtensionExecutor.js +0 -119
  182. package/build/src/start/server/DevToolsPluginCliExtensionExecutor.js.map +0 -1
  183. package/build/src/start/server/DevToolsPluginCliExtensionResults.js +0 -61
  184. package/build/src/start/server/DevToolsPluginCliExtensionResults.js.map +0 -1
  185. package/build/src/start/server/middleware/DataLoaderModuleMiddleware.js +0 -75
  186. package/build/src/start/server/middleware/DataLoaderModuleMiddleware.js.map +0 -1
@@ -0,0 +1,406 @@
1
+ /**
2
+ * @license React
3
+ * scheduler-unstable_mock.production.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
+ function push(heap, node) {
13
+ var index = heap.length;
14
+ heap.push(node);
15
+ a: for (; 0 < index; ) {
16
+ var parentIndex = (index - 1) >>> 1,
17
+ parent = heap[parentIndex];
18
+ if (0 < compare(parent, node))
19
+ (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
20
+ else break a;
21
+ }
22
+ }
23
+ function peek(heap) {
24
+ return 0 === heap.length ? null : heap[0];
25
+ }
26
+ function pop(heap) {
27
+ if (0 === heap.length) return null;
28
+ var first = heap[0],
29
+ last = heap.pop();
30
+ if (last !== first) {
31
+ heap[0] = last;
32
+ a: for (
33
+ var index = 0, length = heap.length, halfLength = length >>> 1;
34
+ index < halfLength;
35
+
36
+ ) {
37
+ var leftIndex = 2 * (index + 1) - 1,
38
+ left = heap[leftIndex],
39
+ rightIndex = leftIndex + 1,
40
+ right = heap[rightIndex];
41
+ if (0 > compare(left, last))
42
+ rightIndex < length && 0 > compare(right, left)
43
+ ? ((heap[index] = right),
44
+ (heap[rightIndex] = last),
45
+ (index = rightIndex))
46
+ : ((heap[index] = left),
47
+ (heap[leftIndex] = last),
48
+ (index = leftIndex));
49
+ else if (rightIndex < length && 0 > compare(right, last))
50
+ (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
51
+ else break a;
52
+ }
53
+ }
54
+ return first;
55
+ }
56
+ function compare(a, b) {
57
+ var diff = a.sortIndex - b.sortIndex;
58
+ return 0 !== diff ? diff : a.id - b.id;
59
+ }
60
+ var taskQueue = [],
61
+ timerQueue = [],
62
+ taskIdCounter = 1,
63
+ currentTask = null,
64
+ currentPriorityLevel = 3,
65
+ isPerformingWork = !1,
66
+ isHostCallbackScheduled = !1,
67
+ isHostTimeoutScheduled = !1,
68
+ currentMockTime = 0,
69
+ scheduledCallback = null,
70
+ scheduledTimeout = null,
71
+ timeoutTime = -1,
72
+ yieldedValues = null,
73
+ expectedNumberOfYields = -1,
74
+ didStop = !1,
75
+ isFlushing = !1,
76
+ needsPaint = !1,
77
+ shouldYieldForPaint = !1,
78
+ disableYieldValue = !1;
79
+ function advanceTimers(currentTime) {
80
+ for (var timer = peek(timerQueue); null !== timer; ) {
81
+ if (null === timer.callback) pop(timerQueue);
82
+ else if (timer.startTime <= currentTime)
83
+ pop(timerQueue),
84
+ (timer.sortIndex = timer.expirationTime),
85
+ push(taskQueue, timer);
86
+ else break;
87
+ timer = peek(timerQueue);
88
+ }
89
+ }
90
+ function handleTimeout(currentTime) {
91
+ isHostTimeoutScheduled = !1;
92
+ advanceTimers(currentTime);
93
+ if (!isHostCallbackScheduled)
94
+ if (null !== peek(taskQueue))
95
+ (isHostCallbackScheduled = !0), (scheduledCallback = flushWork);
96
+ else {
97
+ var firstTimer = peek(timerQueue);
98
+ null !== firstTimer &&
99
+ ((currentTime = firstTimer.startTime - currentTime),
100
+ (scheduledTimeout = handleTimeout),
101
+ (timeoutTime = currentMockTime + currentTime));
102
+ }
103
+ }
104
+ function flushWork(hasTimeRemaining, initialTime) {
105
+ isHostCallbackScheduled = !1;
106
+ isHostTimeoutScheduled &&
107
+ ((isHostTimeoutScheduled = !1),
108
+ (scheduledTimeout = null),
109
+ (timeoutTime = -1));
110
+ isPerformingWork = !0;
111
+ var previousPriorityLevel = currentPriorityLevel;
112
+ try {
113
+ a: {
114
+ advanceTimers(initialTime);
115
+ for (
116
+ currentTask = peek(taskQueue);
117
+ null !== currentTask &&
118
+ (!(currentTask.expirationTime > initialTime) ||
119
+ (hasTimeRemaining && !shouldYieldToHost()));
120
+
121
+ ) {
122
+ var callback = currentTask.callback;
123
+ if ("function" === typeof callback) {
124
+ currentTask.callback = null;
125
+ currentPriorityLevel = currentTask.priorityLevel;
126
+ var continuationCallback = callback(
127
+ currentTask.expirationTime <= initialTime
128
+ );
129
+ initialTime = currentMockTime;
130
+ if ("function" === typeof continuationCallback) {
131
+ if (
132
+ ((currentTask.callback = continuationCallback),
133
+ advanceTimers(initialTime),
134
+ shouldYieldForPaint)
135
+ ) {
136
+ var JSCompiler_inline_result = (needsPaint = !0);
137
+ break a;
138
+ }
139
+ } else
140
+ currentTask === peek(taskQueue) && pop(taskQueue),
141
+ advanceTimers(initialTime);
142
+ } else pop(taskQueue);
143
+ currentTask = peek(taskQueue);
144
+ }
145
+ if (null !== currentTask) JSCompiler_inline_result = !0;
146
+ else {
147
+ var firstTimer = peek(timerQueue);
148
+ if (null !== firstTimer) {
149
+ var ms = firstTimer.startTime - initialTime;
150
+ scheduledTimeout = handleTimeout;
151
+ timeoutTime = currentMockTime + ms;
152
+ }
153
+ JSCompiler_inline_result = !1;
154
+ }
155
+ }
156
+ return JSCompiler_inline_result;
157
+ } finally {
158
+ (currentTask = null),
159
+ (currentPriorityLevel = previousPriorityLevel),
160
+ (isPerformingWork = !1);
161
+ }
162
+ }
163
+ function shouldYieldToHost() {
164
+ return (0 === expectedNumberOfYields && null === yieldedValues) ||
165
+ (-1 !== expectedNumberOfYields &&
166
+ null !== yieldedValues &&
167
+ yieldedValues.length >= expectedNumberOfYields) ||
168
+ (shouldYieldForPaint && needsPaint)
169
+ ? (didStop = !0)
170
+ : !1;
171
+ }
172
+ function unstable_flushAllWithoutAsserting() {
173
+ if (isFlushing) throw Error("Already flushing work.");
174
+ if (null !== scheduledCallback) {
175
+ var cb = scheduledCallback;
176
+ isFlushing = !0;
177
+ try {
178
+ var hasMoreWork = !0;
179
+ do hasMoreWork = cb(!0, currentMockTime);
180
+ while (hasMoreWork);
181
+ hasMoreWork || (scheduledCallback = null);
182
+ return !0;
183
+ } finally {
184
+ isFlushing = !1;
185
+ }
186
+ } else return !1;
187
+ }
188
+ exports.log = function (value) {
189
+ "disabledLog" === console.log.name ||
190
+ disableYieldValue ||
191
+ (null === yieldedValues
192
+ ? (yieldedValues = [value])
193
+ : yieldedValues.push(value));
194
+ };
195
+ exports.reset = function () {
196
+ if (isFlushing) throw Error("Cannot reset while already flushing work.");
197
+ currentMockTime = 0;
198
+ scheduledTimeout = scheduledCallback = null;
199
+ timeoutTime = -1;
200
+ yieldedValues = null;
201
+ expectedNumberOfYields = -1;
202
+ needsPaint = isFlushing = didStop = !1;
203
+ };
204
+ exports.unstable_IdlePriority = 5;
205
+ exports.unstable_ImmediatePriority = 1;
206
+ exports.unstable_LowPriority = 4;
207
+ exports.unstable_NormalPriority = 3;
208
+ exports.unstable_Profiling = null;
209
+ exports.unstable_UserBlockingPriority = 2;
210
+ exports.unstable_advanceTime = function (ms) {
211
+ "disabledLog" === console.log.name ||
212
+ disableYieldValue ||
213
+ ((currentMockTime += ms),
214
+ null !== scheduledTimeout &&
215
+ timeoutTime <= currentMockTime &&
216
+ (scheduledTimeout(currentMockTime),
217
+ (timeoutTime = -1),
218
+ (scheduledTimeout = null)));
219
+ };
220
+ exports.unstable_cancelCallback = function (task) {
221
+ task.callback = null;
222
+ };
223
+ exports.unstable_clearLog = function () {
224
+ if (null === yieldedValues) return [];
225
+ var values = yieldedValues;
226
+ yieldedValues = null;
227
+ return values;
228
+ };
229
+ exports.unstable_flushAll = function () {
230
+ if (null !== yieldedValues)
231
+ throw Error(
232
+ "Log is not empty. Assert on the log of yielded values before flushing additional work."
233
+ );
234
+ unstable_flushAllWithoutAsserting();
235
+ if (null !== yieldedValues)
236
+ throw Error(
237
+ "While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"
238
+ );
239
+ };
240
+ exports.unstable_flushAllWithoutAsserting = unstable_flushAllWithoutAsserting;
241
+ exports.unstable_flushExpired = function () {
242
+ if (isFlushing) throw Error("Already flushing work.");
243
+ if (null !== scheduledCallback) {
244
+ isFlushing = !0;
245
+ try {
246
+ scheduledCallback(!1, currentMockTime) || (scheduledCallback = null);
247
+ } finally {
248
+ isFlushing = !1;
249
+ }
250
+ }
251
+ };
252
+ exports.unstable_flushNumberOfYields = function (count) {
253
+ if (isFlushing) throw Error("Already flushing work.");
254
+ if (null !== scheduledCallback) {
255
+ var cb = scheduledCallback;
256
+ expectedNumberOfYields = count;
257
+ isFlushing = !0;
258
+ try {
259
+ count = !0;
260
+ do count = cb(!0, currentMockTime);
261
+ while (count && !didStop);
262
+ count || (scheduledCallback = null);
263
+ } finally {
264
+ (expectedNumberOfYields = -1), (isFlushing = didStop = !1);
265
+ }
266
+ }
267
+ };
268
+ exports.unstable_flushUntilNextPaint = function () {
269
+ if (isFlushing) throw Error("Already flushing work.");
270
+ if (null !== scheduledCallback) {
271
+ var cb = scheduledCallback;
272
+ shouldYieldForPaint = !0;
273
+ needsPaint = !1;
274
+ isFlushing = !0;
275
+ try {
276
+ var hasMoreWork = !0;
277
+ do hasMoreWork = cb(!0, currentMockTime);
278
+ while (hasMoreWork && !didStop);
279
+ hasMoreWork || (scheduledCallback = null);
280
+ } finally {
281
+ isFlushing = didStop = shouldYieldForPaint = !1;
282
+ }
283
+ }
284
+ return !1;
285
+ };
286
+ exports.unstable_forceFrameRate = function () {};
287
+ exports.unstable_getCurrentPriorityLevel = function () {
288
+ return currentPriorityLevel;
289
+ };
290
+ exports.unstable_hasPendingWork = function () {
291
+ return null !== scheduledCallback;
292
+ };
293
+ exports.unstable_next = function (eventHandler) {
294
+ switch (currentPriorityLevel) {
295
+ case 1:
296
+ case 2:
297
+ case 3:
298
+ var priorityLevel = 3;
299
+ break;
300
+ default:
301
+ priorityLevel = currentPriorityLevel;
302
+ }
303
+ var previousPriorityLevel = currentPriorityLevel;
304
+ currentPriorityLevel = priorityLevel;
305
+ try {
306
+ return eventHandler();
307
+ } finally {
308
+ currentPriorityLevel = previousPriorityLevel;
309
+ }
310
+ };
311
+ exports.unstable_now = function () {
312
+ return currentMockTime;
313
+ };
314
+ exports.unstable_requestPaint = function () {
315
+ needsPaint = !0;
316
+ };
317
+ exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
318
+ switch (priorityLevel) {
319
+ case 1:
320
+ case 2:
321
+ case 3:
322
+ case 4:
323
+ case 5:
324
+ break;
325
+ default:
326
+ priorityLevel = 3;
327
+ }
328
+ var previousPriorityLevel = currentPriorityLevel;
329
+ currentPriorityLevel = priorityLevel;
330
+ try {
331
+ return eventHandler();
332
+ } finally {
333
+ currentPriorityLevel = previousPriorityLevel;
334
+ }
335
+ };
336
+ exports.unstable_scheduleCallback = function (
337
+ priorityLevel,
338
+ callback,
339
+ options
340
+ ) {
341
+ var currentTime = currentMockTime;
342
+ "object" === typeof options && null !== options
343
+ ? ((options = options.delay),
344
+ (options =
345
+ "number" === typeof options && 0 < options
346
+ ? currentTime + options
347
+ : currentTime))
348
+ : (options = currentTime);
349
+ switch (priorityLevel) {
350
+ case 1:
351
+ var timeout = -1;
352
+ break;
353
+ case 2:
354
+ timeout = 250;
355
+ break;
356
+ case 5:
357
+ timeout = 1073741823;
358
+ break;
359
+ case 4:
360
+ timeout = 1e4;
361
+ break;
362
+ default:
363
+ timeout = 5e3;
364
+ }
365
+ timeout = options + timeout;
366
+ priorityLevel = {
367
+ id: taskIdCounter++,
368
+ callback: callback,
369
+ priorityLevel: priorityLevel,
370
+ startTime: options,
371
+ expirationTime: timeout,
372
+ sortIndex: -1
373
+ };
374
+ options > currentTime
375
+ ? ((priorityLevel.sortIndex = options),
376
+ push(timerQueue, priorityLevel),
377
+ null === peek(taskQueue) &&
378
+ priorityLevel === peek(timerQueue) &&
379
+ (isHostTimeoutScheduled
380
+ ? ((scheduledTimeout = null), (timeoutTime = -1))
381
+ : (isHostTimeoutScheduled = !0),
382
+ (scheduledTimeout = handleTimeout),
383
+ (timeoutTime = currentMockTime + (options - currentTime))))
384
+ : ((priorityLevel.sortIndex = timeout),
385
+ push(taskQueue, priorityLevel),
386
+ isHostCallbackScheduled ||
387
+ isPerformingWork ||
388
+ ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
389
+ return priorityLevel;
390
+ };
391
+ exports.unstable_setDisableYieldValue = function (newValue) {
392
+ disableYieldValue = newValue;
393
+ };
394
+ exports.unstable_shouldYield = shouldYieldToHost;
395
+ exports.unstable_wrapCallback = function (callback) {
396
+ var parentPriorityLevel = currentPriorityLevel;
397
+ return function () {
398
+ var previousPriorityLevel = currentPriorityLevel;
399
+ currentPriorityLevel = parentPriorityLevel;
400
+ try {
401
+ return callback.apply(this, arguments);
402
+ } finally {
403
+ currentPriorityLevel = previousPriorityLevel;
404
+ }
405
+ };
406
+ };
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @license React
3
+ * scheduler-unstable_post_task.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 runTask(priorityLevel, postTaskPriority, node, callback) {
15
+ deadline = getCurrentTime() + 5;
16
+ try {
17
+ currentPriorityLevel_DEPRECATED = priorityLevel;
18
+ var result = callback(!1);
19
+ if ("function" === typeof result) {
20
+ var continuationOptions = { signal: node._controller.signal },
21
+ nextTask = runTask.bind(
22
+ null,
23
+ priorityLevel,
24
+ postTaskPriority,
25
+ node,
26
+ result
27
+ );
28
+ void 0 !== scheduler.yield
29
+ ? scheduler
30
+ .yield(continuationOptions)
31
+ .then(nextTask)
32
+ .catch(handleAbortError)
33
+ : scheduler
34
+ .postTask(nextTask, continuationOptions)
35
+ .catch(handleAbortError);
36
+ }
37
+ } catch (error) {
38
+ setTimeout(function () {
39
+ throw error;
40
+ });
41
+ } finally {
42
+ currentPriorityLevel_DEPRECATED = 3;
43
+ }
44
+ }
45
+ function handleAbortError() {}
46
+ var perf = window.performance,
47
+ setTimeout = window.setTimeout,
48
+ scheduler = global.scheduler,
49
+ getCurrentTime = perf.now.bind(perf),
50
+ deadline = 0,
51
+ currentPriorityLevel_DEPRECATED = 3;
52
+ exports.unstable_IdlePriority = 5;
53
+ exports.unstable_ImmediatePriority = 1;
54
+ exports.unstable_LowPriority = 4;
55
+ exports.unstable_NormalPriority = 3;
56
+ exports.unstable_Profiling = null;
57
+ exports.unstable_UserBlockingPriority = 2;
58
+ exports.unstable_cancelCallback = function (node) {
59
+ node._controller.abort();
60
+ };
61
+ exports.unstable_forceFrameRate = function () {};
62
+ exports.unstable_getCurrentPriorityLevel = function () {
63
+ return currentPriorityLevel_DEPRECATED;
64
+ };
65
+ exports.unstable_next = function (callback) {
66
+ switch (currentPriorityLevel_DEPRECATED) {
67
+ case 1:
68
+ case 2:
69
+ case 3:
70
+ var priorityLevel = 3;
71
+ break;
72
+ default:
73
+ priorityLevel = currentPriorityLevel_DEPRECATED;
74
+ }
75
+ var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
76
+ currentPriorityLevel_DEPRECATED = priorityLevel;
77
+ try {
78
+ return callback();
79
+ } finally {
80
+ currentPriorityLevel_DEPRECATED = previousPriorityLevel;
81
+ }
82
+ };
83
+ exports.unstable_now = getCurrentTime;
84
+ exports.unstable_requestPaint = function () {};
85
+ exports.unstable_runWithPriority = function (priorityLevel, callback) {
86
+ var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
87
+ currentPriorityLevel_DEPRECATED = priorityLevel;
88
+ try {
89
+ return callback();
90
+ } finally {
91
+ currentPriorityLevel_DEPRECATED = previousPriorityLevel;
92
+ }
93
+ };
94
+ exports.unstable_scheduleCallback = function (
95
+ priorityLevel,
96
+ callback,
97
+ options
98
+ ) {
99
+ switch (priorityLevel) {
100
+ case 1:
101
+ case 2:
102
+ var postTaskPriority = "user-blocking";
103
+ break;
104
+ case 4:
105
+ case 3:
106
+ postTaskPriority = "user-visible";
107
+ break;
108
+ case 5:
109
+ postTaskPriority = "background";
110
+ break;
111
+ default:
112
+ postTaskPriority = "user-visible";
113
+ }
114
+ var controller = new TaskController({ priority: postTaskPriority });
115
+ options = {
116
+ delay:
117
+ "object" === typeof options && null !== options ? options.delay : 0,
118
+ signal: controller.signal
119
+ };
120
+ controller = { _controller: controller };
121
+ scheduler
122
+ .postTask(
123
+ runTask.bind(
124
+ null,
125
+ priorityLevel,
126
+ postTaskPriority,
127
+ controller,
128
+ callback
129
+ ),
130
+ options
131
+ )
132
+ .catch(handleAbortError);
133
+ return controller;
134
+ };
135
+ exports.unstable_shouldYield = function () {
136
+ return getCurrentTime() >= deadline;
137
+ };
138
+ exports.unstable_wrapCallback = function (callback) {
139
+ var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
140
+ return function () {
141
+ var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
142
+ currentPriorityLevel_DEPRECATED = parentPriorityLevel;
143
+ try {
144
+ return callback();
145
+ } finally {
146
+ currentPriorityLevel_DEPRECATED = previousPriorityLevel;
147
+ }
148
+ };
149
+ };
150
+ })();
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @license React
3
+ * scheduler-unstable_post_task.production.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
+ var perf = window.performance,
13
+ setTimeout = window.setTimeout,
14
+ scheduler = global.scheduler,
15
+ getCurrentTime = perf.now.bind(perf),
16
+ deadline = 0,
17
+ currentPriorityLevel_DEPRECATED = 3;
18
+ function runTask(priorityLevel, postTaskPriority, node, callback) {
19
+ deadline = getCurrentTime() + 5;
20
+ try {
21
+ currentPriorityLevel_DEPRECATED = priorityLevel;
22
+ var result = callback(!1);
23
+ if ("function" === typeof result) {
24
+ var continuationOptions = { signal: node._controller.signal },
25
+ nextTask = runTask.bind(
26
+ null,
27
+ priorityLevel,
28
+ postTaskPriority,
29
+ node,
30
+ result
31
+ );
32
+ void 0 !== scheduler.yield
33
+ ? scheduler
34
+ .yield(continuationOptions)
35
+ .then(nextTask)
36
+ .catch(handleAbortError)
37
+ : scheduler
38
+ .postTask(nextTask, continuationOptions)
39
+ .catch(handleAbortError);
40
+ }
41
+ } catch (error) {
42
+ setTimeout(function () {
43
+ throw error;
44
+ });
45
+ } finally {
46
+ currentPriorityLevel_DEPRECATED = 3;
47
+ }
48
+ }
49
+ function handleAbortError() {}
50
+ exports.unstable_IdlePriority = 5;
51
+ exports.unstable_ImmediatePriority = 1;
52
+ exports.unstable_LowPriority = 4;
53
+ exports.unstable_NormalPriority = 3;
54
+ exports.unstable_Profiling = null;
55
+ exports.unstable_UserBlockingPriority = 2;
56
+ exports.unstable_cancelCallback = function (node) {
57
+ node._controller.abort();
58
+ };
59
+ exports.unstable_forceFrameRate = function () {};
60
+ exports.unstable_getCurrentPriorityLevel = function () {
61
+ return currentPriorityLevel_DEPRECATED;
62
+ };
63
+ exports.unstable_next = function (callback) {
64
+ switch (currentPriorityLevel_DEPRECATED) {
65
+ case 1:
66
+ case 2:
67
+ case 3:
68
+ var priorityLevel = 3;
69
+ break;
70
+ default:
71
+ priorityLevel = currentPriorityLevel_DEPRECATED;
72
+ }
73
+ var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
74
+ currentPriorityLevel_DEPRECATED = priorityLevel;
75
+ try {
76
+ return callback();
77
+ } finally {
78
+ currentPriorityLevel_DEPRECATED = previousPriorityLevel;
79
+ }
80
+ };
81
+ exports.unstable_now = getCurrentTime;
82
+ exports.unstable_requestPaint = function () {};
83
+ exports.unstable_runWithPriority = function (priorityLevel, callback) {
84
+ var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
85
+ currentPriorityLevel_DEPRECATED = priorityLevel;
86
+ try {
87
+ return callback();
88
+ } finally {
89
+ currentPriorityLevel_DEPRECATED = previousPriorityLevel;
90
+ }
91
+ };
92
+ exports.unstable_scheduleCallback = function (
93
+ priorityLevel,
94
+ callback,
95
+ options
96
+ ) {
97
+ switch (priorityLevel) {
98
+ case 1:
99
+ case 2:
100
+ var postTaskPriority = "user-blocking";
101
+ break;
102
+ case 4:
103
+ case 3:
104
+ postTaskPriority = "user-visible";
105
+ break;
106
+ case 5:
107
+ postTaskPriority = "background";
108
+ break;
109
+ default:
110
+ postTaskPriority = "user-visible";
111
+ }
112
+ var controller = new TaskController({ priority: postTaskPriority });
113
+ options = {
114
+ delay: "object" === typeof options && null !== options ? options.delay : 0,
115
+ signal: controller.signal
116
+ };
117
+ controller = { _controller: controller };
118
+ scheduler
119
+ .postTask(
120
+ runTask.bind(null, priorityLevel, postTaskPriority, controller, callback),
121
+ options
122
+ )
123
+ .catch(handleAbortError);
124
+ return controller;
125
+ };
126
+ exports.unstable_shouldYield = function () {
127
+ return getCurrentTime() >= deadline;
128
+ };
129
+ exports.unstable_wrapCallback = function (callback) {
130
+ var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
131
+ return function () {
132
+ var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
133
+ currentPriorityLevel_DEPRECATED = parentPriorityLevel;
134
+ try {
135
+ return callback();
136
+ } finally {
137
+ currentPriorityLevel_DEPRECATED = previousPriorityLevel;
138
+ }
139
+ };
140
+ };