scheduler 0.13.0 → 0.13.4

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/build-info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "branch": "master",
3
- "buildNumber": "13364",
4
- "checksum": "ae8143f",
5
- "commit": "d1326f466",
2
+ "branch": "16.8.4",
3
+ "buildNumber": "13714",
4
+ "checksum": "94d3bf9",
5
+ "commit": "741aa17a3",
6
6
  "environment": "ci",
7
- "reactVersion": "16.7.0-canary-d1326f466"
7
+ "reactVersion": "16.8.3-canary-741aa17a3"
8
8
  }
@@ -1,4 +1,4 @@
1
- /** @license React v0.13.0
1
+ /** @license React v0.13.4
2
2
  * scheduler-tracing.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- /** @license React v0.13.0
1
+ /** @license React v0.13.4
2
2
  * scheduler-tracing.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- /** @license React v0.13.0
1
+ /** @license React v0.13.4
2
2
  * scheduler-tracing.profiling.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- /** @license React v0.13.0
1
+ /** @license React v0.13.4
2
2
  * scheduler.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -262,6 +262,37 @@ function unstable_runWithPriority(priorityLevel, eventHandler) {
262
262
  }
263
263
  }
264
264
 
265
+ function unstable_next(eventHandler) {
266
+ var priorityLevel = void 0;
267
+ switch (currentPriorityLevel) {
268
+ case ImmediatePriority:
269
+ case UserBlockingPriority:
270
+ case NormalPriority:
271
+ // Shift down to normal priority
272
+ priorityLevel = NormalPriority;
273
+ break;
274
+ default:
275
+ // Anything lower than normal priority should remain at the current level.
276
+ priorityLevel = currentPriorityLevel;
277
+ break;
278
+ }
279
+
280
+ var previousPriorityLevel = currentPriorityLevel;
281
+ var previousEventStartTime = currentEventStartTime;
282
+ currentPriorityLevel = priorityLevel;
283
+ currentEventStartTime = exports.unstable_now();
284
+
285
+ try {
286
+ return eventHandler();
287
+ } finally {
288
+ currentPriorityLevel = previousPriorityLevel;
289
+ currentEventStartTime = previousEventStartTime;
290
+
291
+ // Before exiting, flush all the immediate work that was scheduled.
292
+ flushImmediateWork();
293
+ }
294
+ }
295
+
265
296
  function unstable_wrapCallback(callback) {
266
297
  var parentPriorityLevel = currentPriorityLevel;
267
298
  return function () {
@@ -655,6 +686,7 @@ exports.unstable_NormalPriority = NormalPriority;
655
686
  exports.unstable_IdlePriority = IdlePriority;
656
687
  exports.unstable_LowPriority = LowPriority;
657
688
  exports.unstable_runWithPriority = unstable_runWithPriority;
689
+ exports.unstable_next = unstable_next;
658
690
  exports.unstable_scheduleCallback = unstable_scheduleCallback;
659
691
  exports.unstable_cancelCallback = unstable_cancelCallback;
660
692
  exports.unstable_wrapCallback = unstable_wrapCallback;
@@ -1,4 +1,4 @@
1
- /** @license React v0.13.0
1
+ /** @license React v0.13.4
2
2
  * scheduler.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -7,15 +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 c=null,f=!1,h=3,k=-1,l=-1,m=!1,n=!1;function p(){if(!m){var a=c.expirationTime;n?q():n=!0;r(t,a)}}
11
- function u(){var a=c,b=c.next;if(c===b)c=null;else{var d=c.previous;c=d.next=b;b.previous=d}a.next=a.previous=null;d=a.callback;b=a.expirationTime;a=a.priorityLevel;var e=h,Q=l;h=a;l=b;try{var g=d()}finally{h=e,l=Q}if("function"===typeof g)if(g={callback:g,priorityLevel:a,expirationTime:b,next:null,previous:null},null===c)c=g.next=g.previous=g;else{d=null;a=c;do{if(a.expirationTime>=b){d=a;break}a=a.next}while(a!==c);null===d?d=c:d===c&&(c=g,p());b=d.previous;b.next=d.previous=g;g.next=d;g.previous=
12
- b}}function v(){if(-1===k&&null!==c&&1===c.priorityLevel){m=!0;try{do u();while(null!==c&&1===c.priorityLevel)}finally{m=!1,null!==c?p():n=!1}}}function t(a){m=!0;var b=f;f=a;try{if(a)for(;null!==c;){var d=exports.unstable_now();if(c.expirationTime<=d){do u();while(null!==c&&c.expirationTime<=d)}else break}else if(null!==c){do u();while(null!==c&&!w())}}finally{m=!1,f=b,null!==c?p():n=!1,v()}}
10
+ 'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var d=null,e=!1,g=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 f=g,Q=l;g=a;l=b;try{var h=c()}finally{g=f,l=Q}if("function"===typeof h)if(h={callback:h,priorityLevel:a,expirationTime:b,next:null,previous:null},null===d)d=h.next=h.previous=h;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=h,p());b=c.previous;b.next=c.previous=h;h.next=c;h.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=e;e=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,e=b,null!==d?p():n=!1,v()}}
13
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
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,G=null;"undefined"!==typeof window?G=window:"undefined"!==typeof global&&(G=global);
15
15
  if(G&&G._schedMock){var H=G._schedMock;r=H[0];q=H[1];w=H[2];exports.unstable_now=H[3]}else if("undefined"===typeof window||"function"!==typeof MessageChannel){var I=null,J=function(a){if(null!==I)try{I(a)}finally{I=null}};r=function(a){null!==I?setTimeout(r,0,a):(I=a,setTimeout(J,0,!1))};q=function(){I=null};w=function(){return!1}}else{"undefined"!==typeof console&&("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"),
16
- "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=new MessageChannel,U=T.port2;T.port1.onmessage=function(){L=!1;var a=K,b=M;K=null;M=-1;var d=exports.unstable_now(),e=!1;if(0>=P-d)if(-1!==b&&b<=d)e=!0;else{N||(N=!0,E(V));K=a;M=b;return}if(null!==a){O=!0;try{a(e)}finally{O=!1}}};
16
+ "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=new MessageChannel,U=T.port2;T.port1.onmessage=function(){L=!1;var a=K,b=M;K=null;M=-1;var c=exports.unstable_now(),f=!1;if(0>=P-c)if(-1!==b&&b<=c)f=!0;else{N||(N=!0,E(V));K=a;M=b;return}if(null!==a){O=!0;try{a(f)}finally{O=!1}}};
17
17
  var V=function(a){if(null!==K){E(V);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,U.postMessage(void 0))}else N=!1};r=function(a,b){K=a;M=b;O||0>b?U.postMessage(void 0):N||(N=!0,E(V))};q=function(){K=null;L=!1;M=-1}}exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;
18
- exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var d=h,e=k;h=a;k=exports.unstable_now();try{return b()}finally{h=d,k=e,v()}};
19
- exports.unstable_scheduleCallback=function(a,b){var d=-1!==k?k:exports.unstable_now();if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=d+b.timeout;else switch(h){case 1:b=d+-1;break;case 2:b=d+250;break;case 5:b=d+1073741823;break;case 4:b=d+1E4;break;default:b=d+5E3}a={callback:a,priorityLevel:h,expirationTime:b,next:null,previous:null};if(null===c)c=a.next=a.previous=a,p();else{d=null;var e=c;do{if(e.expirationTime>b){d=e;break}e=e.next}while(e!==c);null===d?d=c:d===c&&(c=a,p());
20
- b=d.previous;b.next=d.previous=a;a.next=d;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)c=null;else{a===c&&(c=b);var d=a.previous;d.next=b;b.previous=d}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=h;return function(){var d=h,e=k;h=b;k=exports.unstable_now();try{return a.apply(this,arguments)}finally{h=d,k=e,v()}}};exports.unstable_getCurrentPriorityLevel=function(){return h};
21
- exports.unstable_shouldYield=function(){return!f&&(null!==c&&c.expirationTime<l||w())};exports.unstable_continueExecution=function(){null!==c&&p()};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return c};
18
+ exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=g,f=k;g=a;k=exports.unstable_now();try{return b()}finally{g=c,k=f,v()}};exports.unstable_next=function(a){switch(g){case 1:case 2:case 3:var b=3;break;default:b=g}var c=g,f=k;g=b;k=exports.unstable_now();try{return a()}finally{g=c,k=f,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(g){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:g,expirationTime:b,next:null,previous:null};if(null===d)d=a.next=a.previous=a,p();else{c=null;var f=d;do{if(f.expirationTime>b){c=f;break}f=f.next}while(f!==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=g;return function(){var c=g,f=k;g=b;k=exports.unstable_now();try{return a.apply(this,arguments)}finally{g=c,k=f,v()}}};exports.unstable_getCurrentPriorityLevel=function(){return g};
21
+ exports.unstable_shouldYield=function(){return!e&&(null!==d&&d.expirationTime<l||w())};exports.unstable_continueExecution=function(){null!==d&&p()};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return d};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scheduler",
3
- "version": "0.13.0",
3
+ "version": "0.13.4",
4
4
  "description": "Cooperative scheduler for the browser environment.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -54,6 +54,13 @@
54
54
  );
55
55
  }
56
56
 
57
+ function unstable_next() {
58
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
59
+ this,
60
+ arguments
61
+ );
62
+ }
63
+
57
64
  function unstable_wrapCallback() {
58
65
  return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
59
66
  this,
@@ -95,10 +102,31 @@
95
102
  unstable_cancelCallback: unstable_cancelCallback,
96
103
  unstable_shouldYield: unstable_shouldYield,
97
104
  unstable_runWithPriority: unstable_runWithPriority,
105
+ unstable_next: unstable_next,
98
106
  unstable_wrapCallback: unstable_wrapCallback,
99
107
  unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
100
108
  unstable_continueExecution: unstable_continueExecution,
101
109
  unstable_pauseExecution: unstable_pauseExecution,
102
110
  unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
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
+ },
103
131
  });
104
132
  });
@@ -54,6 +54,13 @@
54
54
  );
55
55
  }
56
56
 
57
+ function unstable_next() {
58
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
59
+ this,
60
+ arguments
61
+ );
62
+ }
63
+
57
64
  function unstable_wrapCallback() {
58
65
  return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
59
66
  this,
@@ -89,10 +96,31 @@
89
96
  unstable_cancelCallback: unstable_cancelCallback,
90
97
  unstable_shouldYield: unstable_shouldYield,
91
98
  unstable_runWithPriority: unstable_runWithPriority,
99
+ unstable_next: unstable_next,
92
100
  unstable_wrapCallback: unstable_wrapCallback,
93
101
  unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
94
102
  unstable_continueExecution: unstable_continueExecution,
95
103
  unstable_pauseExecution: unstable_pauseExecution,
96
104
  unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
105
+ get unstable_IdlePriority() {
106
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
107
+ .Scheduler.unstable_IdlePriority;
108
+ },
109
+ get unstable_ImmediatePriority() {
110
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
111
+ .Scheduler.unstable_ImmediatePriority;
112
+ },
113
+ get unstable_LowPriority() {
114
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
115
+ .Scheduler.unstable_LowPriority;
116
+ },
117
+ get unstable_NormalPriority() {
118
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
119
+ .Scheduler.unstable_NormalPriority;
120
+ },
121
+ get unstable_UserBlockingPriority() {
122
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
123
+ .Scheduler.unstable_UserBlockingPriority;
124
+ },
97
125
  });
98
126
  });
@@ -54,6 +54,13 @@
54
54
  );
55
55
  }
56
56
 
57
+ function unstable_next() {
58
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
59
+ this,
60
+ arguments
61
+ );
62
+ }
63
+
57
64
  function unstable_wrapCallback() {
58
65
  return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
59
66
  this,
@@ -89,10 +96,31 @@
89
96
  unstable_cancelCallback: unstable_cancelCallback,
90
97
  unstable_shouldYield: unstable_shouldYield,
91
98
  unstable_runWithPriority: unstable_runWithPriority,
99
+ unstable_next: unstable_next,
92
100
  unstable_wrapCallback: unstable_wrapCallback,
93
101
  unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
94
102
  unstable_continueExecution: unstable_continueExecution,
95
103
  unstable_pauseExecution: unstable_pauseExecution,
96
104
  unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
105
+ get unstable_IdlePriority() {
106
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
107
+ .Scheduler.unstable_IdlePriority;
108
+ },
109
+ get unstable_ImmediatePriority() {
110
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
111
+ .Scheduler.unstable_ImmediatePriority;
112
+ },
113
+ get unstable_LowPriority() {
114
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
115
+ .Scheduler.unstable_LowPriority;
116
+ },
117
+ get unstable_NormalPriority() {
118
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
119
+ .Scheduler.unstable_NormalPriority;
120
+ },
121
+ get unstable_UserBlockingPriority() {
122
+ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
123
+ .Scheduler.unstable_UserBlockingPriority;
124
+ },
97
125
  });
98
126
  });