scheduler.production.min.js (4634B)
1/** 2 * @license React 3 * 4 * Copyright (c) Facebook, Inc. and its 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/* eslint-disable max-len */ 11 12'use strict'; 13 14(function(global, factory) { 15 // eslint-disable-next-line no-unused-expressions 16 typeof exports === 'object' && typeof module !== 'undefined' 17 ? (module.exports = factory(require('react'))) 18 : typeof define === 'function' && define.amd // eslint-disable-line no-undef 19 ? define(['react'], factory) // eslint-disable-line no-undef 20 : (global.Scheduler = factory(global)); 21})(this, function(global) { 22 function unstable_now() { 23 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply( 24 this, 25 arguments 26 ); 27 } 28 29 function unstable_scheduleCallback() { 30 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply( 31 this, 32 arguments 33 ); 34 } 35 36 function unstable_cancelCallback() { 37 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply( 38 this, 39 arguments 40 ); 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 50 function unstable_requestPaint() { 51 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply( 52 this, 53 arguments 54 ); 55 } 56 57 function unstable_runWithPriority() { 58 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply( 59 this, 60 arguments 61 ); 62 } 63 64 function unstable_next() { 65 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply( 66 this, 67 arguments 68 ); 69 } 70 71 function unstable_wrapCallback() { 72 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply( 73 this, 74 arguments 75 ); 76 } 77 78 function unstable_getCurrentPriorityLevel() { 79 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply( 80 this, 81 arguments 82 ); 83 } 84 85 function unstable_getFirstCallbackNode() { 86 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply( 87 this, 88 arguments 89 ); 90 } 91 92 function unstable_pauseExecution() { 93 return undefined; 94 } 95 96 function unstable_continueExecution() { 97 return undefined; 98 } 99 100 function unstable_forceFrameRate() { 101 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply( 102 this, 103 arguments 104 ); 105 } 106 107 return Object.freeze({ 108 unstable_now: unstable_now, 109 unstable_scheduleCallback: unstable_scheduleCallback, 110 unstable_cancelCallback: unstable_cancelCallback, 111 unstable_shouldYield: unstable_shouldYield, 112 unstable_requestPaint: unstable_requestPaint, 113 unstable_runWithPriority: unstable_runWithPriority, 114 unstable_next: unstable_next, 115 unstable_wrapCallback: unstable_wrapCallback, 116 unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel, 117 unstable_continueExecution: unstable_continueExecution, 118 unstable_pauseExecution: unstable_pauseExecution, 119 unstable_getFirstCallbackNode: unstable_getFirstCallbackNode, 120 unstable_forceFrameRate: unstable_forceFrameRate, 121 get unstable_IdlePriority() { 122 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED 123 .Scheduler.unstable_IdlePriority; 124 }, 125 get unstable_ImmediatePriority() { 126 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED 127 .Scheduler.unstable_ImmediatePriority; 128 }, 129 get unstable_LowPriority() { 130 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED 131 .Scheduler.unstable_LowPriority; 132 }, 133 get unstable_NormalPriority() { 134 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED 135 .Scheduler.unstable_NormalPriority; 136 }, 137 get unstable_UserBlockingPriority() { 138 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED 139 .Scheduler.unstable_UserBlockingPriority; 140 }, 141 get unstable_Profiling() { 142 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED 143 .Scheduler.unstable_Profiling; 144 }, 145 }); 146});