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.
- package/LICENSE +26 -16
- package/PATENTS +33 -0
- package/README.md +7 -0
- package/dist/react-with-addons.js +3831 -4404
- package/dist/react-with-addons.min.js +7 -6
- package/dist/react.js +2929 -3319
- package/dist/react.min.js +7 -5
- package/lib/KeyEscapeUtils.js +5 -3
- package/lib/PooledClass.js +5 -3
- package/lib/React.js +20 -61
- package/lib/ReactAddonsDOMDependencies.js +5 -3
- package/lib/ReactAddonsDOMDependenciesUMDShim.js +5 -3
- package/lib/ReactCSSTransitionGroup.js +9 -9
- package/lib/ReactCSSTransitionGroupChild.js +118 -134
- package/lib/ReactChildren.js +9 -7
- package/lib/ReactClass.js +703 -0
- package/lib/{ReactBaseClasses.js → ReactComponent.js} +11 -40
- package/lib/ReactComponentTreeHook.js +63 -58
- package/lib/ReactComponentTreeHookUMDShim.js +5 -3
- package/lib/ReactComponentWithPureRenderMixin.js +5 -3
- package/lib/ReactCurrentOwner.js +7 -3
- package/lib/ReactCurrentOwnerUMDShim.js +5 -3
- package/lib/ReactDOMFactories.js +6 -3
- package/lib/ReactElement.js +9 -7
- package/lib/ReactElementSymbol.js +5 -3
- package/lib/ReactElementType.js +5 -3
- package/lib/ReactElementValidator.js +13 -12
- package/lib/ReactFragment.js +5 -3
- package/lib/ReactNoopUpdateQueue.js +15 -16
- package/lib/ReactPropTypeLocationNames.js +5 -3
- package/lib/ReactPropTypeLocations.js +5 -3
- package/lib/ReactPropTypes.js +447 -7
- package/lib/ReactPureComponent.js +41 -0
- package/lib/ReactStateSetters.js +5 -3
- package/lib/ReactTransitionChildMapping.js +5 -3
- package/lib/ReactTransitionEvents.js +5 -3
- package/lib/ReactTransitionGroup.js +8 -12
- package/lib/ReactTypeOfWork.js +26 -0
- package/lib/ReactUMDEntry.js +8 -7
- package/lib/ReactUMDShim.js +5 -3
- package/lib/ReactVersion.js +6 -4
- package/lib/ReactWithAddons.js +5 -5
- package/lib/ReactWithAddonsUMDEntry.js +8 -7
- package/lib/canDefineProperty.js +5 -3
- package/lib/checkReactTypeSpec.js +22 -9
- package/lib/deprecated.js +8 -6
- package/lib/flattenChildren.js +5 -3
- package/lib/getComponentName.js +37 -0
- package/lib/getIteratorFn.js +5 -3
- package/lib/getNextDebugID.js +5 -3
- package/lib/onlyChild.js +6 -4
- package/lib/reactProdInvariant.js +4 -2
- package/lib/shallowCompare.js +5 -3
- package/lib/sliceChildren.js +5 -3
- package/lib/traverseAllChildren.js +6 -4
- package/lib/update.js +5 -3
- package/package.json +24 -35
- package/cjs/react-jsx-dev-runtime.development.js +0 -866
- package/cjs/react-jsx-dev-runtime.production.min.js +0 -9
- package/cjs/react-jsx-runtime.development.js +0 -888
- package/cjs/react-jsx-runtime.production.min.js +0 -10
- package/jsx-dev-runtime.js +0 -7
- package/jsx-runtime.js +0 -7
- package/lib/LinkedStateMixin.js +0 -32
- package/lib/ReactComponentTreeDevtool.js +0 -12
- package/lib/ReactLink.js +0 -47
- package/lib/ReactPropTypesSecret.js +0 -14
- package/lib/createClass.js +0 -20
- package/lib/getNextDebugIDUMDShim.js +0 -15
- 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;
|
package/jsx-dev-runtime.js
DELETED
package/jsx-runtime.js
DELETED
package/lib/LinkedStateMixin.js
DELETED
|
@@ -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;
|
package/lib/createClass.js
DELETED
|
@@ -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;
|