react 15.0.0-rc.2 → 15.0.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/dist/react-with-addons.js +1217 -1105
- package/dist/react-with-addons.min.js +6 -6
- package/dist/react.js +1083 -1001
- package/dist/react.min.js +6 -6
- package/lib/CSSPropertyOperations.js +31 -15
- package/lib/CallbackQueue.js +4 -3
- package/lib/DOMChildrenOperations.js +0 -3
- package/lib/DOMProperty.js +3 -3
- package/lib/DOMPropertyOperations.js +3 -2
- package/lib/Danger.js +8 -8
- package/lib/EventPluginHub.js +2 -2
- package/lib/EventPluginRegistry.js +7 -7
- package/lib/EventPluginUtils.js +5 -5
- package/lib/EventPropagators.js +1 -1
- package/lib/FallbackCompositionState.js +3 -2
- package/lib/LinkedValueUtils.js +4 -4
- package/lib/OrderedMap.js +16 -15
- package/lib/PooledClass.js +1 -1
- package/lib/React.js +51 -9
- package/lib/ReactBrowserEventEmitter.js +3 -2
- package/lib/ReactCSSTransitionGroup.js +3 -3
- package/lib/ReactChildReconciler.js +1 -1
- package/lib/ReactClass.js +24 -23
- package/lib/ReactComponent.js +5 -5
- package/lib/ReactComponentEnvironment.js +1 -1
- package/lib/ReactCompositeComponent.js +26 -25
- package/lib/ReactDOM.js +3 -3
- package/lib/ReactDOMComponent.js +27 -22
- package/lib/ReactDOMComponentTree.js +3 -3
- package/lib/ReactDOMDebugTool.js +1 -1
- package/lib/ReactDOMEmptyComponent.js +3 -3
- package/lib/ReactDOMInput.js +11 -10
- package/lib/ReactDOMOption.js +5 -4
- package/lib/ReactDOMSelect.js +8 -7
- package/lib/ReactDOMTextComponent.js +4 -3
- package/lib/ReactDOMTextarea.js +10 -9
- package/lib/ReactDOMTreeTraversal.js +5 -5
- package/lib/ReactDOMUnknownPropertyDevtool.js +2 -2
- package/lib/ReactDebugInstanceMap.js +102 -0
- package/lib/ReactDebugTool.js +1 -1
- package/lib/ReactDefaultBatchingStrategy.js +3 -2
- package/lib/ReactDefaultPerf.js +46 -7
- package/lib/ReactDefaultPerfAnalysis.js +7 -7
- package/lib/ReactElement.js +5 -4
- package/lib/ReactElementValidator.js +7 -7
- package/lib/ReactEventListener.js +3 -2
- package/lib/ReactFragment.js +4 -4
- package/lib/ReactInstanceHandles.js +6 -6
- package/lib/ReactInvalidSetStateWarningDevTool.js +1 -1
- package/lib/ReactMount.js +15 -14
- package/lib/ReactMultiChild.js +2 -2
- package/lib/ReactNativeComponent.js +4 -3
- package/lib/ReactNodeTypes.js +1 -1
- package/lib/ReactNoopUpdateQueue.js +1 -1
- package/lib/ReactOwner.js +2 -2
- package/lib/ReactPropTransferer.js +4 -3
- package/lib/ReactReconcileTransaction.js +3 -3
- package/lib/ReactServerRendering.js +2 -2
- package/lib/ReactServerRenderingTransaction.js +3 -3
- package/lib/ReactSimpleEmptyComponent.js +3 -3
- package/lib/ReactTestUtils.js +18 -8
- package/lib/ReactTransitionGroup.js +3 -2
- package/lib/ReactUMDEntry.js +26 -0
- package/lib/ReactUpdateQueue.js +23 -6
- package/lib/ReactUpdates.js +10 -9
- package/lib/ReactVersion.js +1 -1
- package/lib/ReactWithAddons.js +0 -7
- package/lib/ReactWithAddonsUMDEntry.js +26 -0
- package/lib/ResponderEventPlugin.js +1 -1
- package/lib/ResponderTouchHistoryStore.js +4 -4
- package/lib/SimpleEventPlugin.js +1 -1
- package/lib/SyntheticEvent.js +7 -6
- package/lib/Transaction.js +2 -2
- package/lib/accumulate.js +1 -1
- package/lib/accumulateInto.js +1 -1
- package/lib/dangerousStyleValue.js +1 -1
- package/lib/deprecated.js +4 -3
- package/lib/findDOMNode.js +3 -3
- package/lib/flattenChildren.js +1 -1
- package/lib/instantiateReactComponent.js +6 -5
- package/lib/onlyChild.js +1 -1
- package/lib/reactComponentExpect.js +4 -3
- package/lib/setInnerHTML.js +1 -0
- package/lib/traverseAllChildren.js +2 -2
- package/lib/update.js +14 -13
- package/lib/validateDOMNesting.js +5 -4
- package/package.json +5 -4
- package/addons.js +0 -15
- package/lib/Object.assign.js +0 -47
- package/lib/React.native.js +0 -5
- package/lib/ReactIsomorphic.js +0 -74
package/lib/flattenChildren.js
CHANGED
|
@@ -24,7 +24,7 @@ function flattenSingleChildIntoContext(traverseContext, child, name) {
|
|
|
24
24
|
var result = traverseContext;
|
|
25
25
|
var keyUnique = result[name] === undefined;
|
|
26
26
|
if (process.env.NODE_ENV !== 'production') {
|
|
27
|
-
process.env.NODE_ENV !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) :
|
|
27
|
+
process.env.NODE_ENV !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : void 0;
|
|
28
28
|
}
|
|
29
29
|
if (keyUnique && child != null) {
|
|
30
30
|
result[name] = child;
|
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
|
+
var _assign = require('object-assign');
|
|
15
|
+
|
|
14
16
|
var ReactCompositeComponent = require('./ReactCompositeComponent');
|
|
15
17
|
var ReactEmptyComponent = require('./ReactEmptyComponent');
|
|
16
18
|
var ReactNativeComponent = require('./ReactNativeComponent');
|
|
17
19
|
|
|
18
|
-
var assign = require('./Object.assign');
|
|
19
20
|
var invariant = require('fbjs/lib/invariant');
|
|
20
21
|
var warning = require('fbjs/lib/warning');
|
|
21
22
|
|
|
@@ -23,7 +24,7 @@ var warning = require('fbjs/lib/warning');
|
|
|
23
24
|
var ReactCompositeComponentWrapper = function (element) {
|
|
24
25
|
this.construct(element);
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
+
_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, {
|
|
27
28
|
_instantiateReactComponent: instantiateReactComponent
|
|
28
29
|
});
|
|
29
30
|
|
|
@@ -62,7 +63,7 @@ function instantiateReactComponent(node) {
|
|
|
62
63
|
instance = ReactEmptyComponent.create(instantiateReactComponent);
|
|
63
64
|
} else if (typeof node === 'object') {
|
|
64
65
|
var element = node;
|
|
65
|
-
!(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) ' + 'or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : invariant(false) :
|
|
66
|
+
!(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) ' + 'or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : invariant(false) : void 0;
|
|
66
67
|
|
|
67
68
|
// Special case string values
|
|
68
69
|
if (typeof element.type === 'string') {
|
|
@@ -78,11 +79,11 @@ function instantiateReactComponent(node) {
|
|
|
78
79
|
} else if (typeof node === 'string' || typeof node === 'number') {
|
|
79
80
|
instance = ReactNativeComponent.createInstanceForText(node);
|
|
80
81
|
} else {
|
|
81
|
-
!false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : invariant(false) :
|
|
82
|
+
!false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : invariant(false) : void 0;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
if (process.env.NODE_ENV !== 'production') {
|
|
85
|
-
process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getNativeNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') :
|
|
86
|
+
process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getNativeNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
// These two fields are used by the DOM and ART diffing algorithms
|
package/lib/onlyChild.js
CHANGED
|
@@ -26,7 +26,7 @@ var invariant = require('fbjs/lib/invariant');
|
|
|
26
26
|
* structure.
|
|
27
27
|
*/
|
|
28
28
|
function onlyChild(children) {
|
|
29
|
-
!ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : invariant(false) :
|
|
29
|
+
!ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : invariant(false) : void 0;
|
|
30
30
|
return children;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
+
var _assign = require('object-assign');
|
|
16
|
+
|
|
15
17
|
var ReactInstanceMap = require('./ReactInstanceMap');
|
|
16
18
|
var ReactTestUtils = require('./ReactTestUtils');
|
|
17
19
|
|
|
18
|
-
var assign = require('./Object.assign');
|
|
19
20
|
var invariant = require('fbjs/lib/invariant');
|
|
20
21
|
|
|
21
22
|
function reactComponentExpect(instance) {
|
|
@@ -30,7 +31,7 @@ function reactComponentExpect(instance) {
|
|
|
30
31
|
expect(instance).not.toBeNull();
|
|
31
32
|
expect(instance).not.toBeUndefined();
|
|
32
33
|
|
|
33
|
-
!ReactTestUtils.isCompositeComponent(instance) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'reactComponentExpect(...): instance must be a composite component') : invariant(false) :
|
|
34
|
+
!ReactTestUtils.isCompositeComponent(instance) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'reactComponentExpect(...): instance must be a composite component') : invariant(false) : void 0;
|
|
34
35
|
var internalInstance = ReactInstanceMap.get(instance);
|
|
35
36
|
|
|
36
37
|
expect(typeof internalInstance).toBe('object');
|
|
@@ -44,7 +45,7 @@ function reactComponentExpectInternal(internalInstance) {
|
|
|
44
45
|
this._instance = internalInstance;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
_assign(reactComponentExpectInternal.prototype, {
|
|
48
49
|
// Getters -------------------------------------------------------------------
|
|
49
50
|
|
|
50
51
|
/**
|
package/lib/setInnerHTML.js
CHANGED
|
@@ -127,7 +127,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
127
127
|
}
|
|
128
128
|
} else {
|
|
129
129
|
if (process.env.NODE_ENV !== 'production') {
|
|
130
|
-
process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.') :
|
|
130
|
+
process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.') : void 0;
|
|
131
131
|
didWarnAboutMaps = true;
|
|
132
132
|
}
|
|
133
133
|
// Iterator will provide entry [k,v] tuples rather than values.
|
|
@@ -155,7 +155,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
var childrenString = String(children);
|
|
158
|
-
!false ? process.env.NODE_ENV !== '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) : invariant(false) :
|
|
158
|
+
!false ? process.env.NODE_ENV !== '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) : invariant(false) : void 0;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
package/lib/update.js
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _assign = require('object-assign');
|
|
17
|
+
|
|
17
18
|
var keyOf = require('fbjs/lib/keyOf');
|
|
18
19
|
var invariant = require('fbjs/lib/invariant');
|
|
19
20
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
@@ -22,7 +23,7 @@ function shallowCopy(x) {
|
|
|
22
23
|
if (Array.isArray(x)) {
|
|
23
24
|
return x.concat();
|
|
24
25
|
} else if (x && typeof x === 'object') {
|
|
25
|
-
return
|
|
26
|
+
return _assign(new x.constructor(), x);
|
|
26
27
|
} else {
|
|
27
28
|
return x;
|
|
28
29
|
}
|
|
@@ -44,16 +45,16 @@ ALL_COMMANDS_LIST.forEach(function (command) {
|
|
|
44
45
|
});
|
|
45
46
|
|
|
46
47
|
function invariantArrayCase(value, spec, command) {
|
|
47
|
-
!Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected target of %s to be an array; got %s.', command, value) : invariant(false) :
|
|
48
|
+
!Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected target of %s to be an array; got %s.', command, value) : invariant(false) : void 0;
|
|
48
49
|
var specValue = spec[command];
|
|
49
|
-
!Array.isArray(specValue) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array; got %s. ' + 'Did you forget to wrap your parameter in an array?', command, specValue) : invariant(false) :
|
|
50
|
+
!Array.isArray(specValue) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array; got %s. ' + 'Did you forget to wrap your parameter in an array?', command, specValue) : invariant(false) : void 0;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
function update(value, spec) {
|
|
53
|
-
!(typeof spec === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): You provided a key path to update() that did not contain one ' + 'of %s. Did you forget to include {%s: ...}?', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : invariant(false) :
|
|
54
|
+
!(typeof spec === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): You provided a key path to update() that did not contain one ' + 'of %s. Did you forget to include {%s: ...}?', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : invariant(false) : void 0;
|
|
54
55
|
|
|
55
56
|
if (hasOwnProperty.call(spec, COMMAND_SET)) {
|
|
56
|
-
!(Object.keys(spec).length === 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot have more than one key in an object with %s', COMMAND_SET) : invariant(false) :
|
|
57
|
+
!(Object.keys(spec).length === 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot have more than one key in an object with %s', COMMAND_SET) : invariant(false) : void 0;
|
|
57
58
|
|
|
58
59
|
return spec[COMMAND_SET];
|
|
59
60
|
}
|
|
@@ -62,9 +63,9 @@ function update(value, spec) {
|
|
|
62
63
|
|
|
63
64
|
if (hasOwnProperty.call(spec, COMMAND_MERGE)) {
|
|
64
65
|
var mergeObj = spec[COMMAND_MERGE];
|
|
65
|
-
!(mergeObj && typeof mergeObj === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a spec of type \'object\'; got %s', COMMAND_MERGE, mergeObj) : invariant(false) :
|
|
66
|
-
!(nextValue && typeof nextValue === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a target of type \'object\'; got %s', COMMAND_MERGE, nextValue) : invariant(false) :
|
|
67
|
-
|
|
66
|
+
!(mergeObj && typeof mergeObj === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a spec of type \'object\'; got %s', COMMAND_MERGE, mergeObj) : invariant(false) : void 0;
|
|
67
|
+
!(nextValue && typeof nextValue === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a target of type \'object\'; got %s', COMMAND_MERGE, nextValue) : invariant(false) : void 0;
|
|
68
|
+
_assign(nextValue, spec[COMMAND_MERGE]);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
if (hasOwnProperty.call(spec, COMMAND_PUSH)) {
|
|
@@ -82,16 +83,16 @@ function update(value, spec) {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {
|
|
85
|
-
!Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s target to be an array; got %s', COMMAND_SPLICE, value) : invariant(false) :
|
|
86
|
-
!Array.isArray(spec[COMMAND_SPLICE]) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. ' + 'Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : invariant(false) :
|
|
86
|
+
!Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s target to be an array; got %s', COMMAND_SPLICE, value) : invariant(false) : void 0;
|
|
87
|
+
!Array.isArray(spec[COMMAND_SPLICE]) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. ' + 'Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : invariant(false) : void 0;
|
|
87
88
|
spec[COMMAND_SPLICE].forEach(function (args) {
|
|
88
|
-
!Array.isArray(args) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. ' + 'Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : invariant(false) :
|
|
89
|
+
!Array.isArray(args) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. ' + 'Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : invariant(false) : void 0;
|
|
89
90
|
nextValue.splice.apply(nextValue, args);
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
if (hasOwnProperty.call(spec, COMMAND_APPLY)) {
|
|
94
|
-
!(typeof spec[COMMAND_APPLY] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be a function; got %s.', COMMAND_APPLY, spec[COMMAND_APPLY]) : invariant(false) :
|
|
95
|
+
!(typeof spec[COMMAND_APPLY] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be a function; got %s.', COMMAND_APPLY, spec[COMMAND_APPLY]) : invariant(false) : void 0;
|
|
95
96
|
nextValue = spec[COMMAND_APPLY](nextValue);
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _assign = require('object-assign');
|
|
15
|
+
|
|
15
16
|
var emptyFunction = require('fbjs/lib/emptyFunction');
|
|
16
17
|
var warning = require('fbjs/lib/warning');
|
|
17
18
|
|
|
@@ -60,7 +61,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
var updatedAncestorInfo = function (oldInfo, tag, instance) {
|
|
63
|
-
var ancestorInfo =
|
|
64
|
+
var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
|
|
64
65
|
var info = { tag: tag, instance: instance };
|
|
65
66
|
|
|
66
67
|
if (inScopeTags.indexOf(tag) !== -1) {
|
|
@@ -346,9 +347,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
346
347
|
if (ancestorTag === 'table' && childTag === 'tr') {
|
|
347
348
|
info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
|
|
348
349
|
}
|
|
349
|
-
process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>. ' + 'See %s.%s', tagDisplayName, ancestorTag, ownerInfo, info) :
|
|
350
|
+
process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>. ' + 'See %s.%s', tagDisplayName, ancestorTag, ownerInfo, info) : void 0;
|
|
350
351
|
} else {
|
|
351
|
-
process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) :
|
|
352
|
+
process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
|
|
352
353
|
}
|
|
353
354
|
}
|
|
354
355
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react",
|
|
3
3
|
"description": "React is a JavaScript library for building user interfaces.",
|
|
4
|
-
"version": "15.0.0
|
|
4
|
+
"version": "15.0.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react"
|
|
7
7
|
],
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
"node": ">=0.10.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"fbjs": "^0.8.0",
|
|
27
|
+
"loose-envify": "^1.1.0",
|
|
28
|
+
"object-assign": "^4.0.1"
|
|
28
29
|
},
|
|
29
30
|
"browserify": {
|
|
30
31
|
"transform": [
|
|
31
|
-
"envify"
|
|
32
|
+
"loose-envify"
|
|
32
33
|
]
|
|
33
34
|
}
|
|
34
35
|
}
|
package/addons.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var warning = require('fbjs/lib/warning');
|
|
4
|
-
warning(
|
|
5
|
-
false,
|
|
6
|
-
/* eslint-disable no-useless-concat */
|
|
7
|
-
// Require examples in this string must be split to prevent React's
|
|
8
|
-
// build tools from mistaking them for real requires.
|
|
9
|
-
// Otherwise the build tools will attempt to build a 'react-addons-{addon}' module.
|
|
10
|
-
'require' + "('react/addons') is deprecated. " +
|
|
11
|
-
'Access using require' + "('react-addons-{addon}') instead."
|
|
12
|
-
);
|
|
13
|
-
/* eslint-enable no-useless-concat */
|
|
14
|
-
|
|
15
|
-
module.exports = require('./lib/ReactWithAddons');
|
package/lib/Object.assign.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2014-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
-
*
|
|
9
|
-
* @providesModule Object.assign
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
|
|
13
|
-
|
|
14
|
-
'use strict';
|
|
15
|
-
|
|
16
|
-
function assign(target, sources) {
|
|
17
|
-
if (target == null) {
|
|
18
|
-
throw new TypeError('Object.assign target cannot be null or undefined');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var to = Object(target);
|
|
22
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
23
|
-
|
|
24
|
-
for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
|
|
25
|
-
var nextSource = arguments[nextIndex];
|
|
26
|
-
if (nextSource == null) {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var from = Object(nextSource);
|
|
31
|
-
|
|
32
|
-
// We don't currently support accessors nor proxies. Therefore this
|
|
33
|
-
// copy cannot throw. If we ever supported this then we must handle
|
|
34
|
-
// exceptions and side-effects. We don't support symbols so they won't
|
|
35
|
-
// be transferred.
|
|
36
|
-
|
|
37
|
-
for (var key in from) {
|
|
38
|
-
if (hasOwnProperty.call(from, key)) {
|
|
39
|
-
to[key] = from[key];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return to;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = assign;
|
package/lib/React.native.js
DELETED
package/lib/ReactIsomorphic.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
-
*
|
|
9
|
-
* @providesModule ReactIsomorphic
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
|
-
var ReactChildren = require('./ReactChildren');
|
|
15
|
-
var ReactComponent = require('./ReactComponent');
|
|
16
|
-
var ReactClass = require('./ReactClass');
|
|
17
|
-
var ReactDOMFactories = require('./ReactDOMFactories');
|
|
18
|
-
var ReactElement = require('./ReactElement');
|
|
19
|
-
var ReactElementValidator = require('./ReactElementValidator');
|
|
20
|
-
var ReactPropTypes = require('./ReactPropTypes');
|
|
21
|
-
var ReactVersion = require('./ReactVersion');
|
|
22
|
-
|
|
23
|
-
var assign = require('./Object.assign');
|
|
24
|
-
var onlyChild = require('./onlyChild');
|
|
25
|
-
|
|
26
|
-
var createElement = ReactElement.createElement;
|
|
27
|
-
var createFactory = ReactElement.createFactory;
|
|
28
|
-
var cloneElement = ReactElement.cloneElement;
|
|
29
|
-
|
|
30
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
31
|
-
createElement = ReactElementValidator.createElement;
|
|
32
|
-
createFactory = ReactElementValidator.createFactory;
|
|
33
|
-
cloneElement = ReactElementValidator.cloneElement;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var React = {
|
|
37
|
-
|
|
38
|
-
// Modern
|
|
39
|
-
|
|
40
|
-
Children: {
|
|
41
|
-
map: ReactChildren.map,
|
|
42
|
-
forEach: ReactChildren.forEach,
|
|
43
|
-
count: ReactChildren.count,
|
|
44
|
-
toArray: ReactChildren.toArray,
|
|
45
|
-
only: onlyChild
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
Component: ReactComponent,
|
|
49
|
-
|
|
50
|
-
createElement: createElement,
|
|
51
|
-
cloneElement: cloneElement,
|
|
52
|
-
isValidElement: ReactElement.isValidElement,
|
|
53
|
-
|
|
54
|
-
// Classic
|
|
55
|
-
|
|
56
|
-
PropTypes: ReactPropTypes,
|
|
57
|
-
createClass: ReactClass.createClass,
|
|
58
|
-
createFactory: createFactory,
|
|
59
|
-
createMixin: function (mixin) {
|
|
60
|
-
// Currently a noop. Will be used to validate and trace mixins.
|
|
61
|
-
return mixin;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
// This looks DOM specific but these are actually isomorphic helpers
|
|
65
|
-
// since they are just generating DOM strings.
|
|
66
|
-
DOM: ReactDOMFactories,
|
|
67
|
-
|
|
68
|
-
version: ReactVersion,
|
|
69
|
-
|
|
70
|
-
// Hook for JSX spread, don't use this for anything else.
|
|
71
|
-
__spread: assign
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
module.exports = React;
|