scheduler
Advanced tools
Comparing version 0.26.0-canary-4dff0e62-20241213 to 0.26.0-canary-518d06d2-20241219
@@ -235,7 +235,2 @@ /** | ||
}; | ||
exports.unstable_continueExecution = function () { | ||
isHostCallbackScheduled || | ||
isPerformingWork || | ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); | ||
}; | ||
exports.unstable_flushAll = function () { | ||
@@ -303,5 +298,2 @@ if (null !== yieldedValues) | ||
}; | ||
exports.unstable_getFirstCallbackNode = function () { | ||
return peek(taskQueue); | ||
}; | ||
exports.unstable_hasPendingWork = function () { | ||
@@ -331,3 +323,2 @@ return null !== scheduledCallback; | ||
}; | ||
exports.unstable_pauseExecution = function () {}; | ||
exports.unstable_requestPaint = function () { | ||
@@ -334,0 +325,0 @@ needsPaint = !0; |
@@ -229,7 +229,2 @@ /** | ||
}; | ||
exports.unstable_continueExecution = function () { | ||
isHostCallbackScheduled || | ||
isPerformingWork || | ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); | ||
}; | ||
exports.unstable_flushAll = function () { | ||
@@ -296,5 +291,2 @@ if (null !== yieldedValues) | ||
}; | ||
exports.unstable_getFirstCallbackNode = function () { | ||
return peek(taskQueue); | ||
}; | ||
exports.unstable_hasPendingWork = function () { | ||
@@ -324,3 +316,2 @@ return null !== scheduledCallback; | ||
}; | ||
exports.unstable_pauseExecution = function () {}; | ||
exports.unstable_requestPaint = function () { | ||
@@ -327,0 +318,0 @@ needsPaint = !0; |
@@ -61,3 +61,2 @@ /** | ||
}; | ||
exports.unstable_continueExecution = function () {}; | ||
exports.unstable_forceFrameRate = function () {}; | ||
@@ -67,5 +66,2 @@ exports.unstable_getCurrentPriorityLevel = function () { | ||
}; | ||
exports.unstable_getFirstCallbackNode = function () { | ||
return null; | ||
}; | ||
exports.unstable_next = function (callback) { | ||
@@ -90,3 +86,2 @@ switch (currentPriorityLevel_DEPRECATED) { | ||
exports.unstable_now = getCurrentTime; | ||
exports.unstable_pauseExecution = function () {}; | ||
exports.unstable_requestPaint = function () {}; | ||
@@ -93,0 +88,0 @@ exports.unstable_runWithPriority = function (priorityLevel, callback) { |
@@ -59,3 +59,2 @@ /** | ||
}; | ||
exports.unstable_continueExecution = function () {}; | ||
exports.unstable_forceFrameRate = function () {}; | ||
@@ -65,5 +64,2 @@ exports.unstable_getCurrentPriorityLevel = function () { | ||
}; | ||
exports.unstable_getFirstCallbackNode = function () { | ||
return null; | ||
}; | ||
exports.unstable_next = function (callback) { | ||
@@ -88,3 +84,2 @@ switch (currentPriorityLevel_DEPRECATED) { | ||
exports.unstable_now = getCurrentTime; | ||
exports.unstable_pauseExecution = function () {}; | ||
exports.unstable_requestPaint = function () {}; | ||
@@ -91,0 +86,0 @@ exports.unstable_runWithPriority = function (priorityLevel, callback) { |
@@ -15,2 +15,3 @@ /** | ||
function performWorkUntilDeadline() { | ||
needsPaint = !1; | ||
if (isMessageLoopRunning) { | ||
@@ -154,3 +155,5 @@ var currentTime = exports.unstable_now(); | ||
if (null !== peek(taskQueue)) | ||
(isHostCallbackScheduled = !0), requestHostCallback(); | ||
(isHostCallbackScheduled = !0), | ||
isMessageLoopRunning || | ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); | ||
else { | ||
@@ -166,8 +169,8 @@ var firstTimer = peek(timerQueue); | ||
function shouldYieldToHost() { | ||
return exports.unstable_now() - startTime < frameInterval ? !1 : !0; | ||
return needsPaint | ||
? !0 | ||
: exports.unstable_now() - startTime < frameInterval | ||
? !1 | ||
: !0; | ||
} | ||
function requestHostCallback() { | ||
isMessageLoopRunning || | ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); | ||
} | ||
function requestHostTimeout(callback, ms) { | ||
@@ -206,2 +209,3 @@ taskTimeoutID = localSetTimeout(function () { | ||
isHostTimeoutScheduled = !1, | ||
needsPaint = !1, | ||
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, | ||
@@ -240,7 +244,2 @@ localClearTimeout = | ||
}; | ||
exports.unstable_continueExecution = function () { | ||
isHostCallbackScheduled || | ||
isPerformingWork || | ||
((isHostCallbackScheduled = !0), requestHostCallback()); | ||
}; | ||
exports.unstable_forceFrameRate = function (fps) { | ||
@@ -256,5 +255,2 @@ 0 > fps || 125 < fps | ||
}; | ||
exports.unstable_getFirstCallbackNode = function () { | ||
return peek(taskQueue); | ||
}; | ||
exports.unstable_next = function (eventHandler) { | ||
@@ -278,4 +274,5 @@ switch (currentPriorityLevel) { | ||
}; | ||
exports.unstable_pauseExecution = function () {}; | ||
exports.unstable_requestPaint = function () {}; | ||
exports.unstable_requestPaint = function () { | ||
needsPaint = !0; | ||
}; | ||
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { | ||
@@ -351,3 +348,6 @@ switch (priorityLevel) { | ||
isPerformingWork || | ||
((isHostCallbackScheduled = !0), requestHostCallback())); | ||
((isHostCallbackScheduled = !0), | ||
isMessageLoopRunning || | ||
((isMessageLoopRunning = !0), | ||
schedulePerformWorkUntilDeadline()))); | ||
return priorityLevel; | ||
@@ -354,0 +354,0 @@ }; |
@@ -15,2 +15,3 @@ /** | ||
function performWorkUntilDeadline() { | ||
needsPaint = !1; | ||
if (isMessageLoopRunning) { | ||
@@ -226,5 +227,11 @@ var currentTime = getCurrentTime(); | ||
function shouldYieldToHost() { | ||
return getCurrentTime() - startTime < frameInterval ? !1 : !0; | ||
return needsPaint | ||
? !0 | ||
: getCurrentTime() - startTime < frameInterval | ||
? !1 | ||
: !0; | ||
} | ||
function requestPaint() {} | ||
function requestPaint() { | ||
needsPaint = !0; | ||
} | ||
function requestHostTimeout(callback, ms) { | ||
@@ -261,2 +268,3 @@ taskTimeoutID = localSetTimeout(function () { | ||
isHostTimeoutScheduled = !1, | ||
needsPaint = !1, | ||
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, | ||
@@ -336,9 +344,6 @@ localClearTimeout = | ||
exports.unstable_cancelCallback = unstable_cancelCallback; | ||
exports.unstable_continueExecution = throwNotImplemented; | ||
exports.unstable_forceFrameRate = throwNotImplemented; | ||
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; | ||
exports.unstable_getFirstCallbackNode = throwNotImplemented; | ||
exports.unstable_next = throwNotImplemented; | ||
exports.unstable_now = unstable_now; | ||
exports.unstable_pauseExecution = throwNotImplemented; | ||
exports.unstable_requestPaint = unstable_requestPaint; | ||
@@ -345,0 +350,0 @@ exports.unstable_runWithPriority = throwNotImplemented; |
@@ -81,2 +81,3 @@ /** | ||
isHostTimeoutScheduled = !1, | ||
needsPaint = !1, | ||
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, | ||
@@ -172,6 +173,9 @@ localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, | ||
function shouldYieldToHost() { | ||
return 5 > getCurrentTime() - startTime ? !1 : !0; | ||
return needsPaint ? !0 : 5 > getCurrentTime() - startTime ? !1 : !0; | ||
} | ||
function requestPaint() {} | ||
function requestPaint() { | ||
needsPaint = !0; | ||
} | ||
function performWorkUntilDeadline() { | ||
needsPaint = !1; | ||
if (isMessageLoopRunning) { | ||
@@ -320,9 +324,6 @@ var currentTime = getCurrentTime(); | ||
exports.unstable_cancelCallback = unstable_cancelCallback; | ||
exports.unstable_continueExecution = throwNotImplemented; | ||
exports.unstable_forceFrameRate = throwNotImplemented; | ||
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; | ||
exports.unstable_getFirstCallbackNode = throwNotImplemented; | ||
exports.unstable_next = throwNotImplemented; | ||
exports.unstable_now = unstable_now; | ||
exports.unstable_pauseExecution = throwNotImplemented; | ||
exports.unstable_requestPaint = unstable_requestPaint; | ||
@@ -329,0 +330,0 @@ exports.unstable_runWithPriority = throwNotImplemented; |
@@ -81,2 +81,3 @@ /** | ||
isHostTimeoutScheduled = !1, | ||
needsPaint = !1, | ||
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, | ||
@@ -101,3 +102,5 @@ localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, | ||
if (null !== peek(taskQueue)) | ||
(isHostCallbackScheduled = !0), requestHostCallback(); | ||
(isHostCallbackScheduled = !0), | ||
isMessageLoopRunning || | ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); | ||
else { | ||
@@ -114,5 +117,10 @@ var firstTimer = peek(timerQueue); | ||
function shouldYieldToHost() { | ||
return exports.unstable_now() - startTime < frameInterval ? !1 : !0; | ||
return needsPaint | ||
? !0 | ||
: exports.unstable_now() - startTime < frameInterval | ||
? !1 | ||
: !0; | ||
} | ||
function performWorkUntilDeadline() { | ||
needsPaint = !1; | ||
if (isMessageLoopRunning) { | ||
@@ -203,6 +211,2 @@ var currentTime = exports.unstable_now(); | ||
}; | ||
function requestHostCallback() { | ||
isMessageLoopRunning || | ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); | ||
} | ||
function requestHostTimeout(callback, ms) { | ||
@@ -222,7 +226,2 @@ taskTimeoutID = localSetTimeout(function () { | ||
}; | ||
exports.unstable_continueExecution = function () { | ||
isHostCallbackScheduled || | ||
isPerformingWork || | ||
((isHostCallbackScheduled = !0), requestHostCallback()); | ||
}; | ||
exports.unstable_forceFrameRate = function (fps) { | ||
@@ -238,5 +237,2 @@ 0 > fps || 125 < fps | ||
}; | ||
exports.unstable_getFirstCallbackNode = function () { | ||
return peek(taskQueue); | ||
}; | ||
exports.unstable_next = function (eventHandler) { | ||
@@ -260,4 +256,5 @@ switch (currentPriorityLevel) { | ||
}; | ||
exports.unstable_pauseExecution = function () {}; | ||
exports.unstable_requestPaint = function () {}; | ||
exports.unstable_requestPaint = function () { | ||
needsPaint = !0; | ||
}; | ||
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { | ||
@@ -333,3 +330,5 @@ switch (priorityLevel) { | ||
isPerformingWork || | ||
((isHostCallbackScheduled = !0), requestHostCallback())); | ||
((isHostCallbackScheduled = !0), | ||
isMessageLoopRunning || | ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()))); | ||
return priorityLevel; | ||
@@ -336,0 +335,0 @@ }; |
{ | ||
"name": "scheduler", | ||
"version": "0.26.0-canary-4dff0e62-20241213", | ||
"version": "0.26.0-canary-518d06d2-20241219", | ||
"description": "Cooperative scheduler for the browser environment.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82690
2498