scheduler.development.js 4.8 KB

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