main
js 156 lines 5.06 KB
Raw
1 /**
2 * @license React
3 *
4 * Copyright (c) Meta Platforms, Inc. and affiliates.
5 *
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the root directory of this source tree.
8 */
9
10 'use strict';
11
12 (function (global, factory) {
13 // eslint-disable-next-line ft-flow/no-unused-expressions
14 typeof exports === 'object' && typeof module !== 'undefined'
15 ? (module.exports = factory(require('react')))
16 : typeof define === 'function' && define.amd // eslint-disable-line no-undef
17 ? define(['react'], factory) // eslint-disable-line no-undef
18 : (global.Scheduler = factory(global));
19 })(this, function (global) {
20 function unstable_now() {
21 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_now.apply(
22 this,
23 arguments
24 );
25 }
26
27 function unstable_scheduleCallback() {
28 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_scheduleCallback.apply(
29 this,
30 arguments
31 );
32 }
33
34 function unstable_cancelCallback() {
35 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_cancelCallback.apply(
36 this,
37 arguments
38 );
39 }
40
41 function unstable_shouldYield() {
42 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_shouldYield.apply(
43 this,
44 arguments
45 );
46 }
47
48 function unstable_requestPaint() {
49 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_requestPaint.apply(
50 this,
51 arguments
52 );
53 }
54
55 function unstable_runWithPriority() {
56 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply(
57 this,
58 arguments
59 );
60 }
61
62 function unstable_next() {
63 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_next.apply(
64 this,
65 arguments
66 );
67 }
68
69 function unstable_wrapCallback() {
70 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_wrapCallback.apply(
71 this,
72 arguments
73 );
74 }
75
76 function unstable_getCurrentPriorityLevel() {
77 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getCurrentPriorityLevel.apply(
78 this,
79 arguments
80 );
81 }
82
83 function unstable_getFirstCallbackNode() {
84 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getFirstCallbackNode.apply(
85 this,
86 arguments
87 );
88 }
89
90 function unstable_pauseExecution() {
91 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_pauseExecution.apply(
92 this,
93 arguments
94 );
95 }
96
97 function unstable_continueExecution() {
98 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_continueExecution.apply(
99 this,
100 arguments
101 );
102 }
103
104 function unstable_forceFrameRate() {
105 return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_forceFrameRate.apply(
106 this,
107 arguments
108 );
109 }
110
111 return Object.freeze({
112 unstable_now: unstable_now,
113 unstable_scheduleCallback: unstable_scheduleCallback,
114 unstable_cancelCallback: unstable_cancelCallback,
115 unstable_shouldYield: unstable_shouldYield,
116 unstable_requestPaint: unstable_requestPaint,
117 unstable_runWithPriority: unstable_runWithPriority,
118 unstable_next: unstable_next,
119 unstable_wrapCallback: unstable_wrapCallback,
120 unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
121 unstable_continueExecution: unstable_continueExecution,
122 unstable_pauseExecution: unstable_pauseExecution,
123 unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
124 unstable_forceFrameRate: unstable_forceFrameRate,
125 get unstable_IdlePriority() {
126 return global.React
127 .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
128 .Scheduler.unstable_IdlePriority;
129 },
130 get unstable_ImmediatePriority() {
131 return global.React
132 .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
133 .Scheduler.unstable_ImmediatePriority;
134 },
135 get unstable_LowPriority() {
136 return global.React
137 .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
138 .Scheduler.unstable_LowPriority;
139 },
140 get unstable_NormalPriority() {
141 return global.React
142 .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
143 .Scheduler.unstable_NormalPriority;
144 },
145 get unstable_UserBlockingPriority() {
146 return global.React
147 .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
148 .Scheduler.unstable_UserBlockingPriority;
149 },
150 get unstable_Profiling() {
151 return global.React
152 .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
153 .Scheduler.unstable_Profiling;
154 },
155 });
156 });