scheduler 0.17.0 → 0.18.0

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
2
  "branch": "master",
3
- "buildNumber": "54423",
4
- "checksum": "3b849cc",
5
- "commit": "5faf377df",
3
+ "buildNumber": "59518",
4
+ "checksum": "6f449c4",
5
+ "commit": "b53ea6ca0",
6
6
  "environment": "ci",
7
- "reactVersion": "16.10.2-5faf377df"
7
+ "reactVersion": "16.11.0-b53ea6ca0"
8
8
  }
@@ -1,4 +1,4 @@
1
- /** @license React v0.17.0
1
+ /** @license React v0.18.0
2
2
  * scheduler-tracing.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -17,12 +17,8 @@ if (process.env.NODE_ENV !== "production") {
17
17
 
18
18
  Object.defineProperty(exports, '__esModule', { value: true });
19
19
 
20
- // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
21
-
22
- // In some cases, StrictMode should also double-render lifecycles.
23
- // This can be confusing for tests though,
24
- // And it can be bad for performance in production.
25
- // This feature flag can be used to control the behavior:
20
+ // Helps identify side effects in render-phase lifecycle hooks and setState
21
+ // reducers by double invoking them in Strict Mode.
26
22
 
27
23
  // To preserve the "Pause on caught exceptions" behavior of the debugger, we
28
24
  // replay the begin phase of a failed component inside invokeGuardedCallback.
@@ -58,7 +54,7 @@ var enableSchedulerTracing = true; // SSR experiments
58
54
  // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
59
55
 
60
56
  // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
61
- // Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
57
+ // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version
62
58
 
63
59
  // For tests, we flush suspense fallbacks in an act scope;
64
60
  // *except* in some of our own tests, where we test incremental loading states.
@@ -73,6 +69,12 @@ var enableSchedulerTracing = true; // SSR experiments
73
69
  // from React.createElement to React.jsx
74
70
  // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
75
71
 
72
+
73
+
74
+
75
+
76
+ // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance
77
+
76
78
  var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
77
79
 
78
80
  var interactionIDCounter = 0;
@@ -1,4 +1,4 @@
1
- /** @license React v0.17.0
1
+ /** @license React v0.18.0
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.17.0
1
+ /** @license React v0.18.0
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.17.0
1
+ /** @license React v0.18.0
2
2
  * scheduler-unstable_mock.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -19,7 +19,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
19
19
 
20
20
  var enableSchedulerDebugging = false;
21
21
 
22
-
23
22
  var enableProfiling = true;
24
23
 
25
24
  var currentTime = 0;
@@ -1,4 +1,4 @@
1
- /** @license React v0.17.0
1
+ /** @license React v0.18.0
2
2
  * scheduler-unstable_mock.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- /** @license React v0.17.0
1
+ /** @license React v0.18.0
2
2
  * scheduler.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -19,16 +19,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
19
19
 
20
20
  var enableSchedulerDebugging = false;
21
21
  var enableIsInputPending = false;
22
- var enableMessageLoopImplementation = true;
23
22
  var enableProfiling = true;
24
23
 
25
- // works by scheduling a requestAnimationFrame, storing the time for the start
26
- // of the frame, then scheduling a postMessage which gets scheduled after paint.
27
- // Within the postMessage handler do as much work as possible until time + frame
28
- // rate. By separating the idle call into a separate event tick we ensure that
29
- // layout, paint and other browser work is counted against the available time.
30
- // The frame rate is dynamically adjusted.
31
-
32
24
  var requestHostCallback;
33
25
 
34
26
  var requestHostTimeout;
@@ -98,11 +90,14 @@ typeof MessageChannel !== 'function') {
98
90
  var _Date = window.Date;
99
91
  var _setTimeout = window.setTimeout;
100
92
  var _clearTimeout = window.clearTimeout;
101
- var requestAnimationFrame = window.requestAnimationFrame;
102
- var cancelAnimationFrame = window.cancelAnimationFrame;
103
93
 
104
94
  if (typeof console !== 'undefined') {
105
- // TODO: Remove fb.me link
95
+ // TODO: Scheduler no longer requires these methods to be polyfilled. But
96
+ // maybe we want to continue warning if they don't exist, to preserve the
97
+ // option to rely on it in the future?
98
+ var requestAnimationFrame = window.requestAnimationFrame;
99
+ var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link
100
+
106
101
  if (typeof requestAnimationFrame !== 'function') {
107
102
  console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
108
103
  }
@@ -124,26 +119,18 @@ typeof MessageChannel !== 'function') {
124
119
  };
125
120
  }
126
121
 
127
- var isRAFLoopRunning = false;
128
122
  var isMessageLoopRunning = false;
129
123
  var scheduledHostCallback = null;
130
- var rAFTimeoutID = -1;
131
- var taskTimeoutID = -1;
132
- var frameLength = enableMessageLoopImplementation ? // We won't attempt to align with the vsync. Instead we'll yield multiple
133
- // times per frame, often enough to keep it responsive even at really
134
- // high frame rates > 120.
135
- 5 : // Use a heuristic to measure the frame rate and yield at the end of the
136
- // frame. We start out assuming that we run at 30fps but then the
137
- // heuristic tracking will adjust this value to a faster fps if we get
138
- // more frequent animation frames.
139
- 33.33;
140
- var prevRAFTime = -1;
141
- var prevRAFInterval = -1;
142
- var frameDeadline = 0;
143
- var fpsLocked = false; // TODO: Make this configurable
124
+ var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
125
+ // thread, like user events. By default, it yields multiple times per frame.
126
+ // It does not attempt to align with frame boundaries, since most tasks don't
127
+ // need to be frame aligned; for those that do, use requestAnimationFrame.
128
+
129
+ var yieldInterval = 5;
130
+ var deadline = 0; // TODO: Make this configurable
144
131
  // TODO: Adjust this based on priority?
145
132
 
146
- var maxFrameLength = 300;
133
+ var maxYieldInterval = 300;
147
134
  var needsPaint = false;
148
135
 
149
136
  if (enableIsInputPending && navigator !== undefined && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined) {
@@ -152,23 +139,23 @@ typeof MessageChannel !== 'function') {
152
139
  shouldYieldToHost = function () {
153
140
  var currentTime = exports.unstable_now();
154
141
 
155
- if (currentTime >= frameDeadline) {
156
- // There's no time left in the frame. We may want to yield control of
157
- // the main thread, so the browser can perform high priority tasks. The
158
- // main ones are painting and user input. If there's a pending paint or
159
- // a pending input, then we should yield. But if there's neither, then
160
- // we can yield less often while remaining responsive. We'll eventually
161
- // yield regardless, since there could be a pending paint that wasn't
142
+ if (currentTime >= deadline) {
143
+ // There's no time left. We may want to yield control of the main
144
+ // thread, so the browser can perform high priority tasks. The main ones
145
+ // are painting and user input. If there's a pending paint or a pending
146
+ // input, then we should yield. But if there's neither, then we can
147
+ // yield less often while remaining responsive. We'll eventually yield
148
+ // regardless, since there could be a pending paint that wasn't
162
149
  // accompanied by a call to `requestPaint`, or other main thread tasks
163
150
  // like network events.
164
151
  if (needsPaint || scheduling.isInputPending()) {
165
152
  // There is either a pending paint or a pending input.
166
153
  return true;
167
154
  } // There's no pending input. Only yield if we've reached the max
168
- // frame length.
155
+ // yield interval.
169
156
 
170
157
 
171
- return currentTime >= frameDeadline + maxFrameLength;
158
+ return currentTime >= maxYieldInterval;
172
159
  } else {
173
160
  // There's still time left in the frame.
174
161
  return false;
@@ -182,7 +169,7 @@ typeof MessageChannel !== 'function') {
182
169
  // `isInputPending` is not available. Since we have no way of knowing if
183
170
  // there's pending input, always yield at the end of the frame.
184
171
  shouldYieldToHost = function () {
185
- return exports.unstable_now() >= frameDeadline;
172
+ return exports.unstable_now() >= deadline;
186
173
  }; // Since we yield every frame regardless, `requestPaint` has no effect.
187
174
 
188
175
 
@@ -196,166 +183,58 @@ typeof MessageChannel !== 'function') {
196
183
  }
197
184
 
198
185
  if (fps > 0) {
199
- frameLength = Math.floor(1000 / fps);
200
- fpsLocked = true;
186
+ yieldInterval = Math.floor(1000 / fps);
201
187
  } else {
202
188
  // reset the framerate
203
- frameLength = 33.33;
204
- fpsLocked = false;
189
+ yieldInterval = 5;
205
190
  }
206
191
  };
207
192
 
208
193
  var performWorkUntilDeadline = function () {
209
- if (enableMessageLoopImplementation) {
210
- if (scheduledHostCallback !== null) {
211
- var currentTime = exports.unstable_now(); // Yield after `frameLength` ms, regardless of where we are in the vsync
212
- // cycle. This means there's always time remaining at the beginning of
213
- // the message event.
214
-
215
- frameDeadline = currentTime + frameLength;
216
- var hasTimeRemaining = true;
217
-
218
- try {
219
- var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
220
-
221
- if (!hasMoreWork) {
222
- isMessageLoopRunning = false;
223
- scheduledHostCallback = null;
224
- } else {
225
- // If there's more work, schedule the next message event at the end
226
- // of the preceding one.
227
- port.postMessage(null);
228
- }
229
- } catch (error) {
230
- // If a scheduler task throws, exit the current browser task so the
231
- // error can be observed.
232
- port.postMessage(null);
233
- throw error;
234
- }
235
- } else {
236
- isMessageLoopRunning = false;
237
- } // Yielding to the browser will give it a chance to paint, so we can
238
- // reset this.
239
-
240
-
241
- needsPaint = false;
242
- } else {
243
- if (scheduledHostCallback !== null) {
244
- var _currentTime = exports.unstable_now();
245
-
246
- var _hasTimeRemaining = frameDeadline - _currentTime > 0;
194
+ if (scheduledHostCallback !== null) {
195
+ var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
196
+ // cycle. This means there's always time remaining at the beginning of
197
+ // the message event.
247
198
 
248
- try {
249
- var _hasMoreWork = scheduledHostCallback(_hasTimeRemaining, _currentTime);
199
+ deadline = currentTime + yieldInterval;
200
+ var hasTimeRemaining = true;
250
201
 
251
- if (!_hasMoreWork) {
252
- scheduledHostCallback = null;
253
- }
254
- } catch (error) {
255
- // If a scheduler task throws, exit the current browser task so the
256
- // error can be observed, and post a new task as soon as possible
257
- // so we can continue where we left off.
202
+ try {
203
+ var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
204
+
205
+ if (!hasMoreWork) {
206
+ isMessageLoopRunning = false;
207
+ scheduledHostCallback = null;
208
+ } else {
209
+ // If there's more work, schedule the next message event at the end
210
+ // of the preceding one.
258
211
  port.postMessage(null);
259
- throw error;
260
212
  }
261
- } // Yielding to the browser will give it a chance to paint, so we can
262
- // reset this.
213
+ } catch (error) {
214
+ // If a scheduler task throws, exit the current browser task so the
215
+ // error can be observed.
216
+ port.postMessage(null);
217
+ throw error;
218
+ }
219
+ } else {
220
+ isMessageLoopRunning = false;
221
+ } // Yielding to the browser will give it a chance to paint, so we can
222
+ // reset this.
263
223
 
264
224
 
265
- needsPaint = false;
266
- }
225
+ needsPaint = false;
267
226
  };
268
227
 
269
228
  var channel = new MessageChannel();
270
229
  var port = channel.port2;
271
230
  channel.port1.onmessage = performWorkUntilDeadline;
272
231
 
273
- var onAnimationFrame = function (rAFTime) {
274
- if (scheduledHostCallback === null) {
275
- // No scheduled work. Exit.
276
- prevRAFTime = -1;
277
- prevRAFInterval = -1;
278
- isRAFLoopRunning = false;
279
- return;
280
- } // Eagerly schedule the next animation callback at the beginning of the
281
- // frame. If the scheduler queue is not empty at the end of the frame, it
282
- // will continue flushing inside that callback. If the queue *is* empty,
283
- // then it will exit immediately. Posting the callback at the start of the
284
- // frame ensures it's fired within the earliest possible frame. If we
285
- // waited until the end of the frame to post the callback, we risk the
286
- // browser skipping a frame and not firing the callback until the frame
287
- // after that.
288
-
289
-
290
- isRAFLoopRunning = true;
291
- requestAnimationFrame(function (nextRAFTime) {
292
- _clearTimeout(rAFTimeoutID);
293
-
294
- onAnimationFrame(nextRAFTime);
295
- }); // requestAnimationFrame is throttled when the tab is backgrounded. We
296
- // don't want to stop working entirely. So we'll fallback to a timeout loop.
297
- // TODO: Need a better heuristic for backgrounded work.
298
-
299
- var onTimeout = function () {
300
- frameDeadline = exports.unstable_now() + frameLength / 2;
301
- performWorkUntilDeadline();
302
- rAFTimeoutID = _setTimeout(onTimeout, frameLength * 3);
303
- };
304
-
305
- rAFTimeoutID = _setTimeout(onTimeout, frameLength * 3);
306
-
307
- if (prevRAFTime !== -1 && // Make sure this rAF time is different from the previous one. This check
308
- // could fail if two rAFs fire in the same frame.
309
- rAFTime - prevRAFTime > 0.1) {
310
- var rAFInterval = rAFTime - prevRAFTime;
311
-
312
- if (!fpsLocked && prevRAFInterval !== -1) {
313
- // We've observed two consecutive frame intervals. We'll use this to
314
- // dynamically adjust the frame rate.
315
- //
316
- // If one frame goes long, then the next one can be short to catch up.
317
- // If two frames are short in a row, then that's an indication that we
318
- // actually have a higher frame rate than what we're currently
319
- // optimizing. For example, if we're running on 120hz display or 90hz VR
320
- // display. Take the max of the two in case one of them was an anomaly
321
- // due to missed frame deadlines.
322
- if (rAFInterval < frameLength && prevRAFInterval < frameLength) {
323
- frameLength = rAFInterval < prevRAFInterval ? prevRAFInterval : rAFInterval;
324
-
325
- if (frameLength < 8.33) {
326
- // Defensive coding. We don't support higher frame rates than 120hz.
327
- // If the calculated frame length gets lower than 8, it is probably
328
- // a bug.
329
- frameLength = 8.33;
330
- }
331
- }
332
- }
333
-
334
- prevRAFInterval = rAFInterval;
335
- }
336
-
337
- prevRAFTime = rAFTime;
338
- frameDeadline = rAFTime + frameLength; // We use the postMessage trick to defer idle work until after the repaint.
339
-
340
- port.postMessage(null);
341
- };
342
-
343
232
  requestHostCallback = function (callback) {
344
233
  scheduledHostCallback = callback;
345
234
 
346
- if (enableMessageLoopImplementation) {
347
- if (!isMessageLoopRunning) {
348
- isMessageLoopRunning = true;
349
- port.postMessage(null);
350
- }
351
- } else {
352
- if (!isRAFLoopRunning) {
353
- // Start a rAF loop.
354
- isRAFLoopRunning = true;
355
- requestAnimationFrame(function (rAFTime) {
356
- onAnimationFrame(rAFTime);
357
- });
358
- }
235
+ if (!isMessageLoopRunning) {
236
+ isMessageLoopRunning = true;
237
+ port.postMessage(null);
359
238
  }
360
239
  };
361
240
 
@@ -1,4 +1,4 @@
1
- /** @license React v0.17.0
1
+ /** @license React v0.18.0
2
2
  * scheduler.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -9,14 +9,14 @@
9
9
 
10
10
  'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var f,g,h,k,l;
11
11
  if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,
12
- y=window.setTimeout,z=window.clearTimeout,A=window.requestAnimationFrame,B=window.cancelAnimationFrame;"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"),"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"));if("object"===typeof w&&
13
- "function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var C=x.now();exports.unstable_now=function(){return x.now()-C}}var D=!1,E=null,F=-1,G=5,H=0;k=function(){return exports.unstable_now()>=H};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):G=0<a?Math.floor(1E3/a):33.33};var I=new MessageChannel,J=I.port2;I.port1.onmessage=
14
- function(){if(null!==E){var a=exports.unstable_now();H=a+G;try{E(!0,a)?J.postMessage(null):(D=!1,E=null)}catch(b){throw J.postMessage(null),b;}}else D=!1};f=function(a){E=a;D||(D=!0,J.postMessage(null))};g=function(a,b){F=y(function(){a(exports.unstable_now())},b)};h=function(){z(F);F=-1}}function K(a,b){var c=a.length;a.push(b);a:for(;;){var d=Math.floor((c-1)/2),e=a[d];if(void 0!==e&&0<L(e,b))a[d]=b,a[c]=e,c=d;else break a}}function M(a){a=a[0];return void 0===a?null:a}
15
- function N(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>L(n,c))void 0!==r&&0>L(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>L(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function L(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var O=[],P=[],Q=1,R=null,S=3,T=!1,U=!1,V=!1;
16
- function W(a){for(var b=M(P);null!==b;){if(null===b.callback)N(P);else if(b.startTime<=a)N(P),b.sortIndex=b.expirationTime,K(O,b);else break;b=M(P)}}function X(a){V=!1;W(a);if(!U)if(null!==M(O))U=!0,f(Y);else{var b=M(P);null!==b&&g(X,b.startTime-a)}}
17
- function Y(a,b){U=!1;V&&(V=!1,h());T=!0;var c=S;try{W(b);for(R=M(O);null!==R&&(!(R.expirationTime>b)||a&&!k());){var d=R.callback;if(null!==d){R.callback=null;S=R.priorityLevel;var e=d(R.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?R.callback=e:R===M(O)&&N(O);W(b)}else N(O);R=M(O)}if(null!==R)var m=!0;else{var n=M(P);null!==n&&g(X,n.startTime-b);m=!1}return m}finally{R=null,S=c,T=!1}}
18
- function Z(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var aa=l;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=S;S=a;try{return b()}finally{S=c}};
19
- exports.unstable_next=function(a){switch(S){case 1:case 2:case 3:var b=3;break;default:b=S}var c=S;S=b;try{return a()}finally{S=c}};
20
- exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Z(a)}else c=Z(a),e=d;c=e+c;a={id:Q++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,K(P,a),null===M(O)&&a===M(P)&&(V?h():V=!0,g(X,e-d))):(a.sortIndex=c,K(O,a),U||T||(U=!0,f(Y)));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
21
- exports.unstable_wrapCallback=function(a){var b=S;return function(){var c=S;S=b;try{return a.apply(this,arguments)}finally{S=c}}};exports.unstable_getCurrentPriorityLevel=function(){return S};exports.unstable_shouldYield=function(){var a=exports.unstable_now();W(a);var b=M(O);return b!==R&&null!==R&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<R.expirationTime||k()};exports.unstable_requestPaint=aa;exports.unstable_continueExecution=function(){U||T||(U=!0,f(Y))};
22
- exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return M(O)};exports.unstable_Profiling=null;
12
+ y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&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 A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===
13
+ typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):F=0<a?Math.floor(1E3/a):5};var H=new MessageChannel,I=H.port2;H.port1.onmessage=
14
+ function(){if(null!==D){var a=exports.unstable_now();G=a+F;try{D(!0,a)?I.postMessage(null):(C=!1,D=null)}catch(b){throw I.postMessage(null),b;}}else C=!1};f=function(a){D=a;C||(C=!0,I.postMessage(null))};g=function(a,b){E=y(function(){a(exports.unstable_now())},b)};h=function(){z(E);E=-1}}function J(a,b){var c=a.length;a.push(b);a:for(;;){var d=Math.floor((c-1)/2),e=a[d];if(void 0!==e&&0<K(e,b))a[d]=b,a[c]=e,c=d;else break a}}function L(a){a=a[0];return void 0===a?null:a}
15
+ function M(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;
16
+ function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}
17
+ function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}
18
+ function Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;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=R;R=a;try{return b()}finally{R=c}};
19
+ exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};
20
+ exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),e=d;c=e+c;a={id:P++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
21
+ exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<Q.expirationTime||k()};exports.unstable_requestPaint=Z;exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};
22
+ exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_Profiling=null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scheduler",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Cooperative scheduler for the browser environment.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- /** @license React v0.17.0
1
+ /** @license React v0.18.0
2
2
  * scheduler-unstable_mock.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -17,7 +17,6 @@
17
17
 
18
18
  var enableSchedulerDebugging = false;
19
19
 
20
-
21
20
  var enableProfiling = true;
22
21
 
23
22
  var currentTime = 0;
@@ -1,4 +1,4 @@
1
- /** @license React v0.17.0
1
+ /** @license React v0.18.0
2
2
  * scheduler-unstable_mock.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.