react 0.11.2 → 0.12.2
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/JSXTransformer.js +2714 -7859
- package/dist/react-with-addons.js +3139 -3593
- package/dist/react-with-addons.min.js +11 -17
- package/dist/react.js +2940 -3308
- package/dist/react.min.js +11 -16
- package/lib/AutoFocusMixin.js +5 -12
- package/lib/BeforeInputEventPlugin.js +12 -14
- package/lib/CSSCore.js +6 -13
- package/lib/CSSProperty.js +10 -14
- package/lib/CSSPropertyOperations.js +46 -12
- package/lib/CallbackQueue.js +7 -14
- package/lib/ChangeEventPlugin.js +5 -12
- package/lib/ClientReactRootIndex.js +5 -12
- package/lib/CompositionEventPlugin.js +5 -12
- package/lib/DOMChildrenOperations.js +8 -15
- package/lib/DOMProperty.js +16 -19
- package/lib/DOMPropertyOperations.js +14 -14
- package/lib/Danger.js +12 -17
- package/lib/DefaultEventPluginOrder.js +5 -12
- package/lib/EnterLeaveEventPlugin.js +5 -12
- package/lib/EventConstants.js +5 -12
- package/lib/EventListener.js +14 -0
- package/lib/EventPluginHub.js +8 -26
- package/lib/EventPluginRegistry.js +5 -12
- package/lib/EventPluginUtils.js +5 -12
- package/lib/EventPropagators.js +12 -17
- package/lib/ExecutionEnvironment.js +5 -12
- package/lib/HTMLDOMPropertyConfig.js +16 -15
- package/lib/LinkedStateMixin.js +5 -12
- package/lib/LinkedValueUtils.js +5 -12
- package/lib/LocalEventTrapMixin.js +8 -14
- package/lib/MobileSafariClickEventPlugin.js +5 -12
- package/lib/Object.assign.js +45 -0
- package/lib/PooledClass.js +5 -12
- package/lib/React.js +87 -54
- package/lib/ReactBrowserComponentMixin.js +5 -12
- package/lib/ReactBrowserEventEmitter.js +7 -14
- package/lib/ReactCSSTransitionGroup.js +15 -17
- package/lib/ReactCSSTransitionGroupChild.js +9 -13
- package/lib/ReactChildren.js +5 -12
- package/lib/ReactComponent.js +61 -68
- package/lib/ReactComponentBrowserEnvironment.js +5 -12
- package/lib/ReactComponentWithPureRenderMixin.js +5 -12
- package/lib/ReactCompositeComponent.js +191 -180
- package/lib/ReactContext.js +8 -15
- package/lib/ReactCurrentOwner.js +5 -12
- package/lib/ReactDOM.js +145 -177
- package/lib/ReactDOMButton.js +8 -14
- package/lib/ReactDOMComponent.js +103 -38
- package/lib/ReactDOMForm.js +9 -15
- package/lib/ReactDOMIDOperations.js +5 -12
- package/lib/ReactDOMImg.js +8 -14
- package/lib/ReactDOMInput.js +30 -38
- package/lib/ReactDOMOption.js +8 -14
- package/lib/ReactDOMSelect.js +25 -24
- package/lib/ReactDOMSelection.js +11 -18
- package/lib/ReactDOMTextarea.js +19 -24
- package/lib/ReactDefaultBatchingStrategy.js +14 -18
- package/lib/ReactDefaultInjection.js +23 -26
- package/lib/ReactDefaultPerf.js +14 -17
- package/lib/ReactDefaultPerfAnalysis.js +18 -17
- package/lib/ReactElement.js +242 -0
- package/lib/{ReactDescriptorValidator.js → ReactElementValidator.js} +51 -56
- package/lib/ReactEmptyComponent.js +8 -13
- package/lib/ReactErrorUtils.js +5 -12
- package/lib/ReactEventEmitterMixin.js +5 -12
- package/lib/ReactEventListener.js +7 -14
- package/lib/ReactInjection.js +7 -14
- package/lib/ReactInputSelection.js +5 -12
- package/lib/ReactInstanceHandles.js +5 -12
- package/lib/ReactLegacyElement.js +243 -0
- package/lib/ReactLink.js +5 -12
- package/lib/ReactMarkupChecksum.js +5 -12
- package/lib/ReactMount.js +45 -32
- package/lib/ReactMultiChild.js +14 -18
- package/lib/ReactMultiChildUpdateTypes.js +5 -12
- package/lib/ReactNativeComponent.js +69 -0
- package/lib/ReactOwner.js +5 -12
- package/lib/ReactPerf.js +8 -13
- package/lib/ReactPropTransferer.js +34 -33
- package/lib/ReactPropTypeLocationNames.js +5 -12
- package/lib/ReactPropTypeLocations.js +5 -12
- package/lib/ReactPropTypes.js +38 -29
- package/lib/ReactPutListenerQueue.js +7 -14
- package/lib/ReactReconcileTransaction.js +7 -15
- package/lib/ReactRootIndex.js +5 -12
- package/lib/ReactServerRendering.js +21 -34
- package/lib/ReactServerRenderingTransaction.js +11 -15
- package/lib/ReactStateSetters.js +5 -12
- package/lib/ReactTestUtils.js +31 -33
- package/lib/ReactTextComponent.js +18 -21
- package/lib/ReactTransitionChildMapping.js +6 -13
- package/lib/ReactTransitionEvents.js +5 -12
- package/lib/ReactTransitionGroup.js +14 -17
- package/lib/ReactUpdates.js +43 -22
- package/lib/ReactWithAddons.js +7 -13
- package/lib/SVGDOMPropertyConfig.js +5 -12
- package/lib/SelectEventPlugin.js +13 -20
- package/lib/ServerReactRootIndex.js +5 -12
- package/lib/SimpleEventPlugin.js +20 -15
- package/lib/SyntheticClipboardEvent.js +5 -12
- package/lib/SyntheticCompositionEvent.js +5 -12
- package/lib/SyntheticDragEvent.js +5 -12
- package/lib/SyntheticEvent.js +9 -17
- package/lib/SyntheticFocusEvent.js +5 -12
- package/lib/SyntheticInputEvent.js +4 -11
- package/lib/SyntheticKeyboardEvent.js +17 -19
- package/lib/SyntheticMouseEvent.js +5 -12
- package/lib/SyntheticTouchEvent.js +5 -12
- package/lib/SyntheticUIEvent.js +5 -12
- package/lib/SyntheticWheelEvent.js +5 -12
- package/lib/Transaction.js +5 -12
- package/lib/ViewportMetrics.js +5 -12
- package/lib/accumulateInto.js +62 -0
- package/lib/adler32.js +6 -13
- package/lib/camelize.js +30 -0
- package/lib/camelizeStyleName.js +40 -0
- package/lib/cloneWithProps.js +9 -15
- package/lib/containsNode.js +5 -12
- package/lib/copyProperties.js +12 -12
- package/lib/createArrayFrom.js +5 -12
- package/lib/createFullPageComponent.js +12 -18
- package/lib/createNodesFromMarkup.js +5 -12
- package/lib/cx.js +5 -12
- package/lib/dangerousStyleValue.js +5 -12
- package/lib/deprecated.js +47 -0
- package/lib/emptyFunction.js +11 -22
- package/lib/emptyObject.js +5 -12
- package/lib/escapeTextForBrowser.js +5 -12
- package/lib/flattenChildren.js +19 -13
- package/lib/focusNode.js +10 -16
- package/lib/forEachAccumulated.js +5 -12
- package/lib/getActiveElement.js +5 -12
- package/lib/getEventCharCode.js +50 -0
- package/lib/getEventKey.js +9 -21
- package/lib/getEventModifierState.js +4 -11
- package/lib/getEventTarget.js +5 -12
- package/lib/getMarkupWrap.js +5 -12
- package/lib/getNodeForCharacterOffset.js +5 -12
- package/lib/getReactRootElementInContainer.js +5 -12
- package/lib/getTextContentAccessor.js +5 -12
- package/lib/getUnboundedScrollPosition.js +5 -12
- package/lib/hyphenate.js +5 -12
- package/lib/hyphenateStyleName.js +8 -15
- package/lib/instantiateReactComponent.js +90 -42
- package/lib/invariant.js +5 -12
- package/lib/isEventSupported.js +5 -12
- package/lib/isNode.js +5 -12
- package/lib/isTextInputElement.js +5 -12
- package/lib/isTextNode.js +5 -12
- package/lib/joinClasses.js +8 -13
- package/lib/keyMirror.js +5 -12
- package/lib/keyOf.js +5 -12
- package/lib/mapObject.js +35 -36
- package/lib/memoizeStringOnly.js +5 -12
- package/lib/merge.js +14 -17
- package/lib/mergeInto.js +13 -35
- package/lib/monitorCodeUse.js +5 -12
- package/lib/onlyChild.js +8 -15
- package/lib/performance.js +5 -12
- package/lib/performanceNow.js +5 -12
- package/lib/setInnerHTML.js +10 -19
- package/lib/shallowEqual.js +6 -13
- package/lib/shouldUpdateReactComponent.js +14 -22
- package/lib/toArray.js +5 -12
- package/lib/traverseAllChildren.js +34 -48
- package/lib/update.js +8 -15
- package/lib/warning.js +6 -13
- package/package.json +3 -8
- package/lib/ReactDescriptor.js +0 -251
- package/lib/accumulate.js +0 -54
- package/lib/mergeHelpers.js +0 -147
- package/lib/mixInto.js +0 -34
package/lib/LinkedStateMixin.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule LinkedStateMixin
|
|
17
10
|
* @typechecks static-only
|
package/lib/LinkedValueUtils.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule LinkedValueUtils
|
|
17
10
|
* @typechecks static-only
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule LocalEventTrapMixin
|
|
17
10
|
*/
|
|
@@ -20,7 +13,7 @@
|
|
|
20
13
|
|
|
21
14
|
var ReactBrowserEventEmitter = require("./ReactBrowserEventEmitter");
|
|
22
15
|
|
|
23
|
-
var
|
|
16
|
+
var accumulateInto = require("./accumulateInto");
|
|
24
17
|
var forEachAccumulated = require("./forEachAccumulated");
|
|
25
18
|
var invariant = require("./invariant");
|
|
26
19
|
|
|
@@ -36,7 +29,8 @@ var LocalEventTrapMixin = {
|
|
|
36
29
|
handlerBaseName,
|
|
37
30
|
this.getDOMNode()
|
|
38
31
|
);
|
|
39
|
-
this._localEventListeners =
|
|
32
|
+
this._localEventListeners =
|
|
33
|
+
accumulateInto(this._localEventListeners, listener);
|
|
40
34
|
},
|
|
41
35
|
|
|
42
36
|
// trapCapturedEvent would look nearly identical. We don't implement that
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule MobileSafariClickEventPlugin
|
|
17
10
|
* @typechecks static-only
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014, 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
|
+
function assign(target, sources) {
|
|
15
|
+
if (target == null) {
|
|
16
|
+
throw new TypeError('Object.assign target cannot be null or undefined');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var to = Object(target);
|
|
20
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
21
|
+
|
|
22
|
+
for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
|
|
23
|
+
var nextSource = arguments[nextIndex];
|
|
24
|
+
if (nextSource == null) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var from = Object(nextSource);
|
|
29
|
+
|
|
30
|
+
// We don't currently support accessors nor proxies. Therefore this
|
|
31
|
+
// copy cannot throw. If we ever supported this then we must handle
|
|
32
|
+
// exceptions and side-effects. We don't support symbols so they won't
|
|
33
|
+
// be transferred.
|
|
34
|
+
|
|
35
|
+
for (var key in from) {
|
|
36
|
+
if (hasOwnProperty.call(from, key)) {
|
|
37
|
+
to[key] = from[key];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return to;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
module.exports = assign;
|
package/lib/PooledClass.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule PooledClass
|
|
17
10
|
*/
|
package/lib/React.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule React
|
|
17
10
|
*/
|
|
@@ -25,11 +18,13 @@ var ReactComponent = require("./ReactComponent");
|
|
|
25
18
|
var ReactCompositeComponent = require("./ReactCompositeComponent");
|
|
26
19
|
var ReactContext = require("./ReactContext");
|
|
27
20
|
var ReactCurrentOwner = require("./ReactCurrentOwner");
|
|
28
|
-
var
|
|
21
|
+
var ReactElement = require("./ReactElement");
|
|
22
|
+
var ReactElementValidator = require("./ReactElementValidator");
|
|
29
23
|
var ReactDOM = require("./ReactDOM");
|
|
30
24
|
var ReactDOMComponent = require("./ReactDOMComponent");
|
|
31
25
|
var ReactDefaultInjection = require("./ReactDefaultInjection");
|
|
32
26
|
var ReactInstanceHandles = require("./ReactInstanceHandles");
|
|
27
|
+
var ReactLegacyElement = require("./ReactLegacyElement");
|
|
33
28
|
var ReactMount = require("./ReactMount");
|
|
34
29
|
var ReactMultiChild = require("./ReactMultiChild");
|
|
35
30
|
var ReactPerf = require("./ReactPerf");
|
|
@@ -37,22 +32,30 @@ var ReactPropTypes = require("./ReactPropTypes");
|
|
|
37
32
|
var ReactServerRendering = require("./ReactServerRendering");
|
|
38
33
|
var ReactTextComponent = require("./ReactTextComponent");
|
|
39
34
|
|
|
35
|
+
var assign = require("./Object.assign");
|
|
36
|
+
var deprecated = require("./deprecated");
|
|
40
37
|
var onlyChild = require("./onlyChild");
|
|
41
|
-
var warning = require("./warning");
|
|
42
38
|
|
|
43
39
|
ReactDefaultInjection.inject();
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
function createDescriptor(type, props, children) {
|
|
48
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
49
|
-
return type.apply(null, args);
|
|
50
|
-
}
|
|
41
|
+
var createElement = ReactElement.createElement;
|
|
42
|
+
var createFactory = ReactElement.createFactory;
|
|
51
43
|
|
|
52
44
|
if ("production" !== process.env.NODE_ENV) {
|
|
53
|
-
|
|
45
|
+
createElement = ReactElementValidator.createElement;
|
|
46
|
+
createFactory = ReactElementValidator.createFactory;
|
|
54
47
|
}
|
|
55
48
|
|
|
49
|
+
// TODO: Drop legacy elements once classes no longer export these factories
|
|
50
|
+
createElement = ReactLegacyElement.wrapCreateElement(
|
|
51
|
+
createElement
|
|
52
|
+
);
|
|
53
|
+
createFactory = ReactLegacyElement.wrapCreateFactory(
|
|
54
|
+
createFactory
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
var render = ReactPerf.measure('React', 'render', ReactMount.render);
|
|
58
|
+
|
|
56
59
|
var React = {
|
|
57
60
|
Children: {
|
|
58
61
|
map: ReactChildren.map,
|
|
@@ -66,33 +69,58 @@ var React = {
|
|
|
66
69
|
EventPluginUtils.useTouchEvents = shouldUseTouch;
|
|
67
70
|
},
|
|
68
71
|
createClass: ReactCompositeComponent.createClass,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
("production" !== process.env.NODE_ENV ? warning(
|
|
72
|
-
_warnedForDeprecation,
|
|
73
|
-
'React.createDescriptor is deprecated and will be removed in the ' +
|
|
74
|
-
'next version of React. Use React.createElement instead.'
|
|
75
|
-
) : null);
|
|
76
|
-
_warnedForDeprecation = true;
|
|
77
|
-
}
|
|
78
|
-
return createDescriptor.apply(this, arguments);
|
|
79
|
-
},
|
|
80
|
-
createElement: createDescriptor,
|
|
72
|
+
createElement: createElement,
|
|
73
|
+
createFactory: createFactory,
|
|
81
74
|
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
|
|
82
75
|
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
|
|
83
|
-
|
|
76
|
+
render: render,
|
|
77
|
+
renderToString: ReactServerRendering.renderToString,
|
|
78
|
+
renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
|
|
79
|
+
unmountComponentAtNode: ReactMount.unmountComponentAtNode,
|
|
80
|
+
isValidClass: ReactLegacyElement.isValidClass,
|
|
81
|
+
isValidElement: ReactElement.isValidElement,
|
|
82
|
+
withContext: ReactContext.withContext,
|
|
83
|
+
|
|
84
|
+
// Hook for JSX spread, don't use this for anything else.
|
|
85
|
+
__spread: assign,
|
|
86
|
+
|
|
87
|
+
// Deprecations (remove for 0.13)
|
|
88
|
+
renderComponent: deprecated(
|
|
84
89
|
'React',
|
|
85
90
|
'renderComponent',
|
|
86
|
-
|
|
91
|
+
'render',
|
|
92
|
+
this,
|
|
93
|
+
render
|
|
87
94
|
),
|
|
88
|
-
renderComponentToString:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
renderComponentToString: deprecated(
|
|
96
|
+
'React',
|
|
97
|
+
'renderComponentToString',
|
|
98
|
+
'renderToString',
|
|
99
|
+
this,
|
|
100
|
+
ReactServerRendering.renderToString
|
|
101
|
+
),
|
|
102
|
+
renderComponentToStaticMarkup: deprecated(
|
|
103
|
+
'React',
|
|
104
|
+
'renderComponentToStaticMarkup',
|
|
105
|
+
'renderToStaticMarkup',
|
|
106
|
+
this,
|
|
107
|
+
ReactServerRendering.renderToStaticMarkup
|
|
108
|
+
),
|
|
109
|
+
isValidComponent: deprecated(
|
|
110
|
+
'React',
|
|
111
|
+
'isValidComponent',
|
|
112
|
+
'isValidElement',
|
|
113
|
+
this,
|
|
114
|
+
ReactElement.isValidElement
|
|
115
|
+
)
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// Inject the runtime into a devtools global hook regardless of browser.
|
|
119
|
+
// Allows for debugging when the hook is injected on the page.
|
|
120
|
+
if (
|
|
121
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
122
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
|
|
123
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
|
|
96
124
|
Component: ReactComponent,
|
|
97
125
|
CurrentOwner: ReactCurrentOwner,
|
|
98
126
|
DOMComponent: ReactDOMComponent,
|
|
@@ -101,18 +129,23 @@ var React = {
|
|
|
101
129
|
Mount: ReactMount,
|
|
102
130
|
MultiChild: ReactMultiChild,
|
|
103
131
|
TextComponent: ReactTextComponent
|
|
104
|
-
}
|
|
105
|
-
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
106
134
|
|
|
107
135
|
if ("production" !== process.env.NODE_ENV) {
|
|
108
136
|
var ExecutionEnvironment = require("./ExecutionEnvironment");
|
|
109
|
-
if (ExecutionEnvironment.canUseDOM &&
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
'
|
|
115
|
-
|
|
137
|
+
if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
|
|
138
|
+
|
|
139
|
+
// If we're in Chrome, look for the devtools marker and provide a download
|
|
140
|
+
// link if not installed.
|
|
141
|
+
if (navigator.userAgent.indexOf('Chrome') > -1) {
|
|
142
|
+
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
|
|
143
|
+
console.debug(
|
|
144
|
+
'Download the React DevTools for a better development experience: ' +
|
|
145
|
+
'http://fb.me/react-devtools'
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
116
149
|
|
|
117
150
|
var expectedFeatures = [
|
|
118
151
|
// shims
|
|
@@ -132,7 +165,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
132
165
|
Object.freeze
|
|
133
166
|
];
|
|
134
167
|
|
|
135
|
-
for (var i
|
|
168
|
+
for (var i = 0; i < expectedFeatures.length; i++) {
|
|
136
169
|
if (!expectedFeatures[i]) {
|
|
137
170
|
console.error(
|
|
138
171
|
'One or more ES5 shim/shams expected by React are not available: ' +
|
|
@@ -146,6 +179,6 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
146
179
|
|
|
147
180
|
// Version exists only in the open-source version of React, not in Facebook's
|
|
148
181
|
// internal version.
|
|
149
|
-
React.version = '0.
|
|
182
|
+
React.version = '0.12.2';
|
|
150
183
|
|
|
151
184
|
module.exports = React;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule ReactBrowserComponentMixin
|
|
17
10
|
*/
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule ReactBrowserEventEmitter
|
|
17
10
|
* @typechecks static-only
|
|
@@ -25,8 +18,8 @@ var EventPluginRegistry = require("./EventPluginRegistry");
|
|
|
25
18
|
var ReactEventEmitterMixin = require("./ReactEventEmitterMixin");
|
|
26
19
|
var ViewportMetrics = require("./ViewportMetrics");
|
|
27
20
|
|
|
21
|
+
var assign = require("./Object.assign");
|
|
28
22
|
var isEventSupported = require("./isEventSupported");
|
|
29
|
-
var merge = require("./merge");
|
|
30
23
|
|
|
31
24
|
/**
|
|
32
25
|
* Summary of `ReactBrowserEventEmitter` event handling:
|
|
@@ -155,7 +148,7 @@ function getListeningForDocument(mountAt) {
|
|
|
155
148
|
*
|
|
156
149
|
* @internal
|
|
157
150
|
*/
|
|
158
|
-
var ReactBrowserEventEmitter =
|
|
151
|
+
var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
|
|
159
152
|
|
|
160
153
|
/**
|
|
161
154
|
* Injectable event backend
|