scheduler 0.10.0 → 0.11.2
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/cjs/scheduler-tracing.development.js +5 -1
- package/cjs/scheduler-tracing.production.min.js +1 -1
- package/cjs/scheduler-tracing.profiling.min.js +1 -1
- package/cjs/scheduler.development.js +26 -41
- package/cjs/scheduler.production.min.js +13 -11
- package/package.json +19 -2
- package/umd/scheduler-tracing.development.js +1 -0
- package/umd/scheduler-tracing.production.min.js +1 -0
- package/umd/scheduler-tracing.profiling.min.js +1 -0
- package/umd/scheduler.development.js +9 -0
- package/umd/scheduler.production.min.js +9 -0
- package/umd/scheduler.profiling.min.js +9 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.
|
|
1
|
+
/** @license React v16.6.1
|
|
2
2
|
* scheduler-tracing.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -48,6 +48,10 @@ var enableSchedulerTracing = true;
|
|
|
48
48
|
// React Fire: prevent the value and checked attributes from syncing
|
|
49
49
|
// with their related DOM properties
|
|
50
50
|
|
|
51
|
+
|
|
52
|
+
// These APIs will no longer be "unstable" in the upcoming 16.7 release,
|
|
53
|
+
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
54
|
+
|
|
51
55
|
var DEFAULT_THREAD_ID = 0;
|
|
52
56
|
|
|
53
57
|
// Counters used to generate unique IDs.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.
|
|
1
|
+
/** @license React v16.6.1
|
|
2
2
|
* scheduler.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -23,7 +23,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
23
23
|
var ImmediatePriority = 1;
|
|
24
24
|
var UserBlockingPriority = 2;
|
|
25
25
|
var NormalPriority = 3;
|
|
26
|
-
var
|
|
26
|
+
var LowPriority = 4;
|
|
27
|
+
var IdlePriority = 5;
|
|
27
28
|
|
|
28
29
|
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
|
|
29
30
|
// Math.pow(2, 30) - 1
|
|
@@ -35,12 +36,14 @@ var IMMEDIATE_PRIORITY_TIMEOUT = -1;
|
|
|
35
36
|
// Eventually times out
|
|
36
37
|
var USER_BLOCKING_PRIORITY = 250;
|
|
37
38
|
var NORMAL_PRIORITY_TIMEOUT = 5000;
|
|
39
|
+
var LOW_PRIORITY_TIMEOUT = 10000;
|
|
38
40
|
// Never times out
|
|
39
41
|
var IDLE_PRIORITY = maxSigned31BitInt;
|
|
40
42
|
|
|
41
43
|
// Callbacks are stored as a circular, doubly linked list.
|
|
42
44
|
var firstCallbackNode = null;
|
|
43
45
|
|
|
46
|
+
var currentDidTimeout = false;
|
|
44
47
|
var currentPriorityLevel = NormalPriority;
|
|
45
48
|
var currentEventStartTime = -1;
|
|
46
49
|
var currentExpirationTime = -1;
|
|
@@ -52,35 +55,6 @@ var isHostCallbackScheduled = false;
|
|
|
52
55
|
|
|
53
56
|
var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
|
|
54
57
|
|
|
55
|
-
var timeRemaining;
|
|
56
|
-
if (hasNativePerformanceNow) {
|
|
57
|
-
timeRemaining = function () {
|
|
58
|
-
if (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime) {
|
|
59
|
-
// A higher priority callback was scheduled. Yield so we can switch to
|
|
60
|
-
// working on that.
|
|
61
|
-
return 0;
|
|
62
|
-
}
|
|
63
|
-
// We assume that if we have a performance timer that the rAF callback
|
|
64
|
-
// gets a performance timer value. Not sure if this is always true.
|
|
65
|
-
var remaining = getFrameDeadline() - performance.now();
|
|
66
|
-
return remaining > 0 ? remaining : 0;
|
|
67
|
-
};
|
|
68
|
-
} else {
|
|
69
|
-
timeRemaining = function () {
|
|
70
|
-
// Fallback to Date.now()
|
|
71
|
-
if (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime) {
|
|
72
|
-
return 0;
|
|
73
|
-
}
|
|
74
|
-
var remaining = getFrameDeadline() - Date.now();
|
|
75
|
-
return remaining > 0 ? remaining : 0;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
var deadlineObject = {
|
|
80
|
-
timeRemaining: timeRemaining,
|
|
81
|
-
didTimeout: false
|
|
82
|
-
};
|
|
83
|
-
|
|
84
58
|
function ensureHostCallbackIsScheduled() {
|
|
85
59
|
if (isExecutingCallback) {
|
|
86
60
|
// Don't schedule work yet; wait until the next time we yield.
|
|
@@ -125,7 +99,7 @@ function flushFirstCallback() {
|
|
|
125
99
|
currentExpirationTime = expirationTime;
|
|
126
100
|
var continuationCallback;
|
|
127
101
|
try {
|
|
128
|
-
continuationCallback = callback(
|
|
102
|
+
continuationCallback = callback();
|
|
129
103
|
} finally {
|
|
130
104
|
currentPriorityLevel = previousPriorityLevel;
|
|
131
105
|
currentExpirationTime = previousExpirationTime;
|
|
@@ -185,7 +159,6 @@ function flushImmediateWork() {
|
|
|
185
159
|
// Confirm we've exited the outer most event handler
|
|
186
160
|
currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) {
|
|
187
161
|
isExecutingCallback = true;
|
|
188
|
-
deadlineObject.didTimeout = true;
|
|
189
162
|
try {
|
|
190
163
|
do {
|
|
191
164
|
flushFirstCallback();
|
|
@@ -206,7 +179,8 @@ function flushImmediateWork() {
|
|
|
206
179
|
|
|
207
180
|
function flushWork(didTimeout) {
|
|
208
181
|
isExecutingCallback = true;
|
|
209
|
-
|
|
182
|
+
var previousDidTimeout = currentDidTimeout;
|
|
183
|
+
currentDidTimeout = didTimeout;
|
|
210
184
|
try {
|
|
211
185
|
if (didTimeout) {
|
|
212
186
|
// Flush all the expired callbacks without yielding.
|
|
@@ -228,11 +202,12 @@ function flushWork(didTimeout) {
|
|
|
228
202
|
if (firstCallbackNode !== null) {
|
|
229
203
|
do {
|
|
230
204
|
flushFirstCallback();
|
|
231
|
-
} while (firstCallbackNode !== null &&
|
|
205
|
+
} while (firstCallbackNode !== null && !shouldYieldToHost());
|
|
232
206
|
}
|
|
233
207
|
}
|
|
234
208
|
} finally {
|
|
235
209
|
isExecutingCallback = false;
|
|
210
|
+
currentDidTimeout = previousDidTimeout;
|
|
236
211
|
if (firstCallbackNode !== null) {
|
|
237
212
|
// There's still work remaining. Request another callback.
|
|
238
213
|
ensureHostCallbackIsScheduled();
|
|
@@ -249,6 +224,7 @@ function unstable_runWithPriority(priorityLevel, eventHandler) {
|
|
|
249
224
|
case ImmediatePriority:
|
|
250
225
|
case UserBlockingPriority:
|
|
251
226
|
case NormalPriority:
|
|
227
|
+
case LowPriority:
|
|
252
228
|
case IdlePriority:
|
|
253
229
|
break;
|
|
254
230
|
default:
|
|
@@ -308,6 +284,9 @@ function unstable_scheduleCallback(callback, deprecated_options) {
|
|
|
308
284
|
case IdlePriority:
|
|
309
285
|
expirationTime = startTime + IDLE_PRIORITY;
|
|
310
286
|
break;
|
|
287
|
+
case LowPriority:
|
|
288
|
+
expirationTime = startTime + LOW_PRIORITY_TIMEOUT;
|
|
289
|
+
break;
|
|
311
290
|
case NormalPriority:
|
|
312
291
|
default:
|
|
313
292
|
expirationTime = startTime + NORMAL_PRIORITY_TIMEOUT;
|
|
@@ -387,6 +366,10 @@ function unstable_getCurrentPriorityLevel() {
|
|
|
387
366
|
return currentPriorityLevel;
|
|
388
367
|
}
|
|
389
368
|
|
|
369
|
+
function unstable_shouldYield() {
|
|
370
|
+
return !currentDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
|
|
371
|
+
}
|
|
372
|
+
|
|
390
373
|
// The remaining code is essentially a polyfill for requestIdleCallback. It
|
|
391
374
|
// works by scheduling a requestAnimationFrame, storing the time for the start
|
|
392
375
|
// of the frame, then scheduling a postMessage which gets scheduled after paint.
|
|
@@ -447,14 +430,14 @@ if (hasNativePerformanceNow) {
|
|
|
447
430
|
|
|
448
431
|
var requestHostCallback;
|
|
449
432
|
var cancelHostCallback;
|
|
450
|
-
var
|
|
433
|
+
var shouldYieldToHost;
|
|
451
434
|
|
|
452
435
|
if (typeof window !== 'undefined' && window._schedMock) {
|
|
453
436
|
// Dynamic injection, only for testing purposes.
|
|
454
437
|
var impl = window._schedMock;
|
|
455
438
|
requestHostCallback = impl[0];
|
|
456
439
|
cancelHostCallback = impl[1];
|
|
457
|
-
|
|
440
|
+
shouldYieldToHost = impl[2];
|
|
458
441
|
} else if (
|
|
459
442
|
// If Scheduler runs in a non-DOM environment, it falls back to a naive
|
|
460
443
|
// implementation using setTimeout.
|
|
@@ -489,8 +472,8 @@ typeof window.addEventListener !== 'function') {
|
|
|
489
472
|
cancelHostCallback = function () {
|
|
490
473
|
_callback = null;
|
|
491
474
|
};
|
|
492
|
-
|
|
493
|
-
return
|
|
475
|
+
shouldYieldToHost = function () {
|
|
476
|
+
return false;
|
|
494
477
|
};
|
|
495
478
|
exports.unstable_now = function () {
|
|
496
479
|
return _currentTime === -1 ? 0 : _currentTime;
|
|
@@ -521,8 +504,8 @@ typeof window.addEventListener !== 'function') {
|
|
|
521
504
|
var previousFrameTime = 33;
|
|
522
505
|
var activeFrameTime = 33;
|
|
523
506
|
|
|
524
|
-
|
|
525
|
-
return frameDeadline;
|
|
507
|
+
shouldYieldToHost = function () {
|
|
508
|
+
return frameDeadline <= exports.unstable_now();
|
|
526
509
|
};
|
|
527
510
|
|
|
528
511
|
// We use the postMessage trick to defer idle work until after the repaint.
|
|
@@ -645,10 +628,12 @@ exports.unstable_ImmediatePriority = ImmediatePriority;
|
|
|
645
628
|
exports.unstable_UserBlockingPriority = UserBlockingPriority;
|
|
646
629
|
exports.unstable_NormalPriority = NormalPriority;
|
|
647
630
|
exports.unstable_IdlePriority = IdlePriority;
|
|
631
|
+
exports.unstable_LowPriority = LowPriority;
|
|
648
632
|
exports.unstable_runWithPriority = unstable_runWithPriority;
|
|
649
633
|
exports.unstable_scheduleCallback = unstable_scheduleCallback;
|
|
650
634
|
exports.unstable_cancelCallback = unstable_cancelCallback;
|
|
651
635
|
exports.unstable_wrapCallback = unstable_wrapCallback;
|
|
652
636
|
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
|
|
637
|
+
exports.unstable_shouldYield = unstable_shouldYield;
|
|
653
638
|
})();
|
|
654
639
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.
|
|
1
|
+
/** @license React v16.6.1
|
|
2
2
|
* scheduler.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
11
|
-
function
|
|
12
|
-
b}}function
|
|
13
|
-
var
|
|
14
|
-
if("
|
|
15
|
-
("
|
|
16
|
-
function(a)
|
|
17
|
-
|
|
18
|
-
exports.
|
|
19
|
-
|
|
10
|
+
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var d=null,f=!1,h=3,k=-1,l=-1,m=!1,n=!1;function p(){if(!m){var a=d.expirationTime;n?q():n=!0;r(t,a)}}
|
|
11
|
+
function u(){var a=d,b=d.next;if(d===b)d=null;else{var c=d.previous;d=c.next=b;b.previous=c}a.next=a.previous=null;c=a.callback;b=a.expirationTime;a=a.priorityLevel;var e=h,Q=l;h=a;l=b;try{var g=c()}finally{h=e,l=Q}if("function"===typeof g)if(g={callback:g,priorityLevel:a,expirationTime:b,next:null,previous:null},null===d)d=g.next=g.previous=g;else{c=null;a=d;do{if(a.expirationTime>=b){c=a;break}a=a.next}while(a!==d);null===c?c=d:c===d&&(d=g,p());b=c.previous;b.next=c.previous=g;g.next=c;g.previous=
|
|
12
|
+
b}}function v(){if(-1===k&&null!==d&&1===d.priorityLevel){m=!0;try{do u();while(null!==d&&1===d.priorityLevel)}finally{m=!1,null!==d?p():n=!1}}}function t(a){m=!0;var b=f;f=a;try{if(a)for(;null!==d;){var c=exports.unstable_now();if(d.expirationTime<=c){do u();while(null!==d&&d.expirationTime<=c)}else break}else if(null!==d){do u();while(null!==d&&!w())}}finally{m=!1,f=b,null!==d?p():n=!1,v()}}
|
|
13
|
+
var x=Date,y="function"===typeof setTimeout?setTimeout:void 0,z="function"===typeof clearTimeout?clearTimeout:void 0,A="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,B="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,C,D;function E(a){C=A(function(b){z(D);a(b)});D=y(function(){B(C);a(exports.unstable_now())},100)}
|
|
14
|
+
if("object"===typeof performance&&"function"===typeof performance.now){var F=performance;exports.unstable_now=function(){return F.now()}}else exports.unstable_now=function(){return x.now()};var r,q,w;
|
|
15
|
+
if("undefined"!==typeof window&&window._schedMock){var G=window._schedMock;r=G[0];q=G[1];w=G[2]}else if("undefined"===typeof window||"function"!==typeof window.addEventListener){var H=null,I=-1,J=function(a,b){if(null!==H){var c=H;H=null;try{I=b,c(a)}finally{I=-1}}};r=function(a,b){-1!==I?setTimeout(r,0,a,b):(H=a,setTimeout(J,b,!0,b),setTimeout(J,1073741823,!1,1073741823))};q=function(){H=null};w=function(){return!1};exports.unstable_now=function(){return-1===I?0:I}}else{"undefined"!==typeof console&&
|
|
16
|
+
("function"!==typeof A&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof B&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var K=null,L=!1,M=-1,N=!1,O=!1,P=0,R=33,S=33;w=function(){return P<=exports.unstable_now()};var T="__reactIdleCallback$"+Math.random().toString(36).slice(2);
|
|
17
|
+
window.addEventListener("message",function(a){if(a.source===window&&a.data===T){L=!1;a=K;var b=M;K=null;M=-1;var c=exports.unstable_now(),e=!1;if(0>=P-c)if(-1!==b&&b<=c)e=!0;else{N||(N=!0,E(U));K=a;M=b;return}if(null!==a){O=!0;try{a(e)}finally{O=!1}}}},!1);var U=function(a){if(null!==K){E(U);var b=a-P+S;b<S&&R<S?(8>b&&(b=8),S=b<R?R:b):R=b;P=a+S;L||(L=!0,window.postMessage(T,"*"))}else N=!1};r=function(a,b){K=a;M=b;O||0>b?window.postMessage(T,"*"):N||(N=!0,E(U))};q=function(){K=null;L=!1;M=-1}}
|
|
18
|
+
exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=h,e=k;h=a;k=exports.unstable_now();try{return b()}finally{h=c,k=e,v()}};
|
|
19
|
+
exports.unstable_scheduleCallback=function(a,b){var c=-1!==k?k:exports.unstable_now();if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=c+b.timeout;else switch(h){case 1:b=c+-1;break;case 2:b=c+250;break;case 5:b=c+1073741823;break;case 4:b=c+1E4;break;default:b=c+5E3}a={callback:a,priorityLevel:h,expirationTime:b,next:null,previous:null};if(null===d)d=a.next=a.previous=a,p();else{c=null;var e=d;do{if(e.expirationTime>b){c=e;break}e=e.next}while(e!==d);null===c?c=d:c===d&&(d=a,p());
|
|
20
|
+
b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)d=null;else{a===d&&(d=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=h;return function(){var c=h,e=k;h=b;k=exports.unstable_now();try{return a.apply(this,arguments)}finally{h=c,k=e,v()}}};exports.unstable_getCurrentPriorityLevel=function(){return h};
|
|
21
|
+
exports.unstable_shouldYield=function(){return!f&&(null!==d&&d.expirationTime<l||w())};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scheduler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Cooperative scheduler for the browser environment.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "facebook/react",
|
|
@@ -29,5 +29,22 @@
|
|
|
29
29
|
"transform": [
|
|
30
30
|
"loose-envify"
|
|
31
31
|
]
|
|
32
|
+
},
|
|
33
|
+
"buildInfo": {
|
|
34
|
+
"buildID": "0c756fb-f7f79fd",
|
|
35
|
+
"checksum": "d94496cd35663b7e3250c3d4a9069d8229b72b27",
|
|
36
|
+
"unstable": false,
|
|
37
|
+
"partial": false,
|
|
38
|
+
"packages": [
|
|
39
|
+
"create-subscription",
|
|
40
|
+
"jest-react",
|
|
41
|
+
"react",
|
|
42
|
+
"react-art",
|
|
43
|
+
"react-dom",
|
|
44
|
+
"react-is",
|
|
45
|
+
"react-reconciler",
|
|
46
|
+
"react-test-renderer",
|
|
47
|
+
"scheduler"
|
|
48
|
+
]
|
|
32
49
|
}
|
|
33
|
-
}
|
|
50
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
(function(global, factory) {
|
|
13
|
+
// eslint-disable-next-line no-unused-expressions
|
|
13
14
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
14
15
|
? (module.exports = factory(require('react')))
|
|
15
16
|
: typeof define === 'function' && define.amd // eslint-disable-line no-undef
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
(function(global, factory) {
|
|
13
|
+
// eslint-disable-next-line no-unused-expressions
|
|
13
14
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
14
15
|
? (module.exports = factory(require('react')))
|
|
15
16
|
: typeof define === 'function' && define.amd // eslint-disable-line no-undef
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
(function(global, factory) {
|
|
13
|
+
// eslint-disable-next-line no-unused-expressions
|
|
13
14
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
14
15
|
? (module.exports = factory(require('react')))
|
|
15
16
|
: typeof define === 'function' && define.amd // eslint-disable-line no-undef
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
(function(global, factory) {
|
|
15
|
+
// eslint-disable-next-line no-unused-expressions
|
|
15
16
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
16
17
|
? (module.exports = factory(require('react')))
|
|
17
18
|
: typeof define === 'function' && define.amd // eslint-disable-line no-undef
|
|
@@ -39,6 +40,13 @@
|
|
|
39
40
|
);
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
function unstable_shouldYield() {
|
|
44
|
+
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
|
|
45
|
+
this,
|
|
46
|
+
arguments
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
function unstable_runWithPriority() {
|
|
43
51
|
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
|
|
44
52
|
this,
|
|
@@ -64,6 +72,7 @@
|
|
|
64
72
|
unstable_now: unstable_now,
|
|
65
73
|
unstable_scheduleCallback: unstable_scheduleCallback,
|
|
66
74
|
unstable_cancelCallback: unstable_cancelCallback,
|
|
75
|
+
unstable_shouldYield: unstable_shouldYield,
|
|
67
76
|
unstable_runWithPriority: unstable_runWithPriority,
|
|
68
77
|
unstable_wrapCallback: unstable_wrapCallback,
|
|
69
78
|
unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
(function(global, factory) {
|
|
15
|
+
// eslint-disable-next-line no-unused-expressions
|
|
15
16
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
16
17
|
? (module.exports = factory(require('react')))
|
|
17
18
|
: typeof define === 'function' && define.amd // eslint-disable-line no-undef
|
|
@@ -39,6 +40,13 @@
|
|
|
39
40
|
);
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
function unstable_shouldYield() {
|
|
44
|
+
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
|
|
45
|
+
this,
|
|
46
|
+
arguments
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
function unstable_runWithPriority() {
|
|
43
51
|
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
|
|
44
52
|
this,
|
|
@@ -64,6 +72,7 @@
|
|
|
64
72
|
unstable_now: unstable_now,
|
|
65
73
|
unstable_scheduleCallback: unstable_scheduleCallback,
|
|
66
74
|
unstable_cancelCallback: unstable_cancelCallback,
|
|
75
|
+
unstable_shouldYield: unstable_shouldYield,
|
|
67
76
|
unstable_runWithPriority: unstable_runWithPriority,
|
|
68
77
|
unstable_wrapCallback: unstable_wrapCallback,
|
|
69
78
|
unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
(function(global, factory) {
|
|
15
|
+
// eslint-disable-next-line no-unused-expressions
|
|
15
16
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
16
17
|
? (module.exports = factory(require('react')))
|
|
17
18
|
: typeof define === 'function' && define.amd // eslint-disable-line no-undef
|
|
@@ -39,6 +40,13 @@
|
|
|
39
40
|
);
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
function unstable_shouldYield() {
|
|
44
|
+
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
|
|
45
|
+
this,
|
|
46
|
+
arguments
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
function unstable_runWithPriority() {
|
|
43
51
|
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
|
|
44
52
|
this,
|
|
@@ -64,6 +72,7 @@
|
|
|
64
72
|
unstable_now: unstable_now,
|
|
65
73
|
unstable_scheduleCallback: unstable_scheduleCallback,
|
|
66
74
|
unstable_cancelCallback: unstable_cancelCallback,
|
|
75
|
+
unstable_shouldYield: unstable_shouldYield,
|
|
67
76
|
unstable_runWithPriority: unstable_runWithPriority,
|
|
68
77
|
unstable_wrapCallback: unstable_wrapCallback,
|
|
69
78
|
unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
|