react 0.12.2 → 0.13.0-beta.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 +986 -511
- package/dist/react-with-addons.js +6076 -4560
- package/dist/react-with-addons.min.js +6 -7
- package/dist/react.js +5386 -4170
- package/dist/react.min.js +6 -7
- package/lib/AutoFocusMixin.js +2 -2
- package/lib/BeforeInputEventPlugin.js +388 -115
- package/lib/CSSCore.js +1 -1
- package/lib/CSSProperty.js +2 -2
- package/lib/CSSPropertyOperations.js +58 -11
- package/lib/CallbackQueue.js +3 -3
- package/lib/ChangeEventPlugin.js +4 -4
- package/lib/ClientReactRootIndex.js +2 -2
- package/lib/DOMChildrenOperations.js +10 -47
- package/lib/DOMProperty.js +2 -2
- package/lib/DOMPropertyOperations.js +11 -16
- package/lib/Danger.js +8 -7
- package/lib/DefaultEventPluginOrder.js +3 -4
- package/lib/EnterLeaveEventPlugin.js +2 -2
- package/lib/EventConstants.js +2 -2
- package/lib/EventListener.js +1 -1
- package/lib/EventPluginHub.js +10 -8
- package/lib/EventPluginRegistry.js +2 -2
- package/lib/EventPluginUtils.js +4 -4
- package/lib/EventPropagators.js +2 -2
- package/lib/ExecutionEnvironment.js +3 -4
- package/lib/FallbackCompositionState.js +89 -0
- package/lib/HTMLDOMPropertyConfig.js +23 -10
- package/lib/LinkedStateMixin.js +2 -2
- package/lib/LinkedValueUtils.js +4 -4
- package/lib/LocalEventTrapMixin.js +10 -3
- package/lib/MobileSafariClickEventPlugin.js +2 -2
- package/lib/Object.assign.js +4 -2
- package/lib/PooledClass.js +2 -2
- package/lib/React.js +19 -58
- package/lib/ReactBrowserComponentMixin.js +4 -14
- package/lib/ReactBrowserEventEmitter.js +6 -8
- package/lib/ReactCSSTransitionGroup.js +5 -2
- package/lib/ReactCSSTransitionGroupChild.js +20 -7
- package/lib/ReactChildReconciler.js +125 -0
- package/lib/ReactChildren.js +13 -10
- package/lib/ReactClass.js +918 -0
- package/lib/ReactComponent.js +98 -406
- package/lib/ReactComponentBrowserEnvironment.js +11 -84
- package/lib/ReactComponentEnvironment.js +57 -0
- package/lib/ReactComponentWithPureRenderMixin.js +2 -2
- package/lib/ReactCompositeComponent.js +574 -1140
- package/lib/ReactContext.js +17 -3
- package/lib/ReactCurrentOwner.js +2 -2
- package/lib/ReactDOM.js +4 -9
- package/lib/ReactDOMButton.js +6 -7
- package/lib/ReactDOMComponent.js +123 -105
- package/lib/ReactDOMForm.js +6 -7
- package/lib/ReactDOMIDOperations.js +59 -77
- package/lib/ReactDOMIframe.js +43 -0
- package/lib/ReactDOMImg.js +5 -7
- package/lib/ReactDOMInput.js +6 -7
- package/lib/ReactDOMOption.js +6 -7
- package/lib/ReactDOMSelect.js +58 -66
- package/lib/ReactDOMSelection.js +7 -3
- package/lib/{ReactTextComponent.js → ReactDOMTextComponent.js} +48 -37
- package/lib/ReactDOMTextarea.js +6 -7
- package/lib/ReactDefaultBatchingStrategy.js +5 -5
- package/lib/ReactDefaultInjection.js +39 -9
- package/lib/ReactDefaultPerf.js +17 -8
- package/lib/ReactDefaultPerfAnalysis.js +2 -2
- package/lib/ReactElement.js +23 -15
- package/lib/ReactElementValidator.js +206 -89
- package/lib/ReactEmptyComponent.js +33 -15
- package/lib/ReactErrorUtils.js +1 -1
- package/lib/ReactEventEmitterMixin.js +2 -2
- package/lib/ReactEventListener.js +4 -5
- package/lib/ReactFragment.js +172 -0
- package/lib/ReactInjection.js +8 -6
- package/lib/ReactInputSelection.js +4 -5
- package/lib/ReactInstanceHandles.js +4 -3
- package/lib/ReactInstanceMap.js +47 -0
- package/lib/ReactLifeCycle.js +35 -0
- package/lib/ReactLink.js +2 -2
- package/lib/ReactMarkupChecksum.js +2 -2
- package/lib/ReactMount.js +264 -71
- package/lib/ReactMultiChild.js +50 -48
- package/lib/ReactMultiChildUpdateTypes.js +2 -2
- package/lib/ReactNativeComponent.js +59 -25
- package/lib/ReactOwner.js +5 -49
- package/lib/ReactPerf.js +22 -2
- package/lib/ReactPropTransferer.js +3 -58
- package/lib/ReactPropTypeLocationNames.js +2 -2
- package/lib/ReactPropTypeLocations.js +2 -2
- package/lib/ReactPropTypes.js +17 -25
- package/lib/ReactPutListenerQueue.js +2 -2
- package/lib/ReactReconcileTransaction.js +2 -2
- package/lib/ReactReconciler.js +121 -0
- package/lib/ReactRef.js +69 -0
- package/lib/ReactRootIndex.js +2 -2
- package/lib/ReactServerRendering.js +6 -4
- package/lib/ReactServerRenderingTransaction.js +2 -2
- package/lib/ReactStateSetters.js +2 -2
- package/lib/ReactTestUtils.js +113 -27
- package/lib/ReactTransitionChildMapping.js +8 -4
- package/lib/ReactTransitionEvents.js +2 -2
- package/lib/ReactTransitionGroup.js +53 -12
- package/lib/ReactUpdateQueue.js +295 -0
- package/lib/ReactUpdates.js +54 -62
- package/lib/ReactWithAddons.js +4 -2
- package/lib/SVGDOMPropertyConfig.js +2 -2
- package/lib/SelectEventPlugin.js +4 -4
- package/lib/ServerReactRootIndex.js +2 -2
- package/lib/SimpleEventPlugin.js +4 -4
- package/lib/SyntheticClipboardEvent.js +2 -3
- package/lib/SyntheticCompositionEvent.js +2 -3
- package/lib/SyntheticDragEvent.js +2 -2
- package/lib/SyntheticEvent.js +12 -4
- package/lib/SyntheticFocusEvent.js +2 -2
- package/lib/SyntheticInputEvent.js +2 -3
- package/lib/SyntheticKeyboardEvent.js +2 -2
- package/lib/SyntheticMouseEvent.js +3 -5
- package/lib/SyntheticTouchEvent.js +2 -2
- package/lib/SyntheticUIEvent.js +2 -2
- package/lib/SyntheticWheelEvent.js +2 -2
- package/lib/Transaction.js +4 -4
- package/lib/ViewportMetrics.js +3 -6
- package/lib/accumulateInto.js +2 -2
- package/lib/adler32.js +2 -2
- package/lib/camelize.js +1 -1
- package/lib/camelizeStyleName.js +1 -1
- package/lib/cloneWithProps.js +4 -4
- package/lib/containsNode.js +1 -1
- package/lib/{createArrayFrom.js → createArrayFromMixed.js} +6 -6
- package/lib/createFullPageComponent.js +4 -4
- package/lib/createNodesFromMarkup.js +4 -4
- package/lib/cx.js +1 -1
- package/lib/dangerousStyleValue.js +2 -2
- package/lib/emptyFunction.js +1 -1
- package/lib/emptyObject.js +1 -1
- package/lib/{escapeTextForBrowser.js → escapeTextContentForBrowser.js} +10 -11
- package/lib/findDOMNode.js +51 -0
- package/lib/flattenChildren.js +12 -23
- package/lib/focusNode.js +1 -1
- package/lib/forEachAccumulated.js +2 -2
- package/lib/getActiveElement.js +1 -1
- package/lib/getEventCharCode.js +2 -2
- package/lib/getEventKey.js +2 -2
- package/lib/getEventModifierState.js +2 -2
- package/lib/getEventTarget.js +2 -2
- package/lib/getIteratorFn.js +42 -0
- package/lib/getMarkupWrap.js +1 -1
- package/lib/getNodeForCharacterOffset.js +3 -3
- package/lib/getReactRootElementInContainer.js +2 -2
- package/lib/getTextContentAccessor.js +2 -2
- package/lib/getUnboundedScrollPosition.js +1 -1
- package/lib/hyphenate.js +1 -1
- package/lib/hyphenateStyleName.js +1 -1
- package/lib/instantiateReactComponent.js +90 -68
- package/lib/invariant.js +1 -1
- package/lib/isEventSupported.js +2 -2
- package/lib/isNode.js +4 -5
- package/lib/isTextInputElement.js +3 -4
- package/lib/isTextNode.js +1 -1
- package/lib/joinClasses.js +2 -2
- package/lib/keyMirror.js +2 -2
- package/lib/keyOf.js +1 -1
- package/lib/mapObject.js +1 -1
- package/lib/memoizeStringOnly.js +5 -6
- package/lib/onlyChild.js +2 -2
- package/lib/performance.js +1 -1
- package/lib/performanceNow.js +1 -1
- package/lib/quoteAttributeValueForBrowser.js +26 -0
- package/lib/setInnerHTML.js +13 -2
- package/lib/setTextContent.js +40 -0
- package/lib/shallowEqual.js +2 -2
- package/lib/shouldUpdateReactComponent.js +71 -7
- package/lib/toArray.js +2 -2
- package/lib/traverseAllChildren.js +114 -56
- package/lib/update.js +2 -2
- package/lib/warning.js +20 -2
- package/package.json +1 -1
- package/lib/CompositionEventPlugin.js +0 -257
- package/lib/ReactLegacyElement.js +0 -243
- package/lib/copyProperties.js +0 -54
- package/lib/deprecated.js +0 -47
- package/lib/merge.js +0 -34
- package/lib/mergeInto.js +0 -24
- package/lib/monitorCodeUse.js +0 -30
package/lib/copyProperties.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-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 copyProperties
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Copy properties from one or more objects (up to 5) into the first object.
|
|
14
|
-
* This is a shallow copy. It mutates the first object and also returns it.
|
|
15
|
-
*
|
|
16
|
-
* NOTE: `arguments` has a very significant performance penalty, which is why
|
|
17
|
-
* we don't support unlimited arguments.
|
|
18
|
-
*/
|
|
19
|
-
function copyProperties(obj, a, b, c, d, e, f) {
|
|
20
|
-
obj = obj || {};
|
|
21
|
-
|
|
22
|
-
if ("production" !== process.env.NODE_ENV) {
|
|
23
|
-
if (f) {
|
|
24
|
-
throw new Error('Too many arguments passed to copyProperties');
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var args = [a, b, c, d, e];
|
|
29
|
-
var ii = 0, v;
|
|
30
|
-
while (args[ii]) {
|
|
31
|
-
v = args[ii++];
|
|
32
|
-
for (var k in v) {
|
|
33
|
-
obj[k] = v[k];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// IE ignores toString in object iteration.. See:
|
|
37
|
-
// webreflection.blogspot.com/2007/07/quick-fix-internet-explorer-and.html
|
|
38
|
-
if (v.hasOwnProperty && v.hasOwnProperty('toString') &&
|
|
39
|
-
(typeof v.toString != 'undefined') && (obj.toString !== v.toString)) {
|
|
40
|
-
obj.toString = v.toString;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return obj;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = copyProperties;
|
|
48
|
-
|
|
49
|
-
// deprecation notice
|
|
50
|
-
console.warn(
|
|
51
|
-
'react/lib/copyProperties has been deprecated and will be removed in the ' +
|
|
52
|
-
'next version of React. All uses can be replaced with ' +
|
|
53
|
-
'Object.assign(obj, a, b, ...) or _.extend(obj, a, b, ...).'
|
|
54
|
-
);
|
package/lib/deprecated.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-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 deprecated
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
var assign = require("./Object.assign");
|
|
13
|
-
var warning = require("./warning");
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* This will log a single deprecation notice per function and forward the call
|
|
17
|
-
* on to the new API.
|
|
18
|
-
*
|
|
19
|
-
* @param {string} namespace The namespace of the call, eg 'React'
|
|
20
|
-
* @param {string} oldName The old function name, eg 'renderComponent'
|
|
21
|
-
* @param {string} newName The new function name, eg 'render'
|
|
22
|
-
* @param {*} ctx The context this forwarded call should run in
|
|
23
|
-
* @param {function} fn The function to forward on to
|
|
24
|
-
* @return {*} Will be the value as returned from `fn`
|
|
25
|
-
*/
|
|
26
|
-
function deprecated(namespace, oldName, newName, ctx, fn) {
|
|
27
|
-
var warned = false;
|
|
28
|
-
if ("production" !== process.env.NODE_ENV) {
|
|
29
|
-
var newFn = function() {
|
|
30
|
-
("production" !== process.env.NODE_ENV ? warning(
|
|
31
|
-
warned,
|
|
32
|
-
(namespace + "." + oldName + " will be deprecated in a future version. ") +
|
|
33
|
-
("Use " + namespace + "." + newName + " instead.")
|
|
34
|
-
) : null);
|
|
35
|
-
warned = true;
|
|
36
|
-
return fn.apply(ctx, arguments);
|
|
37
|
-
};
|
|
38
|
-
newFn.displayName = (namespace + "_" + oldName);
|
|
39
|
-
// We need to make sure all properties of the original fn are copied over.
|
|
40
|
-
// In particular, this is needed to support PropTypes
|
|
41
|
-
return assign(newFn, fn);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return fn;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = deprecated;
|
package/lib/merge.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-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 merge
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
"use strict";
|
|
13
|
-
|
|
14
|
-
var assign = require("./Object.assign");
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Shallow merges two structures into a return value, without mutating either.
|
|
18
|
-
*
|
|
19
|
-
* @param {?object} one Optional object with properties to merge from.
|
|
20
|
-
* @param {?object} two Optional object with properties to merge from.
|
|
21
|
-
* @return {object} The shallow extension of one by two.
|
|
22
|
-
*/
|
|
23
|
-
var merge = function(one, two) {
|
|
24
|
-
return assign({}, one, two);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
module.exports = merge;
|
|
28
|
-
|
|
29
|
-
// deprecation notice
|
|
30
|
-
console.warn(
|
|
31
|
-
'react/lib/merge has been deprecated and will be removed in the ' +
|
|
32
|
-
'next version of React. All uses can be replaced with ' +
|
|
33
|
-
'Object.assign({}, a, b) or _.extend({}, a, b).'
|
|
34
|
-
);
|
package/lib/mergeInto.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-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 mergeInto
|
|
10
|
-
* @typechecks static-only
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
"use strict";
|
|
14
|
-
|
|
15
|
-
var assign = require("./Object.assign");
|
|
16
|
-
|
|
17
|
-
module.exports = assign;
|
|
18
|
-
|
|
19
|
-
// deprecation notice
|
|
20
|
-
console.warn(
|
|
21
|
-
'react/lib/mergeInto has been deprecated and will be removed in the ' +
|
|
22
|
-
'next version of React. All uses can be replaced with ' +
|
|
23
|
-
'Object.assign(a, b, c, ...) or _.extend(a, b, c, ...).'
|
|
24
|
-
);
|
package/lib/monitorCodeUse.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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 monitorCodeUse
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
"use strict";
|
|
13
|
-
|
|
14
|
-
var invariant = require("./invariant");
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Provides open-source compatible instrumentation for monitoring certain API
|
|
18
|
-
* uses before we're ready to issue a warning or refactor. It accepts an event
|
|
19
|
-
* name which may only contain the characters [a-z0-9_] and an optional data
|
|
20
|
-
* object with further information.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
function monitorCodeUse(eventName, data) {
|
|
24
|
-
("production" !== process.env.NODE_ENV ? invariant(
|
|
25
|
-
eventName && !/[^a-z0-9_]/.test(eventName),
|
|
26
|
-
'You must provide an eventName using only the characters [a-z0-9_]'
|
|
27
|
-
) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
module.exports = monitorCodeUse;
|