react 15.7.0 → 16.0.0-alpha

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 (70) hide show
  1. package/LICENSE +26 -16
  2. package/PATENTS +33 -0
  3. package/README.md +7 -0
  4. package/dist/react-with-addons.js +3831 -4404
  5. package/dist/react-with-addons.min.js +7 -6
  6. package/dist/react.js +2929 -3319
  7. package/dist/react.min.js +7 -5
  8. package/lib/KeyEscapeUtils.js +5 -3
  9. package/lib/PooledClass.js +5 -3
  10. package/lib/React.js +20 -61
  11. package/lib/ReactAddonsDOMDependencies.js +5 -3
  12. package/lib/ReactAddonsDOMDependenciesUMDShim.js +5 -3
  13. package/lib/ReactCSSTransitionGroup.js +9 -9
  14. package/lib/ReactCSSTransitionGroupChild.js +118 -134
  15. package/lib/ReactChildren.js +9 -7
  16. package/lib/ReactClass.js +703 -0
  17. package/lib/{ReactBaseClasses.js → ReactComponent.js} +11 -40
  18. package/lib/ReactComponentTreeHook.js +63 -58
  19. package/lib/ReactComponentTreeHookUMDShim.js +5 -3
  20. package/lib/ReactComponentWithPureRenderMixin.js +5 -3
  21. package/lib/ReactCurrentOwner.js +7 -3
  22. package/lib/ReactCurrentOwnerUMDShim.js +5 -3
  23. package/lib/ReactDOMFactories.js +6 -3
  24. package/lib/ReactElement.js +9 -7
  25. package/lib/ReactElementSymbol.js +5 -3
  26. package/lib/ReactElementType.js +5 -3
  27. package/lib/ReactElementValidator.js +13 -12
  28. package/lib/ReactFragment.js +5 -3
  29. package/lib/ReactNoopUpdateQueue.js +15 -16
  30. package/lib/ReactPropTypeLocationNames.js +5 -3
  31. package/lib/ReactPropTypeLocations.js +5 -3
  32. package/lib/ReactPropTypes.js +447 -7
  33. package/lib/ReactPureComponent.js +41 -0
  34. package/lib/ReactStateSetters.js +5 -3
  35. package/lib/ReactTransitionChildMapping.js +5 -3
  36. package/lib/ReactTransitionEvents.js +5 -3
  37. package/lib/ReactTransitionGroup.js +8 -12
  38. package/lib/ReactTypeOfWork.js +26 -0
  39. package/lib/ReactUMDEntry.js +8 -7
  40. package/lib/ReactUMDShim.js +5 -3
  41. package/lib/ReactVersion.js +6 -4
  42. package/lib/ReactWithAddons.js +5 -5
  43. package/lib/ReactWithAddonsUMDEntry.js +8 -7
  44. package/lib/canDefineProperty.js +5 -3
  45. package/lib/checkReactTypeSpec.js +22 -9
  46. package/lib/deprecated.js +8 -6
  47. package/lib/flattenChildren.js +5 -3
  48. package/lib/getComponentName.js +37 -0
  49. package/lib/getIteratorFn.js +5 -3
  50. package/lib/getNextDebugID.js +5 -3
  51. package/lib/onlyChild.js +6 -4
  52. package/lib/reactProdInvariant.js +4 -2
  53. package/lib/shallowCompare.js +5 -3
  54. package/lib/sliceChildren.js +5 -3
  55. package/lib/traverseAllChildren.js +6 -4
  56. package/lib/update.js +5 -3
  57. package/package.json +24 -35
  58. package/cjs/react-jsx-dev-runtime.development.js +0 -866
  59. package/cjs/react-jsx-dev-runtime.production.min.js +0 -9
  60. package/cjs/react-jsx-runtime.development.js +0 -888
  61. package/cjs/react-jsx-runtime.production.min.js +0 -10
  62. package/jsx-dev-runtime.js +0 -7
  63. package/jsx-runtime.js +0 -7
  64. package/lib/LinkedStateMixin.js +0 -32
  65. package/lib/ReactComponentTreeDevtool.js +0 -12
  66. package/lib/ReactLink.js +0 -47
  67. package/lib/ReactPropTypesSecret.js +0 -14
  68. package/lib/createClass.js +0 -20
  69. package/lib/getNextDebugIDUMDShim.js +0 -15
  70. package/lib/lowPriorityWarning.js +0 -62
@@ -1,10 +0,0 @@
1
- /** @license React v15.7.0
2
- * react-jsx-runtime.production.min.js
3
- *
4
- * Copyright (c) Facebook, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
- 'use strict';var f=require("react"),g=60103;exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h("react.element");exports.Fragment=h("react.fragment")}var m=require("react/lib/ReactCurrentOwner"),n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};
10
- function q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=""+k);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');
5
- } else {
6
- module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
7
- }
package/jsx-runtime.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./cjs/react-jsx-runtime.production.min.js');
5
- } else {
6
- module.exports = require('./cjs/react-jsx-runtime.development.js');
7
- }
@@ -1,32 +0,0 @@
1
- /**
2
- * Copyright (c) 2013-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- 'use strict';
10
-
11
- var ReactLink = require('./ReactLink');
12
- var ReactStateSetters = require('./ReactStateSetters');
13
-
14
- /**
15
- * A simple mixin around ReactLink.forState().
16
- * See https://facebook.github.io/react/docs/two-way-binding-helpers.html
17
- */
18
- var LinkedStateMixin = {
19
- /**
20
- * Create a ReactLink that's linked to part of this component's state. The
21
- * ReactLink will have the current value of this.state[key] and will call
22
- * setState() when a change is requested.
23
- *
24
- * @param {string} key state key to update.
25
- * @return {ReactLink} ReactLink instance linking to the state.
26
- */
27
- linkState: function (key) {
28
- return new ReactLink(this.state[key], ReactStateSetters.createStateKeySetter(this, key));
29
- }
30
- };
31
-
32
- module.exports = LinkedStateMixin;
@@ -1,12 +0,0 @@
1
- /**
2
- * Copyright (c) 2016-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- 'use strict';
9
-
10
- // TODO remove this proxy when RN/www gets updated
11
-
12
- module.exports = require('./ReactComponentTreeHook');
package/lib/ReactLink.js DELETED
@@ -1,47 +0,0 @@
1
- /**
2
- * Copyright (c) 2013-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- 'use strict';
10
-
11
- /**
12
- * ReactLink encapsulates a common pattern in which a component wants to modify
13
- * a prop received from its parent. ReactLink allows the parent to pass down a
14
- * value coupled with a callback that, when invoked, expresses an intent to
15
- * modify that value. For example:
16
- *
17
- * React.createClass({
18
- * getInitialState: function() {
19
- * return {value: ''};
20
- * },
21
- * render: function() {
22
- * var valueLink = new ReactLink(this.state.value, this._handleValueChange);
23
- * return <input valueLink={valueLink} />;
24
- * },
25
- * _handleValueChange: function(newValue) {
26
- * this.setState({value: newValue});
27
- * }
28
- * });
29
- *
30
- * We have provided some sugary mixins to make the creation and
31
- * consumption of ReactLink easier; see LinkedValueUtils and LinkedStateMixin.
32
- */
33
-
34
- /**
35
- * Deprecated: An an easy way to express two-way binding with React.
36
- * See https://facebook.github.io/react/docs/two-way-binding-helpers.html
37
- *
38
- * @param {*} value current value of the link
39
- * @param {function} requestChange callback to request a change
40
- */
41
-
42
- function ReactLink(value, requestChange) {
43
- this.value = value;
44
- this.requestChange = requestChange;
45
- }
46
-
47
- module.exports = ReactLink;
@@ -1,14 +0,0 @@
1
- /**
2
- * Copyright (c) 2013-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- *
8
- */
9
-
10
- 'use strict';
11
-
12
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
13
-
14
- module.exports = ReactPropTypesSecret;
@@ -1,20 +0,0 @@
1
- /**
2
- * Copyright (c) 2013-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- 'use strict';
10
-
11
- var _require = require('./ReactBaseClasses'),
12
- Component = _require.Component;
13
-
14
- var _require2 = require('./ReactElement'),
15
- isValidElement = _require2.isValidElement;
16
-
17
- var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
18
- var factory = require('create-react-class/factory');
19
-
20
- module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
@@ -1,15 +0,0 @@
1
- /**
2
- * Copyright (c) 2013-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- /* globals React */
10
-
11
- 'use strict';
12
-
13
- var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
14
-
15
- module.exports = ReactInternals.getNextDebugID;
@@ -1,62 +0,0 @@
1
- /**
2
- * Copyright (c) 2014-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- 'use strict';
10
-
11
- /**
12
- * Forked from fbjs/warning:
13
- * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
14
- *
15
- * Only change is we use console.warn instead of console.error,
16
- * and do nothing when 'console' is not supported.
17
- * This really simplifies the code.
18
- * ---
19
- * Similar to invariant but only logs a warning if the condition is not met.
20
- * This can be used to log issues in development environments in critical
21
- * paths. Removing the logging code for production environments will keep the
22
- * same logic and follow the same code paths.
23
- */
24
-
25
- var lowPriorityWarning = function () {};
26
-
27
- if (process.env.NODE_ENV !== 'production') {
28
- var printWarning = function (format) {
29
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
30
- args[_key - 1] = arguments[_key];
31
- }
32
-
33
- var argIndex = 0;
34
- var message = 'Warning: ' + format.replace(/%s/g, function () {
35
- return args[argIndex++];
36
- });
37
- if (typeof console !== 'undefined') {
38
- console.warn(message);
39
- }
40
- try {
41
- // --- Welcome to debugging React ---
42
- // This error was thrown as a convenience so that you can use this stack
43
- // to find the callsite that caused this warning to fire.
44
- throw new Error(message);
45
- } catch (x) {}
46
- };
47
-
48
- lowPriorityWarning = function (condition, format) {
49
- if (format === undefined) {
50
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
51
- }
52
- if (!condition) {
53
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
54
- args[_key2 - 2] = arguments[_key2];
55
- }
56
-
57
- printWarning.apply(undefined, [format].concat(args));
58
- }
59
- };
60
- }
61
-
62
- module.exports = lowPriorityWarning;