react 16.0.0-alpha.2 → 16.0.0-alpha.6

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.
Files changed (36) hide show
  1. package/dist/react.js +330 -295
  2. package/dist/react.min.js +3 -3
  3. package/lib/React.js +4 -14
  4. package/lib/ReactClass.js +5 -11
  5. package/lib/ReactComponentTreeHook.js +8 -47
  6. package/lib/ReactCurrentOwner.js +0 -2
  7. package/lib/ReactDebugCurrentFrame.js +55 -0
  8. package/lib/ReactElementValidator.js +44 -21
  9. package/lib/ReactFiberComponentTreeHook.js +62 -0
  10. package/lib/ReactNoopUpdateQueue.js +0 -1
  11. package/lib/ReactPropTypes.js +12 -23
  12. package/lib/ReactVersion.js +1 -1
  13. package/lib/checkPropTypes.js +64 -0
  14. package/lib/checkReactTypeSpec.js +5 -81
  15. package/lib/deprecated.js +1 -1
  16. package/lib/traverseAllChildren.js +2 -2
  17. package/package.json +1 -1
  18. package/dist/react-with-addons.js +0 -5323
  19. package/dist/react-with-addons.min.js +0 -17
  20. package/lib/ReactAddonsDOMDependencies.js +0 -36
  21. package/lib/ReactAddonsDOMDependenciesUMDShim.js +0 -35
  22. package/lib/ReactCSSTransitionGroup.js +0 -104
  23. package/lib/ReactCSSTransitionGroupChild.js +0 -166
  24. package/lib/ReactComponentWithPureRenderMixin.js +0 -47
  25. package/lib/ReactFragment.js +0 -68
  26. package/lib/ReactPropTypeLocationNames.js +0 -24
  27. package/lib/ReactPropTypeLocations.js +0 -12
  28. package/lib/ReactStateSetters.js +0 -103
  29. package/lib/ReactTransitionChildMapping.js +0 -102
  30. package/lib/ReactTransitionEvents.js +0 -72
  31. package/lib/ReactTransitionGroup.js +0 -228
  32. package/lib/ReactWithAddons.js +0 -50
  33. package/lib/ReactWithAddonsUMDEntry.js +0 -32
  34. package/lib/shallowCompare.js +0 -24
  35. package/lib/sliceChildren.js +0 -33
  36. package/lib/update.js +0 -111
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React v16.0.0-alpha.2
2
+ * React v16.0.0-alpha.6
3
3
  */
4
4
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
5
5
  /**
@@ -74,9 +74,9 @@ module.exports = KeyEscapeUtils;
74
74
 
75
75
  'use strict';
76
76
 
77
- var _prodInvariant = _dereq_(25);
77
+ var _prodInvariant = _dereq_(27);
78
78
 
79
- var invariant = _dereq_(29);
79
+ var invariant = _dereq_(31);
80
80
 
81
81
  /**
82
82
  * Static poolers. Several custom versions for each potential number of
@@ -172,7 +172,7 @@ var PooledClass = {
172
172
  };
173
173
 
174
174
  module.exports = PooledClass;
175
- },{"25":25,"29":29}],3:[function(_dereq_,module,exports){
175
+ },{"27":27,"31":31}],3:[function(_dereq_,module,exports){
176
176
  /**
177
177
  * Copyright 2013-present, Facebook, Inc.
178
178
  * All rights reserved.
@@ -185,43 +185,35 @@ module.exports = PooledClass;
185
185
 
186
186
  'use strict';
187
187
 
188
- var _assign = _dereq_(31);
189
-
190
188
  var ReactBaseClasses = _dereq_(4);
191
189
  var ReactChildren = _dereq_(5);
192
190
  var ReactClass = _dereq_(6);
193
191
  var ReactDOMFactories = _dereq_(9);
194
- var ReactElement = _dereq_(10);
195
- var ReactPropTypes = _dereq_(15);
196
- var ReactVersion = _dereq_(19);
192
+ var ReactElement = _dereq_(11);
193
+ var ReactPropTypes = _dereq_(16);
194
+ var ReactVersion = _dereq_(20);
197
195
 
198
- var onlyChild = _dereq_(24);
199
- var warning = _dereq_(30);
196
+ var onlyChild = _dereq_(26);
197
+ var warning = _dereq_(32);
198
+ var checkPropTypes = _dereq_(22);
200
199
 
201
200
  var createElement = ReactElement.createElement;
202
201
  var createFactory = ReactElement.createFactory;
203
202
  var cloneElement = ReactElement.cloneElement;
204
203
 
205
204
  if ("development" !== 'production') {
206
- var ReactElementValidator = _dereq_(12);
205
+ var ReactElementValidator = _dereq_(13);
207
206
  createElement = ReactElementValidator.createElement;
208
207
  createFactory = ReactElementValidator.createFactory;
209
208
  cloneElement = ReactElementValidator.cloneElement;
210
209
  }
211
210
 
212
- var __spread = _assign;
213
211
  var createMixin = function (mixin) {
214
212
  return mixin;
215
213
  };
216
214
 
217
215
  if ("development" !== 'production') {
218
- var warnedForSpread = false;
219
216
  var warnedForCreateMixin = false;
220
- __spread = function () {
221
- "development" !== 'production' ? warning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;
222
- warnedForSpread = true;
223
- return _assign.apply(null, arguments);
224
- };
225
217
 
226
218
  createMixin = function (mixin) {
227
219
  "development" !== 'production' ? warning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. You ' + 'can use this mixin directly instead.') : void 0;
@@ -231,7 +223,6 @@ if ("development" !== 'production') {
231
223
  }
232
224
 
233
225
  var React = {
234
-
235
226
  // Modern
236
227
 
237
228
  Children: {
@@ -249,6 +240,8 @@ var React = {
249
240
  cloneElement: cloneElement,
250
241
  isValidElement: ReactElement.isValidElement,
251
242
 
243
+ checkPropTypes: checkPropTypes,
244
+
252
245
  // Classic
253
246
 
254
247
  PropTypes: ReactPropTypes,
@@ -260,14 +253,11 @@ var React = {
260
253
  // since they are just generating DOM strings.
261
254
  DOM: ReactDOMFactories,
262
255
 
263
- version: ReactVersion,
264
-
265
- // Deprecated hook for JSX spread, don't use this for anything.
266
- __spread: __spread
256
+ version: ReactVersion
267
257
  };
268
258
 
269
259
  module.exports = React;
270
- },{"10":10,"12":12,"15":15,"19":19,"24":24,"30":30,"31":31,"4":4,"5":5,"6":6,"9":9}],4:[function(_dereq_,module,exports){
260
+ },{"11":11,"13":13,"16":16,"20":20,"22":22,"26":26,"32":32,"4":4,"5":5,"6":6,"9":9}],4:[function(_dereq_,module,exports){
271
261
  /**
272
262
  * Copyright 2013-present, Facebook, Inc.
273
263
  * All rights reserved.
@@ -280,15 +270,15 @@ module.exports = React;
280
270
 
281
271
  'use strict';
282
272
 
283
- var _prodInvariant = _dereq_(25),
284
- _assign = _dereq_(31);
273
+ var _prodInvariant = _dereq_(27),
274
+ _assign = _dereq_(33);
285
275
 
286
- var ReactNoopUpdateQueue = _dereq_(13);
276
+ var ReactNoopUpdateQueue = _dereq_(15);
287
277
 
288
- var canDefineProperty = _dereq_(20);
289
- var emptyObject = _dereq_(28);
290
- var invariant = _dereq_(29);
291
- var warning = _dereq_(30);
278
+ var canDefineProperty = _dereq_(21);
279
+ var emptyObject = _dereq_(30);
280
+ var invariant = _dereq_(31);
281
+ var warning = _dereq_(32);
292
282
 
293
283
  /**
294
284
  * Base class helpers for the updating state of a component.
@@ -404,7 +394,7 @@ module.exports = {
404
394
  Component: ReactComponent,
405
395
  PureComponent: ReactPureComponent
406
396
  };
407
- },{"13":13,"20":20,"25":25,"28":28,"29":29,"30":30,"31":31}],5:[function(_dereq_,module,exports){
397
+ },{"15":15,"21":21,"27":27,"30":30,"31":31,"32":32,"33":33}],5:[function(_dereq_,module,exports){
408
398
  /**
409
399
  * Copyright 2013-present, Facebook, Inc.
410
400
  * All rights reserved.
@@ -418,10 +408,10 @@ module.exports = {
418
408
  'use strict';
419
409
 
420
410
  var PooledClass = _dereq_(2);
421
- var ReactElement = _dereq_(10);
411
+ var ReactElement = _dereq_(11);
422
412
 
423
- var emptyFunction = _dereq_(27);
424
- var traverseAllChildren = _dereq_(26);
413
+ var emptyFunction = _dereq_(29);
414
+ var traverseAllChildren = _dereq_(28);
425
415
 
426
416
  var twoArgumentPooler = PooledClass.twoArgumentPooler;
427
417
  var fourArgumentPooler = PooledClass.fourArgumentPooler;
@@ -595,7 +585,7 @@ var ReactChildren = {
595
585
  };
596
586
 
597
587
  module.exports = ReactChildren;
598
- },{"10":10,"2":2,"26":26,"27":27}],6:[function(_dereq_,module,exports){
588
+ },{"11":11,"2":2,"28":28,"29":29}],6:[function(_dereq_,module,exports){
599
589
  /**
600
590
  * Copyright 2013-present, Facebook, Inc.
601
591
  * All rights reserved.
@@ -608,17 +598,16 @@ module.exports = ReactChildren;
608
598
 
609
599
  'use strict';
610
600
 
611
- var _prodInvariant = _dereq_(25),
612
- _assign = _dereq_(31);
601
+ var _assign = _dereq_(33),
602
+ _prodInvariant = _dereq_(27);
613
603
 
614
604
  var ReactBaseClasses = _dereq_(4);
615
- var ReactElement = _dereq_(10);
616
- var ReactPropTypeLocationNames = _dereq_(14);
617
- var ReactNoopUpdateQueue = _dereq_(13);
605
+ var ReactElement = _dereq_(11);
606
+ var ReactNoopUpdateQueue = _dereq_(15);
618
607
 
619
- var emptyObject = _dereq_(28);
620
- var invariant = _dereq_(29);
621
- var warning = _dereq_(30);
608
+ var emptyObject = _dereq_(30);
609
+ var invariant = _dereq_(31);
610
+ var warning = _dereq_(32);
622
611
 
623
612
  var ReactComponent = ReactBaseClasses.Component;
624
613
 
@@ -658,7 +647,6 @@ function identity(fn) {
658
647
  * @internal
659
648
  */
660
649
  var ReactClassInterface = {
661
-
662
650
  /**
663
651
  * An array of Mixin objects to include when defining your component.
664
652
  *
@@ -876,7 +864,6 @@ var ReactClassInterface = {
876
864
  * @overridable
877
865
  */
878
866
  updateComponent: 'OVERRIDE_BASE'
879
-
880
867
  };
881
868
 
882
869
  /**
@@ -901,7 +888,7 @@ var RESERVED_SPEC_KEYS = {
901
888
  },
902
889
  childContextTypes: function (Constructor, childContextTypes) {
903
890
  if ("development" !== 'production') {
904
- validateTypeDef(Constructor, childContextTypes, 'childContext');
891
+ validateTypeDef(Constructor, childContextTypes, 'child context');
905
892
  }
906
893
  Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
907
894
  },
@@ -938,7 +925,7 @@ function validateTypeDef(Constructor, typeDef, location) {
938
925
  if (typeDef.hasOwnProperty(propName)) {
939
926
  // use a warning instead of an invariant so components
940
927
  // don't show up in prod but only in __DEV__
941
- "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
928
+ "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', location, propName) : void 0;
942
929
  }
943
930
  }
944
931
  }
@@ -967,7 +954,7 @@ function mixSpecIntoComponent(Constructor, spec) {
967
954
  var typeofSpec = typeof spec;
968
955
  var isMixinValid = typeofSpec === 'object' && spec !== null;
969
956
 
970
- "development" !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
957
+ "development" !== 'production' ? warning(isMixinValid, "%s: You're attempting to include a mixin that is either null " + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
971
958
  }
972
959
 
973
960
  return;
@@ -1178,7 +1165,6 @@ function bindAutoBindMethods(component) {
1178
1165
  * therefore not already part of the modern ReactComponent.
1179
1166
  */
1180
1167
  var ReactClassMixin = {
1181
-
1182
1168
  /**
1183
1169
  * TODO: This will be deprecated because state should always keep a consistent
1184
1170
  * type signature and the only use case for this, is to avoid that.
@@ -1207,7 +1193,6 @@ _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin
1207
1193
  * @class ReactClass
1208
1194
  */
1209
1195
  var ReactClass = {
1210
-
1211
1196
  /**
1212
1197
  * Creates a composite component class given a class specification.
1213
1198
  * See https://facebook.github.io/react/docs/react-api.html#createclass
@@ -1296,11 +1281,10 @@ var ReactClass = {
1296
1281
 
1297
1282
  return Constructor;
1298
1283
  }
1299
-
1300
1284
  };
1301
1285
 
1302
1286
  module.exports = ReactClass;
1303
- },{"10":10,"13":13,"14":14,"25":25,"28":28,"29":29,"30":30,"31":31,"4":4}],7:[function(_dereq_,module,exports){
1287
+ },{"11":11,"15":15,"27":27,"30":30,"31":31,"32":32,"33":33,"4":4}],7:[function(_dereq_,module,exports){
1304
1288
  /**
1305
1289
  * Copyright 2016-present, Facebook, Inc.
1306
1290
  * All rights reserved.
@@ -1314,19 +1298,17 @@ module.exports = ReactClass;
1314
1298
 
1315
1299
  'use strict';
1316
1300
 
1317
- var _prodInvariant = _dereq_(25);
1301
+ var _prodInvariant = _dereq_(27);
1318
1302
 
1319
1303
  var ReactCurrentOwner = _dereq_(8);
1320
- var ReactTypeOfWork = _dereq_(17);
1321
- var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent,
1322
- FunctionalComponent = ReactTypeOfWork.FunctionalComponent,
1323
- ClassComponent = ReactTypeOfWork.ClassComponent,
1324
- HostComponent = ReactTypeOfWork.HostComponent;
1325
1304
 
1305
+ var _require = _dereq_(14),
1306
+ getStackAddendumByWorkInProgressFiber = _require.getStackAddendumByWorkInProgressFiber,
1307
+ describeComponentFrame = _require.describeComponentFrame;
1326
1308
 
1327
- var getComponentName = _dereq_(22);
1328
- var invariant = _dereq_(29);
1329
- var warning = _dereq_(30);
1309
+ var invariant = _dereq_(31);
1310
+ var warning = _dereq_(32);
1311
+ var getComponentName = _dereq_(24);
1330
1312
 
1331
1313
  function isNative(fn) {
1332
1314
  // Based on isNative() from Lodash
@@ -1447,10 +1429,6 @@ function purgeDeep(id) {
1447
1429
  }
1448
1430
  }
1449
1431
 
1450
- function describeComponentFrame(name, source, ownerName) {
1451
- return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1452
- }
1453
-
1454
1432
  function getDisplayName(element) {
1455
1433
  if (element == null) {
1456
1434
  return '#empty';
@@ -1467,31 +1445,13 @@ function describeID(id) {
1467
1445
  var name = ReactComponentTreeHook.getDisplayName(id);
1468
1446
  var element = ReactComponentTreeHook.getElement(id);
1469
1447
  var ownerID = ReactComponentTreeHook.getOwnerID(id);
1470
- var ownerName;
1448
+ var ownerName = void 0;
1449
+
1471
1450
  if (ownerID) {
1472
1451
  ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
1473
1452
  }
1474
1453
  "development" !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
1475
- return describeComponentFrame(name, element && element._source, ownerName);
1476
- }
1477
-
1478
- function describeFiber(fiber) {
1479
- switch (fiber.tag) {
1480
- case IndeterminateComponent:
1481
- case FunctionalComponent:
1482
- case ClassComponent:
1483
- case HostComponent:
1484
- var owner = fiber._debugOwner;
1485
- var source = fiber._debugSource;
1486
- var name = getComponentName(fiber);
1487
- var ownerName = null;
1488
- if (owner) {
1489
- ownerName = getComponentName(owner);
1490
- }
1491
- return describeComponentFrame(name, source, ownerName);
1492
- default:
1493
- return '';
1494
- }
1454
+ return describeComponentFrame(name || '', element && element._source, ownerName || '');
1495
1455
  }
1496
1456
 
1497
1457
  var ReactComponentTreeHook = {
@@ -1599,7 +1559,7 @@ var ReactComponentTreeHook = {
1599
1559
  var workInProgress = currentOwner;
1600
1560
  // Safe because if current owner exists, we are reconciling,
1601
1561
  // and it is guaranteed to be the work-in-progress version.
1602
- info += ReactComponentTreeHook.getStackAddendumByWorkInProgressFiber(workInProgress);
1562
+ info += getStackAddendumByWorkInProgressFiber(workInProgress);
1603
1563
  } else if (typeof currentOwner._debugID === 'number') {
1604
1564
  info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
1605
1565
  }
@@ -1614,21 +1574,6 @@ var ReactComponentTreeHook = {
1614
1574
  }
1615
1575
  return info;
1616
1576
  },
1617
-
1618
-
1619
- // This function can only be called with a work-in-progress fiber and
1620
- // only during begin or complete phase. Do not call it under any other
1621
- // circumstances.
1622
- getStackAddendumByWorkInProgressFiber: function (workInProgress) {
1623
- var info = '';
1624
- var node = workInProgress;
1625
- do {
1626
- info += describeFiber(node);
1627
- // Otherwise this return pointer might point to the wrong tree:
1628
- node = node['return'];
1629
- } while (node);
1630
- return info;
1631
- },
1632
1577
  getChildIDs: function (id) {
1633
1578
  var item = getItem(id);
1634
1579
  return item ? item.childIDs : [];
@@ -1682,7 +1627,7 @@ var ReactComponentTreeHook = {
1682
1627
  };
1683
1628
 
1684
1629
  module.exports = ReactComponentTreeHook;
1685
- },{"17":17,"22":22,"25":25,"29":29,"30":30,"8":8}],8:[function(_dereq_,module,exports){
1630
+ },{"14":14,"24":24,"27":27,"31":31,"32":32,"8":8}],8:[function(_dereq_,module,exports){
1686
1631
  /**
1687
1632
  * Copyright 2013-present, Facebook, Inc.
1688
1633
  * All rights reserved.
@@ -1703,13 +1648,11 @@ module.exports = ReactComponentTreeHook;
1703
1648
  * currently being constructed.
1704
1649
  */
1705
1650
  var ReactCurrentOwner = {
1706
-
1707
1651
  /**
1708
1652
  * @internal
1709
1653
  * @type {ReactComponent}
1710
1654
  */
1711
1655
  current: null
1712
-
1713
1656
  };
1714
1657
 
1715
1658
  module.exports = ReactCurrentOwner;
@@ -1726,7 +1669,7 @@ module.exports = ReactCurrentOwner;
1726
1669
 
1727
1670
  'use strict';
1728
1671
 
1729
- var ReactElement = _dereq_(10);
1672
+ var ReactElement = _dereq_(11);
1730
1673
 
1731
1674
  /**
1732
1675
  * Create a factory that creates HTML tag elements.
@@ -1735,7 +1678,7 @@ var ReactElement = _dereq_(10);
1735
1678
  */
1736
1679
  var createDOMFactory = ReactElement.createFactory;
1737
1680
  if ("development" !== 'production') {
1738
- var ReactElementValidator = _dereq_(12);
1681
+ var ReactElementValidator = _dereq_(13);
1739
1682
  createDOMFactory = ReactElementValidator.createFactory;
1740
1683
  }
1741
1684
 
@@ -1883,7 +1826,63 @@ var ReactDOMFactories = {
1883
1826
  };
1884
1827
 
1885
1828
  module.exports = ReactDOMFactories;
1886
- },{"10":10,"12":12}],10:[function(_dereq_,module,exports){
1829
+ },{"11":11,"13":13}],10:[function(_dereq_,module,exports){
1830
+ /**
1831
+ * Copyright 2013-present, Facebook, Inc.
1832
+ * All rights reserved.
1833
+ *
1834
+ * This source code is licensed under the BSD-style license found in the
1835
+ * LICENSE file in the root directory of this source tree. An additional grant
1836
+ * of patent rights can be found in the PATENTS file in the same directory.
1837
+ *
1838
+ *
1839
+ */
1840
+
1841
+ 'use strict';
1842
+
1843
+ var ReactDebugCurrentFrame = {};
1844
+
1845
+ if ("development" !== 'production') {
1846
+ var _require = _dereq_(7),
1847
+ getStackAddendumByID = _require.getStackAddendumByID,
1848
+ getCurrentStackAddendum = _require.getCurrentStackAddendum;
1849
+
1850
+ var _require2 = _dereq_(14),
1851
+ getStackAddendumByWorkInProgressFiber = _require2.getStackAddendumByWorkInProgressFiber;
1852
+
1853
+ // Component that is being worked on
1854
+
1855
+
1856
+ ReactDebugCurrentFrame.current = null;
1857
+
1858
+ // Element that is being cloned or created
1859
+ ReactDebugCurrentFrame.element = null;
1860
+
1861
+ ReactDebugCurrentFrame.getStackAddendum = function () {
1862
+ var stack = null;
1863
+ var current = ReactDebugCurrentFrame.current;
1864
+ var element = ReactDebugCurrentFrame.element;
1865
+ if (current !== null) {
1866
+ if (typeof current === 'number') {
1867
+ // DebugID from Stack.
1868
+ var debugID = current;
1869
+ stack = getStackAddendumByID(debugID);
1870
+ } else if (typeof current.tag === 'number') {
1871
+ // This is a Fiber.
1872
+ // The stack will only be correct if this is a work in progress
1873
+ // version and we're calling it during reconciliation.
1874
+ var workInProgress = current;
1875
+ stack = getStackAddendumByWorkInProgressFiber(workInProgress);
1876
+ }
1877
+ } else if (element !== null) {
1878
+ stack = getCurrentStackAddendum(element);
1879
+ }
1880
+ return stack;
1881
+ };
1882
+ }
1883
+
1884
+ module.exports = ReactDebugCurrentFrame;
1885
+ },{"14":14,"7":7}],11:[function(_dereq_,module,exports){
1887
1886
  /**
1888
1887
  * Copyright 2014-present, Facebook, Inc.
1889
1888
  * All rights reserved.
@@ -1896,15 +1895,15 @@ module.exports = ReactDOMFactories;
1896
1895
 
1897
1896
  'use strict';
1898
1897
 
1899
- var _assign = _dereq_(31);
1898
+ var _assign = _dereq_(33);
1900
1899
 
1901
1900
  var ReactCurrentOwner = _dereq_(8);
1902
1901
 
1903
- var warning = _dereq_(30);
1904
- var canDefineProperty = _dereq_(20);
1902
+ var warning = _dereq_(32);
1903
+ var canDefineProperty = _dereq_(21);
1905
1904
  var hasOwnProperty = Object.prototype.hasOwnProperty;
1906
1905
 
1907
- var REACT_ELEMENT_TYPE = _dereq_(11);
1906
+ var REACT_ELEMENT_TYPE = _dereq_(12);
1908
1907
 
1909
1908
  var RESERVED_PROPS = {
1910
1909
  key: true,
@@ -2224,7 +2223,7 @@ ReactElement.isValidElement = function (object) {
2224
2223
  };
2225
2224
 
2226
2225
  module.exports = ReactElement;
2227
- },{"11":11,"20":20,"30":30,"31":31,"8":8}],11:[function(_dereq_,module,exports){
2226
+ },{"12":12,"21":21,"32":32,"33":33,"8":8}],12:[function(_dereq_,module,exports){
2228
2227
  /**
2229
2228
  * Copyright 2014-present, Facebook, Inc.
2230
2229
  * All rights reserved.
@@ -2244,7 +2243,7 @@ module.exports = ReactElement;
2244
2243
  var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
2245
2244
 
2246
2245
  module.exports = REACT_ELEMENT_TYPE;
2247
- },{}],12:[function(_dereq_,module,exports){
2246
+ },{}],13:[function(_dereq_,module,exports){
2248
2247
  /**
2249
2248
  * Copyright 2014-present, Facebook, Inc.
2250
2249
  * All rights reserved.
@@ -2265,15 +2264,21 @@ module.exports = REACT_ELEMENT_TYPE;
2265
2264
  'use strict';
2266
2265
 
2267
2266
  var ReactCurrentOwner = _dereq_(8);
2268
- var ReactComponentTreeHook = _dereq_(7);
2269
- var ReactElement = _dereq_(10);
2267
+ var ReactElement = _dereq_(11);
2268
+
2269
+ var checkReactTypeSpec = _dereq_(23);
2270
+
2271
+ var canDefineProperty = _dereq_(21);
2272
+ var getComponentName = _dereq_(24);
2273
+ var getIteratorFn = _dereq_(25);
2270
2274
 
2271
- var checkReactTypeSpec = _dereq_(21);
2275
+ if ("development" !== 'production') {
2276
+ var warning = _dereq_(32);
2277
+ var ReactDebugCurrentFrame = _dereq_(10);
2272
2278
 
2273
- var canDefineProperty = _dereq_(20);
2274
- var getComponentName = _dereq_(22);
2275
- var getIteratorFn = _dereq_(23);
2276
- var warning = _dereq_(30);
2279
+ var _require = _dereq_(7),
2280
+ getCurrentStackAddendum = _require.getCurrentStackAddendum;
2281
+ }
2277
2282
 
2278
2283
  function getDeclarationErrorAddendum() {
2279
2284
  if (ReactCurrentOwner.current) {
@@ -2348,7 +2353,7 @@ function validateExplicitKey(element, parentType) {
2348
2353
  childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.';
2349
2354
  }
2350
2355
 
2351
- "development" !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
2356
+ "development" !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getCurrentStackAddendum(element)) : void 0;
2352
2357
  }
2353
2358
 
2354
2359
  /**
@@ -2405,8 +2410,15 @@ function validatePropTypes(element) {
2405
2410
  return;
2406
2411
  }
2407
2412
  var name = componentClass.displayName || componentClass.name;
2408
- if (componentClass.propTypes) {
2409
- checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
2413
+
2414
+ // ReactNative `View.propTypes` have been deprecated in favor of `ViewPropTypes`.
2415
+ // In their place a temporary getter has been added with a deprecated warning message.
2416
+ // Avoid triggering that warning during validation using the temporary workaround, __propTypesSecretDontUseThesePlease.
2417
+ // TODO (bvaughn) Revert this particular change any time after April 1 ReactNative RC is tagged.
2418
+ var propTypes = typeof componentClass.__propTypesSecretDontUseThesePlease === 'object' ? componentClass.__propTypesSecretDontUseThesePlease : componentClass.propTypes;
2419
+
2420
+ if (propTypes) {
2421
+ checkReactTypeSpec(propTypes, element.props, 'prop', name);
2410
2422
  }
2411
2423
  if (typeof componentClass.getDefaultProps === 'function') {
2412
2424
  "development" !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
@@ -2414,29 +2426,26 @@ function validatePropTypes(element) {
2414
2426
  }
2415
2427
 
2416
2428
  var ReactElementValidator = {
2417
-
2418
2429
  createElement: function (type, props, children) {
2419
2430
  var validType = typeof type === 'string' || typeof type === 'function';
2420
2431
  // We warn in this case but don't throw. We expect the element creation to
2421
2432
  // succeed and there will likely be errors in render.
2422
2433
  if (!validType) {
2423
- if (typeof type !== 'function' && typeof type !== 'string') {
2424
- var info = '';
2425
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2426
- info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
2427
- }
2434
+ var info = '';
2435
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2436
+ info += ' You likely forgot to export your component from the file ' + "it's defined in.";
2437
+ }
2428
2438
 
2429
- var sourceInfo = getSourceInfoErrorAddendum(props);
2430
- if (sourceInfo) {
2431
- info += sourceInfo;
2432
- } else {
2433
- info += getDeclarationErrorAddendum();
2434
- }
2439
+ var sourceInfo = getSourceInfoErrorAddendum(props);
2440
+ if (sourceInfo) {
2441
+ info += sourceInfo;
2442
+ } else {
2443
+ info += getDeclarationErrorAddendum();
2444
+ }
2435
2445
 
2436
- info += ReactComponentTreeHook.getCurrentStackAddendum();
2446
+ info += getCurrentStackAddendum();
2437
2447
 
2438
- "development" !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
2439
- }
2448
+ "development" !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
2440
2449
  }
2441
2450
 
2442
2451
  var element = ReactElement.createElement.apply(this, arguments);
@@ -2447,6 +2456,10 @@ var ReactElementValidator = {
2447
2456
  return element;
2448
2457
  }
2449
2458
 
2459
+ if ("development" !== 'production') {
2460
+ ReactDebugCurrentFrame.element = element;
2461
+ }
2462
+
2450
2463
  // Skip key warning if the type isn't valid since our key validation logic
2451
2464
  // doesn't expect a non-string/function type and can throw confusing errors.
2452
2465
  // We don't want exception behavior to differ between dev and prod.
@@ -2460,6 +2473,10 @@ var ReactElementValidator = {
2460
2473
 
2461
2474
  validatePropTypes(element);
2462
2475
 
2476
+ if ("development" !== 'production') {
2477
+ ReactDebugCurrentFrame.element = null;
2478
+ }
2479
+
2463
2480
  return element;
2464
2481
  },
2465
2482
 
@@ -2488,17 +2505,85 @@ var ReactElementValidator = {
2488
2505
 
2489
2506
  cloneElement: function (element, props, children) {
2490
2507
  var newElement = ReactElement.cloneElement.apply(this, arguments);
2508
+ if ("development" !== 'production') {
2509
+ ReactDebugCurrentFrame.element = newElement;
2510
+ }
2491
2511
  for (var i = 2; i < arguments.length; i++) {
2492
2512
  validateChildKeys(arguments[i], newElement.type);
2493
2513
  }
2494
2514
  validatePropTypes(newElement);
2515
+ if ("development" !== 'production') {
2516
+ ReactDebugCurrentFrame.element = null;
2517
+ }
2495
2518
  return newElement;
2496
2519
  }
2497
-
2498
2520
  };
2499
2521
 
2500
2522
  module.exports = ReactElementValidator;
2501
- },{"10":10,"20":20,"21":21,"22":22,"23":23,"30":30,"7":7,"8":8}],13:[function(_dereq_,module,exports){
2523
+ },{"10":10,"11":11,"21":21,"23":23,"24":24,"25":25,"32":32,"7":7,"8":8}],14:[function(_dereq_,module,exports){
2524
+ /**
2525
+ * Copyright 2016-present, Facebook, Inc.
2526
+ * All rights reserved.
2527
+ *
2528
+ * This source code is licensed under the BSD-style license found in the
2529
+ * LICENSE file in the root directory of this source tree. An additional grant
2530
+ * of patent rights can be found in the PATENTS file in the same directory.
2531
+ *
2532
+ *
2533
+ */
2534
+
2535
+ 'use strict';
2536
+
2537
+ var ReactTypeOfWork = _dereq_(18);
2538
+ var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent,
2539
+ FunctionalComponent = ReactTypeOfWork.FunctionalComponent,
2540
+ ClassComponent = ReactTypeOfWork.ClassComponent,
2541
+ HostComponent = ReactTypeOfWork.HostComponent;
2542
+
2543
+ var getComponentName = _dereq_(24);
2544
+
2545
+ function describeComponentFrame(name, source, ownerName) {
2546
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
2547
+ }
2548
+
2549
+ function describeFiber(fiber) {
2550
+ switch (fiber.tag) {
2551
+ case IndeterminateComponent:
2552
+ case FunctionalComponent:
2553
+ case ClassComponent:
2554
+ case HostComponent:
2555
+ var owner = fiber._debugOwner;
2556
+ var source = fiber._debugSource;
2557
+ var name = getComponentName(fiber);
2558
+ var ownerName = null;
2559
+ if (owner) {
2560
+ ownerName = getComponentName(owner);
2561
+ }
2562
+ return describeComponentFrame(name, source, ownerName);
2563
+ default:
2564
+ return '';
2565
+ }
2566
+ }
2567
+
2568
+ // This function can only be called with a work-in-progress fiber and
2569
+ // only during begin or complete phase. Do not call it under any other
2570
+ // circumstances.
2571
+ function getStackAddendumByWorkInProgressFiber(workInProgress) {
2572
+ var info = '';
2573
+ var node = workInProgress;
2574
+ do {
2575
+ info += describeFiber(node);
2576
+ // Otherwise this return pointer might point to the wrong tree:
2577
+ node = node['return'];
2578
+ } while (node);
2579
+ return info;
2580
+ }
2581
+
2582
+ module.exports = {
2583
+ getStackAddendumByWorkInProgressFiber: getStackAddendumByWorkInProgressFiber,
2584
+ describeComponentFrame: describeComponentFrame
2585
+ };
2586
+ },{"18":18,"24":24}],15:[function(_dereq_,module,exports){
2502
2587
  /**
2503
2588
  * Copyright 2015-present, Facebook, Inc.
2504
2589
  * All rights reserved.
@@ -2511,7 +2596,7 @@ module.exports = ReactElementValidator;
2511
2596
 
2512
2597
  'use strict';
2513
2598
 
2514
- var warning = _dereq_(30);
2599
+ var warning = _dereq_(32);
2515
2600
 
2516
2601
  function warnNoop(publicInstance, callerName) {
2517
2602
  if ("development" !== 'production') {
@@ -2524,7 +2609,6 @@ function warnNoop(publicInstance, callerName) {
2524
2609
  * This is the abstract API for an update queue.
2525
2610
  */
2526
2611
  var ReactNoopUpdateQueue = {
2527
-
2528
2612
  /**
2529
2613
  * Checks whether or not this composite component is mounted.
2530
2614
  * @param {ReactClass} publicInstance The instance we want to test.
@@ -2590,32 +2674,7 @@ var ReactNoopUpdateQueue = {
2590
2674
  };
2591
2675
 
2592
2676
  module.exports = ReactNoopUpdateQueue;
2593
- },{"30":30}],14:[function(_dereq_,module,exports){
2594
- /**
2595
- * Copyright 2013-present, Facebook, Inc.
2596
- * All rights reserved.
2597
- *
2598
- * This source code is licensed under the BSD-style license found in the
2599
- * LICENSE file in the root directory of this source tree. An additional grant
2600
- * of patent rights can be found in the PATENTS file in the same directory.
2601
- *
2602
- *
2603
- */
2604
-
2605
- 'use strict';
2606
-
2607
- var ReactPropTypeLocationNames = {};
2608
-
2609
- if ("development" !== 'production') {
2610
- ReactPropTypeLocationNames = {
2611
- prop: 'prop',
2612
- context: 'context',
2613
- childContext: 'child context'
2614
- };
2615
- }
2616
-
2617
- module.exports = ReactPropTypeLocationNames;
2618
- },{}],15:[function(_dereq_,module,exports){
2677
+ },{"32":32}],16:[function(_dereq_,module,exports){
2619
2678
  /**
2620
2679
  * Copyright 2013-present, Facebook, Inc.
2621
2680
  * All rights reserved.
@@ -2628,16 +2687,15 @@ module.exports = ReactPropTypeLocationNames;
2628
2687
 
2629
2688
  'use strict';
2630
2689
 
2631
- var _prodInvariant = _dereq_(25);
2690
+ var _prodInvariant = _dereq_(27);
2632
2691
 
2633
- var ReactElement = _dereq_(10);
2634
- var ReactPropTypeLocationNames = _dereq_(14);
2635
- var ReactPropTypesSecret = _dereq_(16);
2692
+ var ReactElement = _dereq_(11);
2693
+ var ReactPropTypesSecret = _dereq_(17);
2636
2694
 
2637
- var emptyFunction = _dereq_(27);
2638
- var getIteratorFn = _dereq_(23);
2639
- var invariant = _dereq_(29);
2640
- var warning = _dereq_(30);
2695
+ var emptyFunction = _dereq_(29);
2696
+ var getIteratorFn = _dereq_(25);
2697
+ var invariant = _dereq_(31);
2698
+ var warning = _dereq_(32);
2641
2699
 
2642
2700
  /**
2643
2701
  * Collection of methods that allow declaration and validation of props that are
@@ -2713,7 +2771,7 @@ if ("development" !== 'production') {
2713
2771
  };
2714
2772
  } else {
2715
2773
  var productionTypeChecker = function () {
2716
- invariant(false, 'React.PropTypes type checking code is stripped in production.');
2774
+ !false ? "development" !== 'production' ? invariant(false, 'React.PropTypes type checking code is stripped in production.') : _prodInvariant('144') : void 0;
2717
2775
  };
2718
2776
  productionTypeChecker.isRequired = productionTypeChecker;
2719
2777
  var getProductionTypeChecker = function () {
@@ -2790,12 +2848,11 @@ function createChainableTypeChecker(validate) {
2790
2848
  }
2791
2849
  }
2792
2850
  if (props[propName] == null) {
2793
- var locationName = ReactPropTypeLocationNames[location];
2794
2851
  if (isRequired) {
2795
2852
  if (props[propName] === null) {
2796
- return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2853
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2797
2854
  }
2798
- return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2855
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2799
2856
  }
2800
2857
  return null;
2801
2858
  } else {
@@ -2814,13 +2871,12 @@ function createPrimitiveTypeChecker(expectedType) {
2814
2871
  var propValue = props[propName];
2815
2872
  var propType = getPropType(propValue);
2816
2873
  if (propType !== expectedType) {
2817
- var locationName = ReactPropTypeLocationNames[location];
2818
2874
  // `propValue` being instance of, say, date/regexp, pass the 'object'
2819
2875
  // check, but we can offer a more precise error message here rather than
2820
2876
  // 'of type `object`'.
2821
2877
  var preciseType = getPreciseType(propValue);
2822
2878
 
2823
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
2879
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
2824
2880
  }
2825
2881
  return null;
2826
2882
  }
@@ -2838,9 +2894,8 @@ function createArrayOfTypeChecker(typeChecker) {
2838
2894
  }
2839
2895
  var propValue = props[propName];
2840
2896
  if (!Array.isArray(propValue)) {
2841
- var locationName = ReactPropTypeLocationNames[location];
2842
2897
  var propType = getPropType(propValue);
2843
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2898
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2844
2899
  }
2845
2900
  for (var i = 0; i < propValue.length; i++) {
2846
2901
  var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
@@ -2857,9 +2912,8 @@ function createElementTypeChecker() {
2857
2912
  function validate(props, propName, componentName, location, propFullName) {
2858
2913
  var propValue = props[propName];
2859
2914
  if (!ReactElement.isValidElement(propValue)) {
2860
- var locationName = ReactPropTypeLocationNames[location];
2861
2915
  var propType = getPropType(propValue);
2862
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2916
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2863
2917
  }
2864
2918
  return null;
2865
2919
  }
@@ -2869,10 +2923,9 @@ function createElementTypeChecker() {
2869
2923
  function createInstanceTypeChecker(expectedClass) {
2870
2924
  function validate(props, propName, componentName, location, propFullName) {
2871
2925
  if (!(props[propName] instanceof expectedClass)) {
2872
- var locationName = ReactPropTypeLocationNames[location];
2873
2926
  var expectedClassName = expectedClass.name || ANONYMOUS;
2874
2927
  var actualClassName = getClassName(props[propName]);
2875
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2928
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2876
2929
  }
2877
2930
  return null;
2878
2931
  }
@@ -2893,9 +2946,8 @@ function createEnumTypeChecker(expectedValues) {
2893
2946
  }
2894
2947
  }
2895
2948
 
2896
- var locationName = ReactPropTypeLocationNames[location];
2897
2949
  var valuesString = JSON.stringify(expectedValues);
2898
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2950
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2899
2951
  }
2900
2952
  return createChainableTypeChecker(validate);
2901
2953
  }
@@ -2908,8 +2960,7 @@ function createObjectOfTypeChecker(typeChecker) {
2908
2960
  var propValue = props[propName];
2909
2961
  var propType = getPropType(propValue);
2910
2962
  if (propType !== 'object') {
2911
- var locationName = ReactPropTypeLocationNames[location];
2912
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2963
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2913
2964
  }
2914
2965
  for (var key in propValue) {
2915
2966
  if (propValue.hasOwnProperty(key)) {
@@ -2938,8 +2989,7 @@ function createUnionTypeChecker(arrayOfTypeCheckers) {
2938
2989
  }
2939
2990
  }
2940
2991
 
2941
- var locationName = ReactPropTypeLocationNames[location];
2942
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
2992
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
2943
2993
  }
2944
2994
  return createChainableTypeChecker(validate);
2945
2995
  }
@@ -2947,8 +2997,7 @@ function createUnionTypeChecker(arrayOfTypeCheckers) {
2947
2997
  function createNodeChecker() {
2948
2998
  function validate(props, propName, componentName, location, propFullName) {
2949
2999
  if (!isNode(props[propName])) {
2950
- var locationName = ReactPropTypeLocationNames[location];
2951
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
3000
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
2952
3001
  }
2953
3002
  return null;
2954
3003
  }
@@ -2960,8 +3009,7 @@ function createShapeTypeChecker(shapeTypes) {
2960
3009
  var propValue = props[propName];
2961
3010
  var propType = getPropType(propValue);
2962
3011
  if (propType !== 'object') {
2963
- var locationName = ReactPropTypeLocationNames[location];
2964
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
3012
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2965
3013
  }
2966
3014
  for (var key in shapeTypes) {
2967
3015
  var checker = shapeTypes[key];
@@ -3085,7 +3133,7 @@ function getClassName(propValue) {
3085
3133
  }
3086
3134
 
3087
3135
  module.exports = ReactPropTypes;
3088
- },{"10":10,"14":14,"16":16,"23":23,"25":25,"27":27,"29":29,"30":30}],16:[function(_dereq_,module,exports){
3136
+ },{"11":11,"17":17,"25":25,"27":27,"29":29,"31":31,"32":32}],17:[function(_dereq_,module,exports){
3089
3137
  /**
3090
3138
  * Copyright 2013-present, Facebook, Inc.
3091
3139
  * All rights reserved.
@@ -3102,7 +3150,7 @@ module.exports = ReactPropTypes;
3102
3150
  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
3103
3151
 
3104
3152
  module.exports = ReactPropTypesSecret;
3105
- },{}],17:[function(_dereq_,module,exports){
3153
+ },{}],18:[function(_dereq_,module,exports){
3106
3154
  /**
3107
3155
  * Copyright 2013-present, Facebook, Inc.
3108
3156
  * All rights reserved.
@@ -3129,7 +3177,7 @@ module.exports = {
3129
3177
  YieldComponent: 9,
3130
3178
  Fragment: 10
3131
3179
  };
3132
- },{}],18:[function(_dereq_,module,exports){
3180
+ },{}],19:[function(_dereq_,module,exports){
3133
3181
  /**
3134
3182
  * Copyright 2013-present, Facebook, Inc.
3135
3183
  * All rights reserved.
@@ -3142,7 +3190,7 @@ module.exports = {
3142
3190
 
3143
3191
  'use strict';
3144
3192
 
3145
- var _assign = _dereq_(31);
3193
+ var _assign = _dereq_(33);
3146
3194
 
3147
3195
  var React = _dereq_(3);
3148
3196
 
@@ -3161,7 +3209,7 @@ if ("development" !== 'production') {
3161
3209
  }
3162
3210
 
3163
3211
  module.exports = ReactUMDEntry;
3164
- },{"3":3,"31":31,"7":7,"8":8}],19:[function(_dereq_,module,exports){
3212
+ },{"3":3,"33":33,"7":7,"8":8}],20:[function(_dereq_,module,exports){
3165
3213
  /**
3166
3214
  * Copyright 2013-present, Facebook, Inc.
3167
3215
  * All rights reserved.
@@ -3174,8 +3222,8 @@ module.exports = ReactUMDEntry;
3174
3222
 
3175
3223
  'use strict';
3176
3224
 
3177
- module.exports = '16.0.0-alpha.2';
3178
- },{}],20:[function(_dereq_,module,exports){
3225
+ module.exports = '16.0.0-alpha.6';
3226
+ },{}],21:[function(_dereq_,module,exports){
3179
3227
  /**
3180
3228
  * Copyright 2013-present, Facebook, Inc.
3181
3229
  * All rights reserved.
@@ -3201,8 +3249,7 @@ if ("development" !== 'production') {
3201
3249
  }
3202
3250
 
3203
3251
  module.exports = canDefineProperty;
3204
- },{}],21:[function(_dereq_,module,exports){
3205
- (function (process){
3252
+ },{}],22:[function(_dereq_,module,exports){
3206
3253
  /**
3207
3254
  * Copyright 2013-present, Facebook, Inc.
3208
3255
  * All rights reserved.
@@ -3215,24 +3262,12 @@ module.exports = canDefineProperty;
3215
3262
 
3216
3263
  'use strict';
3217
3264
 
3218
- var _prodInvariant = _dereq_(25);
3265
+ var _prodInvariant = _dereq_(27);
3219
3266
 
3220
- var ReactPropTypeLocationNames = _dereq_(14);
3221
- var ReactPropTypesSecret = _dereq_(16);
3267
+ var ReactPropTypesSecret = _dereq_(17);
3222
3268
 
3223
- var invariant = _dereq_(29);
3224
- var warning = _dereq_(30);
3225
-
3226
- var ReactComponentTreeHook;
3227
-
3228
- if (typeof process !== 'undefined' && process.env && "development" === 'test') {
3229
- // Temporary hack.
3230
- // Inline requires don't work well with Jest:
3231
- // https://github.com/facebook/react/issues/7240
3232
- // Remove the inline requires when we don't need them anymore:
3233
- // https://github.com/facebook/react/pull/7178
3234
- ReactComponentTreeHook = _dereq_(7);
3235
- }
3269
+ var invariant = _dereq_(31);
3270
+ var warning = _dereq_(32);
3236
3271
 
3237
3272
  var loggedTypeFailures = {};
3238
3273
 
@@ -3244,65 +3279,65 @@ var loggedTypeFailures = {};
3244
3279
  * @param {object} values Runtime values that need to be type-checked
3245
3280
  * @param {string} location e.g. "prop", "context", "child context"
3246
3281
  * @param {string} componentName Name of the component for error messages.
3247
- * @param {?object} element The React element that is being type-checked
3248
- * @param {?number} workInProgressOrDebugID The React component instance that is being type-checked
3282
+ * @param {?Function} getStack Returns the component stack.
3249
3283
  * @private
3250
3284
  */
3251
- function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
3252
- // It is only safe to pass fiber if it is the work-in-progress version, and
3253
- workInProgressOrDebugID) {
3254
- for (var typeSpecName in typeSpecs) {
3255
- if (typeSpecs.hasOwnProperty(typeSpecName)) {
3256
- var error;
3257
- // Prop type validation may throw. In case they do, we don't want to
3258
- // fail the render phase where it didn't fail before. So we log it.
3259
- // After these have been cleaned up, we'll let them throw.
3260
- try {
3261
- // This is intentionally an invariant that gets caught. It's the same
3262
- // behavior as without this statement except with a better message.
3263
- !(typeof typeSpecs[typeSpecName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
3264
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
3265
- } catch (ex) {
3266
- error = ex;
3267
- }
3268
- "development" !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
3269
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3270
- // Only monitor this failure once because there tends to be a lot of the
3271
- // same error.
3272
- loggedTypeFailures[error.message] = true;
3285
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
3286
+ if ("development" !== 'production') {
3287
+ for (var typeSpecName in typeSpecs) {
3288
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
3289
+ var error;
3290
+ // Prop type validation may throw. In case they do, we don't want to
3291
+ // fail the render phase where it didn't fail before. So we log it.
3292
+ // After these have been cleaned up, we'll let them throw.
3293
+ try {
3294
+ // This is intentionally an invariant that gets caught. It's the same
3295
+ // behavior as without this statement except with a better message.
3296
+ !(typeof typeSpecs[typeSpecName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', location, typeSpecName) : _prodInvariant('84', componentName || 'React class', location, typeSpecName) : void 0;
3297
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
3298
+ } catch (ex) {
3299
+ error = ex;
3300
+ }
3301
+ "development" !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error) : void 0;
3302
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3303
+ // Only monitor this failure once because there tends to be a lot of the
3304
+ // same error.
3305
+ loggedTypeFailures[error.message] = true;
3273
3306
 
3274
- var componentStackInfo = '';
3307
+ var stack = getStack ? getStack() : '';
3275
3308
 
3276
- if ("development" !== 'production') {
3277
- if (!ReactComponentTreeHook) {
3278
- ReactComponentTreeHook = _dereq_(7);
3279
- }
3280
- if (workInProgressOrDebugID != null) {
3281
- if (typeof workInProgressOrDebugID === 'number') {
3282
- // DebugID from Stack.
3283
- var debugID = workInProgressOrDebugID;
3284
- componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
3285
- } else if (typeof workInProgressOrDebugID.tag === 'number') {
3286
- // This is a Fiber.
3287
- // The stack will only be correct if this is a work in progress
3288
- // version and we're calling it during reconciliation.
3289
- var workInProgress = workInProgressOrDebugID;
3290
- componentStackInfo = ReactComponentTreeHook.getStackAddendumByWorkInProgressFiber(workInProgress);
3291
- }
3292
- } else if (element !== null) {
3293
- componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
3294
- }
3309
+ "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '') : void 0;
3295
3310
  }
3296
-
3297
- "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
3298
3311
  }
3299
3312
  }
3300
3313
  }
3301
3314
  }
3302
3315
 
3316
+ module.exports = checkPropTypes;
3317
+ },{"17":17,"27":27,"31":31,"32":32}],23:[function(_dereq_,module,exports){
3318
+ /**
3319
+ * Copyright 2013-present, Facebook, Inc.
3320
+ * All rights reserved.
3321
+ *
3322
+ * This source code is licensed under the BSD-style license found in the
3323
+ * LICENSE file in the root directory of this source tree. An additional grant
3324
+ * of patent rights can be found in the PATENTS file in the same directory.
3325
+ *
3326
+ */
3327
+
3328
+ 'use strict';
3329
+
3330
+ var checkPropTypes = _dereq_(22);
3331
+
3332
+ var _require = _dereq_(10),
3333
+ getStackAddendum = _require.getStackAddendum;
3334
+
3335
+ function checkReactTypeSpec(typeSpecs, values, location, componentName) {
3336
+ checkPropTypes(typeSpecs, values, location, componentName, getStackAddendum);
3337
+ }
3338
+
3303
3339
  module.exports = checkReactTypeSpec;
3304
- }).call(this,undefined)
3305
- },{"14":14,"16":16,"25":25,"29":29,"30":30,"7":7}],22:[function(_dereq_,module,exports){
3340
+ },{"10":10,"22":22}],24:[function(_dereq_,module,exports){
3306
3341
  /**
3307
3342
  * Copyright 2013-present, Facebook, Inc.
3308
3343
  * All rights reserved.
@@ -3338,7 +3373,7 @@ function getComponentName(instanceOrFiber) {
3338
3373
  }
3339
3374
 
3340
3375
  module.exports = getComponentName;
3341
- },{}],23:[function(_dereq_,module,exports){
3376
+ },{}],25:[function(_dereq_,module,exports){
3342
3377
  /**
3343
3378
  * Copyright 2013-present, Facebook, Inc.
3344
3379
  * All rights reserved.
@@ -3379,7 +3414,7 @@ function getIteratorFn(maybeIterable) {
3379
3414
  }
3380
3415
 
3381
3416
  module.exports = getIteratorFn;
3382
- },{}],24:[function(_dereq_,module,exports){
3417
+ },{}],26:[function(_dereq_,module,exports){
3383
3418
  /**
3384
3419
  * Copyright 2013-present, Facebook, Inc.
3385
3420
  * All rights reserved.
@@ -3391,11 +3426,11 @@ module.exports = getIteratorFn;
3391
3426
  */
3392
3427
  'use strict';
3393
3428
 
3394
- var _prodInvariant = _dereq_(25);
3429
+ var _prodInvariant = _dereq_(27);
3395
3430
 
3396
- var ReactElement = _dereq_(10);
3431
+ var ReactElement = _dereq_(11);
3397
3432
 
3398
- var invariant = _dereq_(29);
3433
+ var invariant = _dereq_(31);
3399
3434
 
3400
3435
  /**
3401
3436
  * Returns the first child in a collection of children and verifies that there
@@ -3417,7 +3452,7 @@ function onlyChild(children) {
3417
3452
  }
3418
3453
 
3419
3454
  module.exports = onlyChild;
3420
- },{"10":10,"25":25,"29":29}],25:[function(_dereq_,module,exports){
3455
+ },{"11":11,"27":27,"31":31}],27:[function(_dereq_,module,exports){
3421
3456
  /**
3422
3457
  * Copyright (c) 2013-present, Facebook, Inc.
3423
3458
  * All rights reserved.
@@ -3456,7 +3491,7 @@ function reactProdInvariant(code) {
3456
3491
  }
3457
3492
 
3458
3493
  module.exports = reactProdInvariant;
3459
- },{}],26:[function(_dereq_,module,exports){
3494
+ },{}],28:[function(_dereq_,module,exports){
3460
3495
  /**
3461
3496
  * Copyright 2013-present, Facebook, Inc.
3462
3497
  * All rights reserved.
@@ -3469,15 +3504,15 @@ module.exports = reactProdInvariant;
3469
3504
 
3470
3505
  'use strict';
3471
3506
 
3472
- var _prodInvariant = _dereq_(25);
3507
+ var _prodInvariant = _dereq_(27);
3473
3508
 
3474
3509
  var ReactCurrentOwner = _dereq_(8);
3475
- var REACT_ELEMENT_TYPE = _dereq_(11);
3510
+ var REACT_ELEMENT_TYPE = _dereq_(12);
3476
3511
 
3477
- var getIteratorFn = _dereq_(23);
3478
- var invariant = _dereq_(29);
3512
+ var getIteratorFn = _dereq_(25);
3513
+ var invariant = _dereq_(31);
3479
3514
  var KeyEscapeUtils = _dereq_(1);
3480
- var warning = _dereq_(30);
3515
+ var warning = _dereq_(32);
3481
3516
 
3482
3517
  var SEPARATOR = '.';
3483
3518
  var SUBSEPARATOR = ':';
@@ -3580,7 +3615,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
3580
3615
  } else if (type === 'object') {
3581
3616
  var addendum = '';
3582
3617
  if ("development" !== 'production') {
3583
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
3618
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead.';
3584
3619
  if (ReactCurrentOwner.current) {
3585
3620
  var name = ReactCurrentOwner.current.getName();
3586
3621
  if (name) {
@@ -3588,7 +3623,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
3588
3623
  }
3589
3624
  }
3590
3625
  }
3591
- var childrenString = String(children);
3626
+ var childrenString = '' + children;
3592
3627
  !false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
3593
3628
  }
3594
3629
  }
@@ -3621,7 +3656,7 @@ function traverseAllChildren(children, callback, traverseContext) {
3621
3656
  }
3622
3657
 
3623
3658
  module.exports = traverseAllChildren;
3624
- },{"1":1,"11":11,"23":23,"25":25,"29":29,"30":30,"8":8}],27:[function(_dereq_,module,exports){
3659
+ },{"1":1,"12":12,"25":25,"27":27,"31":31,"32":32,"8":8}],29:[function(_dereq_,module,exports){
3625
3660
  "use strict";
3626
3661
 
3627
3662
  /**
@@ -3660,7 +3695,7 @@ emptyFunction.thatReturnsArgument = function (arg) {
3660
3695
  };
3661
3696
 
3662
3697
  module.exports = emptyFunction;
3663
- },{}],28:[function(_dereq_,module,exports){
3698
+ },{}],30:[function(_dereq_,module,exports){
3664
3699
  /**
3665
3700
  * Copyright (c) 2013-present, Facebook, Inc.
3666
3701
  * All rights reserved.
@@ -3680,7 +3715,7 @@ if ("development" !== 'production') {
3680
3715
  }
3681
3716
 
3682
3717
  module.exports = emptyObject;
3683
- },{}],29:[function(_dereq_,module,exports){
3718
+ },{}],31:[function(_dereq_,module,exports){
3684
3719
  /**
3685
3720
  * Copyright (c) 2013-present, Facebook, Inc.
3686
3721
  * All rights reserved.
@@ -3736,7 +3771,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
3736
3771
  }
3737
3772
 
3738
3773
  module.exports = invariant;
3739
- },{}],30:[function(_dereq_,module,exports){
3774
+ },{}],32:[function(_dereq_,module,exports){
3740
3775
  /**
3741
3776
  * Copyright 2014-2015, Facebook, Inc.
3742
3777
  * All rights reserved.
@@ -3749,7 +3784,7 @@ module.exports = invariant;
3749
3784
 
3750
3785
  'use strict';
3751
3786
 
3752
- var emptyFunction = _dereq_(27);
3787
+ var emptyFunction = _dereq_(29);
3753
3788
 
3754
3789
  /**
3755
3790
  * Similar to invariant but only logs a warning if the condition is not met.
@@ -3803,7 +3838,7 @@ if ("development" !== 'production') {
3803
3838
  }
3804
3839
 
3805
3840
  module.exports = warning;
3806
- },{"27":27}],31:[function(_dereq_,module,exports){
3841
+ },{"29":29}],33:[function(_dereq_,module,exports){
3807
3842
  /*
3808
3843
  object-assign
3809
3844
  (c) Sindre Sorhus
@@ -3895,5 +3930,5 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
3895
3930
  return to;
3896
3931
  };
3897
3932
 
3898
- },{}]},{},[18])(18)
3933
+ },{}]},{},[19])(19)
3899
3934
  });