Socket
Socket
Sign inDemoInstall

react

Package Overview
Dependencies
33
Maintainers
2
Versions
1758
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.13.0-beta.1 to 0.13.0-beta.2

lib/createArrayFromMixed.js

2

lib/accumulateInto.js
/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013 Facebook, Inc.
* Copyright 2013-2015 Facebook, Inc.
* All rights reserved.

@@ -133,5 +133,2 @@ *

// Track characters inserted via keypress and composition events.
var fallbackBeforeInputChars = null;
// Track whether we've ever handled a keypress on the space key.

@@ -440,3 +437,2 @@ var hasSpaceKeypress = false;

event.data = chars;
fallbackBeforeInputChars = null;
EventPropagators.accumulateTwoPhaseDispatches(event);

@@ -443,0 +439,0 @@ return event;

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -17,3 +17,3 @@ *

var createArrayFrom = require("./createArrayFrom");
var createArrayFromMixed = require("./createArrayFromMixed");
var getMarkupWrap = require("./getMarkupWrap");

@@ -77,6 +77,6 @@ var invariant = require("./invariant");

) : invariant(handleScript));
createArrayFrom(scripts).forEach(handleScript);
createArrayFromMixed(scripts).forEach(handleScript);
}
var nodes = createArrayFrom(node.childNodes);
var nodes = createArrayFromMixed(node.childNodes);
while (node.lastChild) {

@@ -83,0 +83,0 @@ node.removeChild(node.lastChild);

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -14,3 +14,3 @@ *

var keyOf = require("./keyOf");
var keyOf = require("./keyOf");

@@ -17,0 +17,0 @@ /**

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -18,14 +18,6 @@ *

var getTextContentAccessor = require("./getTextContentAccessor");
var setTextContent = require("./setTextContent");
var invariant = require("./invariant");
/**
* The DOM property to use when setting text content.
*
* @type {string}
* @private
*/
var textContentAccessor = getTextContentAccessor();
/**
* Inserts `childNode` as a child of `parentNode` at the `index`.

@@ -49,33 +41,2 @@ *

var updateTextContent;
if (textContentAccessor === 'textContent') {
/**
* Sets the text content of `node` to `text`.
*
* @param {DOMElement} node Node to change
* @param {string} text New text content
*/
updateTextContent = function(node, text) {
node.textContent = text;
};
} else {
/**
* Sets the text content of `node` to `text`.
*
* @param {DOMElement} node Node to change
* @param {string} text New text content
*/
updateTextContent = function(node, text) {
// In order to preserve newlines correctly, we can't use .innerText to set
// the contents (see #1080), so we empty the element then append a text node
while (node.firstChild) {
node.removeChild(node.firstChild);
}
if (text) {
var doc = node.ownerDocument || document;
node.appendChild(doc.createTextNode(text));
}
};
}
/**

@@ -88,3 +49,3 @@ * Operations for updating with DOM children.

updateTextContent: updateTextContent,
updateTextContent: setTextContent,

@@ -162,3 +123,3 @@ /**

case ReactMultiChildUpdateTypes.TEXT_CONTENT:
updateTextContent(
setTextContent(
update.parentNode,

@@ -165,0 +126,0 @@ update.textContent

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -17,4 +17,3 @@ *

var escapeTextForBrowser = require("./escapeTextForBrowser");
var memoizeStringOnly = require("./memoizeStringOnly");
var quoteAttributeValueForBrowser = require("./quoteAttributeValueForBrowser");
var warning = require("./warning");

@@ -30,6 +29,2 @@

var processAttributeNameAndPrefix = memoizeStringOnly(function(name) {
return escapeTextForBrowser(name) + '="';
});
if ("production" !== process.env.NODE_ENV) {

@@ -86,4 +81,4 @@ var reactProps = {

createMarkupForID: function(id) {
return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) +
escapeTextForBrowser(id) + '"';
return DOMProperty.ID_ATTRIBUTE_NAME + '=' +
quoteAttributeValueForBrowser(id);
},

@@ -107,6 +102,5 @@

(DOMProperty.hasOverloadedBooleanValue[name] && value === true)) {
return escapeTextForBrowser(attributeName);
return attributeName;
}
return processAttributeNameAndPrefix(attributeName) +
escapeTextForBrowser(value) + '"';
return attributeName + '=' + quoteAttributeValueForBrowser(value);
} else if (DOMProperty.isCustomAttribute(name)) {

@@ -116,4 +110,3 @@ if (value == null) {

}
return processAttributeNameAndPrefix(name) +
escapeTextForBrowser(value) + '"';
return name + '=' + quoteAttributeValueForBrowser(value);
} else if ("production" !== process.env.NODE_ENV) {

@@ -120,0 +113,0 @@ warnUnknownProperty(name);

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014 Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
*

@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License");

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -118,4 +118,4 @@ *

*/
function executeDispatchesInOrder(event, executeDispatch) {
forEachEventDispatch(event, executeDispatch);
function executeDispatchesInOrder(event, cb) {
forEachEventDispatch(event, cb);
event._dispatchListeners = null;

@@ -122,0 +122,0 @@ event._dispatchIDs = null;

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013 Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013 Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -123,3 +123,3 @@ *

noValidate: HAS_BOOLEAN_VALUE,
open: null,
open: HAS_BOOLEAN_VALUE,
pattern: null,

@@ -168,7 +168,12 @@ placeholder: null,

autoCorrect: null,
// itemProp, itemScope, itemType are for Microdata support. See
// http://schema.org/docs/gs.html
// itemProp, itemScope, itemType are for
// Microdata support. See http://schema.org/docs/gs.html
itemProp: MUST_USE_ATTRIBUTE,
itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
itemType: MUST_USE_ATTRIBUTE,
// itemID and itemRef are for Microdata support as well but
// only specified in the the WHATWG spec document. See
// https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
itemID: MUST_USE_ATTRIBUTE,
itemRef: MUST_USE_ATTRIBUTE,
// property is supported for OpenGraph in meta tags.

@@ -189,3 +194,5 @@ property: null

autoPlay: 'autoplay',
encType: 'enctype',
// `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
// http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
encType: 'encoding',
hrefLang: 'hreflang',

@@ -192,0 +199,0 @@ radioGroup: 'radiogroup',

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -117,2 +117,6 @@ *

if ("production" !== process.env.NODE_ENV) {
instance._isOwnerNecessary = false;
}
// Internal instances should fully constructed at this point, so they should

@@ -119,0 +123,0 @@ // not get any new fields added to them at this point.

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -16,3 +16,2 @@ *

var DOMPropertyOperations = require("./DOMPropertyOperations");
var EventPluginUtils = require("./EventPluginUtils");

@@ -27,3 +26,2 @@ var ReactChildren = require("./ReactChildren");

var ReactDOM = require("./ReactDOM");
var ReactDOMComponent = require("./ReactDOMComponent");
var ReactDOMTextComponent = require("./ReactDOMTextComponent");

@@ -33,5 +31,5 @@ var ReactDefaultInjection = require("./ReactDefaultInjection");

var ReactMount = require("./ReactMount");
var ReactMultiChild = require("./ReactMultiChild");
var ReactPerf = require("./ReactPerf");
var ReactPropTypes = require("./ReactPropTypes");
var ReactReconciler = require("./ReactReconciler");
var ReactServerRendering = require("./ReactServerRendering");

@@ -95,9 +93,6 @@

__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
// TODO: Inject a hook for notifying devtools of updates
CurrentOwner: ReactCurrentOwner,
DOMComponent: ReactDOMComponent,
DOMPropertyOperations: DOMPropertyOperations,
InstanceHandles: ReactInstanceHandles,
Mount: ReactMount,
MultiChild: ReactMultiChild,
Reconciler: ReactReconciler,
TextComponent: ReactDOMTextComponent

@@ -152,4 +147,4 @@ });

React.version = '0.13.0-beta.1';
React.version = '0.13.0-beta.2';
module.exports = React;
/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -329,3 +329,3 @@ *

*/
ensureScrollValueMonitoring: function(){
ensureScrollValueMonitoring: function() {
if (!isMonitoringScrollValue) {

@@ -332,0 +332,0 @@ var refresh = ViewportMetrics.refreshScrollValues;

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -15,2 +15,3 @@ *

var PooledClass = require("./PooledClass");
var ReactFragment = require("./ReactFragment");

@@ -125,3 +126,3 @@ var traverseAllChildren = require("./traverseAllChildren");

MapBookKeeping.release(traverseContext);
return mapResult;
return ReactFragment.create(mapResult);
}

@@ -128,0 +129,0 @@

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -27,3 +27,2 @@ *

var keyOf = require("./keyOf");
var monitorCodeUse = require("./monitorCodeUse");
var warning = require("./warning");

@@ -665,14 +664,16 @@

if (newThis !== component && newThis !== null) {
monitorCodeUse('react_bind_warning', { component: componentName });
console.warn(
("production" !== process.env.NODE_ENV ? warning(
false,
'bind(): React component methods may only be bound to the ' +
'component instance. See ' + componentName
);
'component instance. See %s',
componentName
) : null);
} else if (!args.length) {
monitorCodeUse('react_bind_warning', { component: componentName });
console.warn(
("production" !== process.env.NODE_ENV ? warning(
false,
'bind(): You are binding a component method to the component. ' +
'React does this for you automatically in a high-performance ' +
'way, so you can safely remove this call. See ' + componentName
);
'way, so you can safely remove this call. See ',
componentName
) : null);
return boundMethod;

@@ -721,2 +722,5 @@ }

) : null);
Object.defineProperty(this, 'type', {
value: this
});
return this;

@@ -879,14 +883,10 @@ }

if ("production" !== process.env.NODE_ENV) {
if (Constructor.prototype.componentShouldUpdate) {
monitorCodeUse(
'react_component_should_update_warning',
{ component: spec.displayName }
);
console.warn(
(spec.displayName || 'A component') + ' has a method called ' +
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
'The name is phrased as a question because the function is ' +
'expected to return a value.'
);
}
("production" !== process.env.NODE_ENV ? warning(
!Constructor.prototype.componentShouldUpdate,
'%s has a method called ' +
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
'The name is phrased as a question because the function is ' +
'expected to return a value.',
spec.displayName || 'A component'
) : null);
}

@@ -904,4 +904,6 @@

if ("production" !== process.env.NODE_ENV) {
if (Object.defineProperty) {
try {
Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor);
} catch (x) {
// IE will fail on defineProperty (es5-shim/sham too)
}

@@ -908,0 +910,0 @@ }

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -39,3 +39,11 @@ *

*
* @param {object} partialState Next partial state to be merged with state.
* When a function is provided to setState, it will be called at some point in
* the future (not synchronously). It will be called with the up to date
* component arguments (state, props, context). These values can be different
* from this.* because your function may be called after receiveProps but before
* shouldComponentUpdate, and this new state, props, and context will not yet be
* assigned to this.
*
* @param {object|function} partialState Next partial state or function to
* produce next partial state to be merged with current state.
* @param {?function} callback Called after state is updated.

@@ -47,5 +55,10 @@ * @final

("production" !== process.env.NODE_ENV ? invariant(
typeof partialState === 'object' || partialState == null,
'setState(...): takes an object of state variables to update.'
) : invariant(typeof partialState === 'object' || partialState == null));
typeof partialState === 'object' ||
typeof partialState === 'function' ||
partialState == null,
'setState(...): takes an object of state variables to update or a ' +
'function which returns an object of state variables.'
) : invariant(typeof partialState === 'object' ||
typeof partialState === 'function' ||
partialState == null));
if ("production" !== process.env.NODE_ENV) {

@@ -91,10 +104,10 @@ ("production" !== process.env.NODE_ENV ? warning(

if ("production" !== process.env.NODE_ENV) {
if (Object.defineProperty) {
var deprecatedAPIs = {
getDOMNode: 'getDOMNode',
isMounted: 'isMounted',
replaceState: 'replaceState',
setProps: 'setProps'
};
var defineDeprecationWarning = function(methodName, displayName) {
var deprecatedAPIs = {
getDOMNode: 'getDOMNode',
isMounted: 'isMounted',
replaceState: 'replaceState',
setProps: 'setProps'
};
var defineDeprecationWarning = function(methodName, displayName) {
try {
Object.defineProperty(ReactComponent.prototype, methodName, {

@@ -110,8 +123,10 @@ get: function() {

});
};
for (var methodName in deprecatedAPIs) {
if (deprecatedAPIs.hasOwnProperty(methodName)) {
defineDeprecationWarning(methodName, deprecatedAPIs[methodName]);
}
} catch (x) {
// IE will fail on defineProperty (es5-shim/sham too)
}
};
for (var fnName in deprecatedAPIs) {
if (deprecatedAPIs.hasOwnProperty(fnName)) {
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
}
}

@@ -118,0 +133,0 @@ }

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -99,3 +99,4 @@ *

this._pendingElement = null;
this._pendingState = null;
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;

@@ -195,22 +196,25 @@

this._pendingState = null;
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;
if (inst.componentWillMount) {
var previouslyMounting = ReactLifeCycle.currentlyMountingInstance;
ReactLifeCycle.currentlyMountingInstance = this;
try {
var renderedElement;
var previouslyMounting = ReactLifeCycle.currentlyMountingInstance;
ReactLifeCycle.currentlyMountingInstance = this;
try {
if (inst.componentWillMount) {
inst.componentWillMount();
} finally {
ReactLifeCycle.currentlyMountingInstance = previouslyMounting;
// When mounting, calls to `setState` by `componentWillMount` will set
// `this._pendingStateQueue` without triggering a re-render.
if (this._pendingStateQueue) {
inst.state = this._processPendingState(inst.props, inst.context);
}
}
// When mounting, calls to `setState` by `componentWillMount` will set
// `this._pendingState` without triggering a re-render.
if (this._pendingState) {
inst.state = this._pendingState;
this._pendingState = null;
}
renderedElement = this._renderValidatedComponent();
} finally {
ReactLifeCycle.currentlyMountingInstance = previouslyMounting;
}
var renderedElement = this._renderValidatedComponent();
this._renderedComponent = this._instantiateReactComponent(

@@ -257,3 +261,4 @@ renderedElement,

// Reset pending fields
this._pendingState = null;
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;

@@ -263,4 +268,2 @@ this._pendingCallbacks = null;

ReactComponentEnvironment.unmountIDFromEnvironment(this._rootNodeID);
// These fields do not really need to be reset since this object is no

@@ -451,6 +454,13 @@ // longer accessible.

// Preface gives us something to blacklist in warning module
var preface = 'Failed CompositeComponent proptype check. ';
("production" !== process.env.NODE_ENV ? warning(false, preface + error.message + addendum) : null);
("production" !== process.env.NODE_ENV ? warning(
false,
'Failed Composite propType: %s',
error.message + addendum
) : null);
} else {
("production" !== process.env.NODE_ENV ? warning(false, error.message + addendum) : null);
("production" !== process.env.NODE_ENV ? warning(
false,
'Failed Context Types: %s',
error.message + addendum
) : null);
}

@@ -478,3 +488,3 @@ }

/**
* If any of `_pendingElement`, `_pendingState`, or `_pendingForceUpdate`
* If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
* is set, update the component.

@@ -495,3 +505,3 @@ *

if (this._pendingState != null || this._pendingForceUpdate) {
if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
if ("production" !== process.env.NODE_ENV) {

@@ -561,6 +571,4 @@ ReactElementValidator.checkAndWarnForMutatedProps(

var prevContext = inst.context;
var prevProps = inst.props;
var nextContext = prevContext;
var nextProps = prevProps;
var nextContext = inst.context;
var nextProps = inst.props;

@@ -574,3 +582,6 @@ // Distinguish between a props update versus a simple state update

if (nextUnmaskedContext != null) {
this._warnIfContextsDiffer(nextParentElement._context, nextUnmaskedContext);
this._warnIfContextsDiffer(
nextParentElement._context,
nextUnmaskedContext
);
}

@@ -580,3 +591,3 @@ }

// An update here will schedule an update but immediately set
// _pendingState which will ensure that any state updates gets
// _pendingStateQueue which will ensure that any state updates gets
// immediately reconciled instead of waiting for the next batch.

@@ -589,4 +600,3 @@

var nextState = this._pendingState || inst.state;
this._pendingState = null;
var nextState = this._processPendingState(nextProps, nextContext);

@@ -599,9 +609,8 @@ var shouldUpdate =

if ("production" !== process.env.NODE_ENV) {
if (typeof shouldUpdate === 'undefined') {
console.warn(
(this.getName() || 'ReactCompositeComponent') +
'.shouldComponentUpdate(): Returned undefined instead of a ' +
'boolean value. Make sure to return true or false.'
);
}
("production" !== process.env.NODE_ENV ? warning(
typeof shouldUpdate !== 'undefined',
'%s.shouldComponentUpdate(): Returned undefined instead of a ' +
'boolean value. Make sure to return true or false.',
this.getName() || 'ReactCompositeComponent'
) : null);
}

@@ -631,2 +640,27 @@

_processPendingState: function(props, context) {
var inst = this._instance;
var queue = this._pendingStateQueue;
var replace = this._pendingReplaceState;
this._pendingReplaceState = false;
this._pendingStateQueue = null;
if (!queue) {
return inst.state;
}
var nextState = assign({}, replace ? queue[0] : inst.state);
for (var i = replace ? 1 : 0; i < queue.length; i++) {
var partial = queue[i];
assign(
nextState,
typeof partial === 'function' ?
partial.call(inst, nextState, props, context) :
partial
);
}
return nextState;
},
/**

@@ -654,3 +688,2 @@ * Merges new props and state, notifies delegate methods of update and

var prevElement = this._currentElement;
var prevProps = inst.props;

@@ -657,0 +690,0 @@ var prevState = inst.state;

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -16,4 +16,6 @@ *

var emptyObject = require("./emptyObject");
var monitorCodeUse = require("./monitorCodeUse");
var warning = require("./warning");
var didWarn = false;
/**

@@ -50,4 +52,12 @@ * Keeps track of the current context.

withContext: function(newContext, scopedCallback) {
monitorCodeUse('react_with_context', {newContext: newContext});
if ("production" !== process.env.NODE_ENV) {
("production" !== process.env.NODE_ENV ? warning(
didWarn,
'withContext is deprecated and will be removed in a future version. ' +
'Use a wrapper component with getChildContext instead.'
) : null);
didWarn = true;
}
var result;

@@ -54,0 +64,0 @@ var previousContext = ReactContext.current;

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -21,2 +21,3 @@ *

var onlyChild = require("./onlyChild");
var warning = require("./warning");

@@ -35,8 +36,10 @@ // We don't remove the element from the DOM until we receive an animationend or

noEventListener = function() {
console.warn(
("production" !== process.env.NODE_ENV ? warning(
false,
'transition(): tried to perform an animation without ' +
'an animationend or transitionend event after timeout (' +
NO_EVENT_TIMEOUT + 'ms). You should either disable this ' +
'transition in JS or add a CSS animation/transition.'
);
'%sms). You should either disable this ' +
'transition in JS or add a CSS animation/transition.',
NO_EVENT_TIMEOUT
) : null);
};

@@ -43,0 +46,0 @@ }

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -23,2 +23,3 @@ *

var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");
var ReactClass = require("./ReactClass");
var ReactComponentBrowserEnvironment =

@@ -32,2 +33,3 @@ require("./ReactComponentBrowserEnvironment");

var ReactDOMIDOperations = require("./ReactDOMIDOperations");
var ReactDOMIframe = require("./ReactDOMIframe");
var ReactDOMInput = require("./ReactDOMInput");

@@ -38,2 +40,3 @@ var ReactDOMOption = require("./ReactDOMOption");

var ReactDOMTextComponent = require("./ReactDOMTextComponent");
var ReactElement = require("./ReactElement");
var ReactEventListener = require("./ReactEventListener");

@@ -51,2 +54,18 @@ var ReactInjection = require("./ReactInjection");

function autoGenerateWrapperClass(type) {
return ReactClass.createClass({
tagName: type.toUpperCase(),
render: function() {
return new ReactElement(
type,
null,
null,
null,
null,
this.props
);
}
});
}
function inject() {

@@ -85,2 +104,6 @@ ReactInjection.EventEmitter.injectReactEventListener(

ReactInjection.NativeComponent.injectAutoWrapper(
autoGenerateWrapperClass
);
// This needs to happen before createFullPageComponent() otherwise the mixin

@@ -93,2 +116,3 @@ // won't be included.

'form': ReactDOMForm,
'iframe': ReactDOMIframe,
'img': ReactDOMImg,

@@ -95,0 +119,0 @@ 'input': ReactDOMInput,

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -21,2 +21,4 @@ *

var ReactBrowserEventEmitter = require("./ReactBrowserEventEmitter");
var ReactComponentBrowserEnvironment =
require("./ReactComponentBrowserEnvironment");
var ReactMount = require("./ReactMount");

@@ -27,7 +29,6 @@ var ReactMultiChild = require("./ReactMultiChild");

var assign = require("./Object.assign");
var escapeTextForBrowser = require("./escapeTextForBrowser");
var escapeTextContentForBrowser = require("./escapeTextContentForBrowser");
var invariant = require("./invariant");
var isEventSupported = require("./isEventSupported");
var keyOf = require("./keyOf");
var monitorCodeUse = require("./monitorCodeUse");
var warning = require("./warning");

@@ -67,3 +68,4 @@

'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit http://fb.me/react-invariant-dangerously-set-inner-html for more information.'
'Please visit http://fb.me/react-invariant-dangerously-set-inner-html ' +
'for more information.'
) : invariant(props.dangerouslySetInnerHTML.__html != null));

@@ -77,10 +79,9 @@ }

) : null);
if (props.contentEditable && props.children != null) {
console.warn(
'A component is `contentEditable` and contains `children` managed by ' +
'React. It is now your responsibility to guarantee that none of ' +
'those nodes are unexpectedly modified or duplicated. This is ' +
'probably not intentional.'
);
}
("production" !== process.env.NODE_ENV ? warning(
!props.contentEditable || props.children == null,
'A component is `contentEditable` and contains `children` managed by ' +
'React. It is now your responsibility to guarantee that none of ' +
'those nodes are unexpectedly modified or duplicated. This is ' +
'probably not intentional.'
) : null);
}

@@ -99,7 +100,6 @@ ("production" !== process.env.NODE_ENV ? invariant(

// bubble.
if (registrationName === 'onScroll' &&
!isEventSupported('scroll', true)) {
monitorCodeUse('react_no_scroll_event');
console.warn('This browser doesn\'t support the `onScroll` event');
}
("production" !== process.env.NODE_ENV ? warning(
registrationName !== 'onScroll' || isEventSupported('scroll', true),
'This browser doesn\'t support the `onScroll` event'
) : null);
}

@@ -290,3 +290,3 @@ var container = ReactMount.findReactContainerForID(id);

if (contentToUse != null) {
return prefix + escapeTextForBrowser(contentToUse);
return prefix + escapeTextContentForBrowser(contentToUse);
} else if (childrenToUse != null) {

@@ -484,3 +484,3 @@ var mountImages = this.mountChildren(

ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);
ReactMount.purgeID(this._rootNodeID);
ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
this._rootNodeID = null;

@@ -487,0 +487,0 @@ }

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -135,4 +135,4 @@ *

dangerouslyReplaceNodeWithMarkupByID: function(id, markup) {
var node = ReactMount.getNode(id);
DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
var node = ReactMount.getNode(id);
DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
},

@@ -139,0 +139,0 @@

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -21,4 +21,3 @@ *

var assign = require("./Object.assign");
var escapeTextForBrowser = require("./escapeTextForBrowser");
var invariant = require("./invariant");
var escapeTextContentForBrowser = require("./escapeTextContentForBrowser");

@@ -71,3 +70,3 @@ /**

this._rootNodeID = rootID;
var escapedText = escapeTextForBrowser(this._stringText);
var escapedText = escapeTextContentForBrowser(this._stringText);

@@ -113,3 +112,2 @@ if (transaction.renderToStaticMarkup) {

unmountComponent: function() {
// TODO: Is this necessary?
ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);

@@ -116,0 +114,0 @@ }

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -22,2 +22,3 @@ *

var ReactElement = require("./ReactElement");
var ReactFragment = require("./ReactFragment");
var ReactPropTypeLocations = require("./ReactPropTypeLocations");

@@ -29,3 +30,2 @@ var ReactPropTypeLocationNames = require("./ReactPropTypeLocationNames");

var getIteratorFn = require("./getIteratorFn");
var monitorCodeUse = require("./monitorCodeUse");
var invariant = require("./invariant");

@@ -49,7 +49,3 @@ var warning = require("./warning");

*/
var ownerHasKeyUseWarning = {
'react_key_warning': {},
'react_numeric_key_warning': {}
};
var ownerHasMonitoredObjectMap = {};
var ownerHasKeyUseWarning = {};

@@ -108,3 +104,2 @@ var loggedTypeFailures = {};

warnAndMonitorForKeyUse(
'react_key_warning',
'Each child in an array or iterator should have a unique "key" prop.',

@@ -130,3 +125,2 @@ element,

warnAndMonitorForKeyUse(
'react_numeric_key_warning',
'Child objects should have non-numeric keys so ordering is preserved.',

@@ -142,3 +136,2 @@ element,

* @internal
* @param {string} warningID The id used when logging.
* @param {string} message The base warning that gets output.

@@ -148,3 +141,3 @@ * @param {ReactElement} element Component that requires a key.

*/
function warnAndMonitorForKeyUse(warningID, message, element, parentType) {
function warnAndMonitorForKeyUse(message, element, parentType) {
var ownerName = getCurrentOwnerDisplayName();

@@ -154,3 +147,5 @@ var parentName = parentType.displayName || parentType.name;

var useName = ownerName || parentName;
var memoizer = ownerHasKeyUseWarning[warningID];
var memoizer = ownerHasKeyUseWarning[message] || (
(ownerHasKeyUseWarning[message] = {})
);
if (memoizer.hasOwnProperty(useName)) {

@@ -168,3 +163,2 @@ return;

// assigning it a key.
var childOwnerName = null;
if (element &&

@@ -174,3 +168,3 @@ element._owner &&

// Name of the component that originally created this child.
childOwnerName = getName(element._owner);
var childOwnerName = getName(element._owner);

@@ -181,25 +175,6 @@ message += (" It was passed a child from " + childOwnerName + ".");

message += ' See http://fb.me/react-warning-keys for more information.';
monitorCodeUse(warningID, {
component: useName,
componentOwner: childOwnerName
});
console.warn(message);
("production" !== process.env.NODE_ENV ? warning(false, message) : null);
}
/**
* Log that we're using an object map. We're considering deprecating this
* feature and replace it with proper Map and ImmutableMap data structures.
*
* @internal
*/
function monitorUseOfObjectMap() {
var currentName = getCurrentOwnerDisplayName() || '';
if (ownerHasMonitoredObjectMap.hasOwnProperty(currentName)) {
return;
}
ownerHasMonitoredObjectMap[currentName] = true;
monitorCodeUse('react_object_map_children');
}
/**
* Ensure that every element either is passed in a static location, in an

@@ -227,15 +202,17 @@ * array with an explicit keys property defined, or in an object literal

// Entry iterators provide implicit keys.
if (iteratorFn && iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (ReactElement.isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
if (iteratorFn) {
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (ReactElement.isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
} else if (typeof node === 'object') {
monitorUseOfObjectMap();
for (var key in node) {
if (node.hasOwnProperty(key)) {
validatePropertyKey(key, node[key], parentType);
var fragment = ReactFragment.extractIfFragment(node);
for (var key in fragment) {
if (fragment.hasOwnProperty(key)) {
validatePropertyKey(key, fragment[key], parentType);
}

@@ -284,3 +261,3 @@ }

var addendum = getDeclarationErrorAddendum(this);
("production" !== process.env.NODE_ENV ? warning(false, error.message + addendum) : null);
("production" !== process.env.NODE_ENV ? warning(false, 'Failed propType: ' + error.message + addendum) : null);
}

@@ -287,0 +264,0 @@ }

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -22,3 +22,3 @@ *

// `null` (in reality a placeholder such as `noscript`)
var nullComponentIdsRegistry = {};
var nullComponentIDsRegistry = {};

@@ -67,3 +67,3 @@ var ReactEmptyComponentInjection = {

function registerNullComponentID(id) {
nullComponentIdsRegistry[id] = true;
nullComponentIDsRegistry[id] = true;
}

@@ -76,3 +76,3 @@

function deregisterNullComponentID(id) {
delete nullComponentIdsRegistry[id];
delete nullComponentIDsRegistry[id];
}

@@ -85,3 +85,3 @@

function isNullComponentID(id) {
return !!nullComponentIdsRegistry[id];
return !!nullComponentIDsRegistry[id];
}

@@ -88,0 +88,0 @@

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

@@ -12,3 +12,3 @@ /**

"use strict";
'use strict';

@@ -15,0 +15,0 @@ /**

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -472,2 +472,21 @@ *

if ("production" !== process.env.NODE_ENV) {
if (!containerHasReactMarkup || reactRootElement.nextSibling) {
var rootElementSibling = reactRootElement;
while (rootElementSibling) {
if (ReactMount.isRenderedByReact(rootElementSibling)) {
("production" !== process.env.NODE_ENV ? warning(
false,
'render(): Target node has markup rendered by React, but there ' +
'are unrelated nodes as well. This is most commonly caused by ' +
'white-space inserted around server-rendered markup.'
) : null);
break;
}
rootElementSibling = rootElementSibling.nextSibling;
}
}
}
var shouldReuseMarkup = containerHasReactMarkup && !prevComponent;

@@ -638,6 +657,7 @@

} else {
console.warn(
("production" !== process.env.NODE_ENV ? warning(
false,
'ReactMount: Root element has been removed from its original ' +
'container. New container:', rootElement.parentNode
);
) : null);
}

@@ -820,3 +840,4 @@ }

if ("production" !== process.env.NODE_ENV) {
console.warn(
("production" !== process.env.NODE_ENV ? warning(
false,
'React attempted to reuse markup in a container but the ' +

@@ -829,4 +850,5 @@ 'checksum was invalid. This generally means that you are ' +

'why the markup being generated is different on the client ' +
'or server:\n' + difference
);
'or server:\n%s',
difference
) : null);
}

@@ -833,0 +855,0 @@ }

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -14,8 +14,6 @@ *

var ReactClass = require("./ReactClass");
var ReactElement = require("./ReactElement");
var assign = require("./Object.assign");
var invariant = require("./invariant");
var autoGenerateWrapperClass = null;
var genericComponentClass = null;

@@ -41,21 +39,10 @@ // This registry keeps track of wrapper classes around native tags

assign(tagToComponentClass, componentClasses);
},
// Temporary hack since we expect DOM refs to behave like composites,
// for this release.
injectAutoWrapper: function(wrapperFactory) {
autoGenerateWrapperClass = wrapperFactory;
}
};
function autoGenerateWrapperClass(type) {
return ReactClass.createClass({
tagName: type.toUpperCase(),
render: function() {
return new ReactElement(
type,
null,
null,
null,
null,
this.props
);
}
});
}
/**

@@ -62,0 +49,0 @@ * Get a composite component wrapper class for a specific tag.

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -97,3 +97,3 @@ *

return new Error(
("Required " + locationName + " `" + propName + "` was not specified in ")+
("Required " + locationName + " `" + propName + "` was not specified in ") +
("`" + componentName + "`.")

@@ -288,3 +288,3 @@ );

}
return createChainableTypeChecker(validate, 'expected `object`');
return createChainableTypeChecker(validate);
}

@@ -291,0 +291,0 @@

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -103,2 +103,16 @@ *

}
},
/**
* Flush any dirty changes in a component.
*
* @param {ReactComponent} internalInstance
* @param {ReactReconcileTransaction} transaction
* @internal
*/
performUpdateIfNecessary: function(
internalInstance,
transaction
) {
internalInstance.performUpdateIfNecessary(transaction);
}

@@ -105,0 +119,0 @@

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -15,3 +15,2 @@ *

var ReactOwner = require("./ReactOwner");
var ReactUpdates = require("./ReactUpdates");

@@ -18,0 +17,0 @@ var ReactRef = {};

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -16,2 +16,3 @@ *

var ReactChildren = require("./ReactChildren");
var ReactFragment = require("./ReactFragment");

@@ -27,5 +28,8 @@ var ReactTransitionChildMapping = {

getChildMapping: function(children) {
return ReactChildren.map(children, function(child) {
if (!children) {
return children;
}
return ReactFragment.extract(ReactChildren.map(children, function(child) {
return child;
});
}));
},

@@ -32,0 +36,0 @@

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -205,3 +205,3 @@ *

// by cloning a single child
var childrenToRender = {};
var childrenToRender = [];
for (var key in this.state.children) {

@@ -215,6 +215,6 @@ var child = this.state.children[key];

// leaving.
childrenToRender[key] = cloneWithProps(
childrenToRender.push(cloneWithProps(
this.props.childFactory(child),
{ref: key}
);
{ref: key, key: key}
));
}

@@ -221,0 +221,0 @@ }

@@ -12,3 +12,3 @@ /**

"use strict";
'use strict';

@@ -23,2 +23,3 @@ var ReactLifeCycle = require("./ReactLifeCycle");

var invariant = require("./invariant");
var warning = require("./warning");

@@ -45,16 +46,23 @@ function enqueueUpdate(internalInstance) {

var internalInstance = ReactInstanceMap.get(publicInstance);
("production" !== process.env.NODE_ENV ? invariant(
internalInstance,
'%s(...): Can only update a mounted or mounting component. ' +
'This usually means you called %s() on an unmounted ' +
'component.',
callerName,
callerName
) : invariant(internalInstance));
("production" !== process.env.NODE_ENV ? invariant(
internalInstance !== ReactLifeCycle.currentlyUnmountingInstance,
'%s(...): Cannot call %s() on an unmounting component.',
callerName,
callerName
) : invariant(internalInstance !== ReactLifeCycle.currentlyUnmountingInstance));
if (!internalInstance) {
if ("production" !== process.env.NODE_ENV) {
// Only warn when we have a callerName. Otherwise we should be silent.
// We're probably calling from enqueueCallback. We don't want to warn
// there because we already warned for the corresponding lifecycle method.
("production" !== process.env.NODE_ENV ? warning(
!callerName,
'%s(...): Can only update a mounted or mounting component. ' +
'This usually means you called %s() on an unmounted ' +
'component. This is a no-op.',
callerName,
callerName
) : null);
}
return null;
}
if (internalInstance === ReactLifeCycle.currentlyUnmountingInstance) {
return null;
}
return internalInstance;

@@ -84,11 +92,14 @@ }

) : invariant(typeof callback === 'function'));
var internalInstance = ReactInstanceMap.get(publicInstance);
("production" !== process.env.NODE_ENV ? invariant(
internalInstance,
'Cannot enqueue a callback on an instance that is unmounted.'
) : invariant(internalInstance));
if (internalInstance === ReactLifeCycle.currentlyMountingInstance) {
// Ignore callbacks in componentWillMount. See enqueueUpdate.
return;
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
// Previously we would throw an error if we didn't have an internal
// instance. Since we want to make it a no-op instead, we mirror the same
// behavior we have in other enqueue* methods.
// We also need to ignore callbacks in componentWillMount. See
// enqueueUpdates.
if (!internalInstance ||
internalInstance === ReactLifeCycle.currentlyMountingInstance) {
return null;
}
if (internalInstance._pendingCallbacks) {

@@ -108,7 +119,7 @@ internalInstance._pendingCallbacks.push(callback);

("production" !== process.env.NODE_ENV ? invariant(
typeof callback === "function",
typeof callback === 'function',
'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +
'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
'isn\'t callable.'
) : invariant(typeof callback === "function"));
) : invariant(typeof callback === 'function'));
if (internalInstance._pendingCallbacks) {

@@ -119,2 +130,3 @@ internalInstance._pendingCallbacks.push(callback);

}
enqueueUpdate(internalInstance);
},

@@ -141,2 +153,6 @@

if (!internalInstance) {
return;
}
internalInstance._pendingForceUpdate = true;

@@ -164,4 +180,9 @@

internalInstance._pendingState = completeState;
if (!internalInstance) {
return;
}
internalInstance._pendingStateQueue = [completeState];
internalInstance._pendingReplaceState = true;
enqueueUpdate(internalInstance);

@@ -186,9 +207,11 @@ },

// Merge with `_pendingState` if it exists, otherwise with existing state.
internalInstance._pendingState = assign(
{},
internalInstance._pendingState || internalInstance._instance.state,
partialState
);
if (!internalInstance) {
return;
}
var queue =
internalInstance._pendingStateQueue ||
(internalInstance._pendingStateQueue = []);
queue.push(partialState);
enqueueUpdate(internalInstance);

@@ -210,2 +233,6 @@ },

if (!internalInstance) {
return;
}
("production" !== process.env.NODE_ENV ? invariant(

@@ -246,2 +273,6 @@ internalInstance._isTopLevel,

if (!internalInstance) {
return;
}
("production" !== process.env.NODE_ENV ? invariant(

@@ -248,0 +279,0 @@ internalInstance._isTopLevel,

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -18,2 +18,3 @@ *

var ReactPerf = require("./ReactPerf");
var ReactReconciler = require("./ReactReconciler");
var Transaction = require("./Transaction");

@@ -150,4 +151,8 @@

component._pendingCallbacks = null;
component.performUpdateIfNecessary(transaction.reconcileTransaction);
ReactReconciler.performUpdateIfNecessary(
component,
transaction.reconcileTransaction
);
if (callbacks) {

@@ -154,0 +159,0 @@ for (var j = 0; j < callbacks.length; j++) {

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -26,2 +26,3 @@ *

var ReactCSSTransitionGroup = require("./ReactCSSTransitionGroup");
var ReactFragment = require("./ReactFragment");
var ReactTransitionGroup = require("./ReactTransitionGroup");

@@ -43,2 +44,3 @@ var ReactUpdates = require("./ReactUpdates");

cloneWithProps: cloneWithProps,
createFragment: ReactFragment.create,
update: update

@@ -45,0 +47,0 @@ };

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -15,3 +15,3 @@ *

var monitorCodeUse = require("./monitorCodeUse");
var warning = require("./warning");

@@ -61,11 +61,33 @@ /**

}
monitorCodeUse(
'react_should_update_owner_is_useful',
{
key: prevElement.key,
prevOwner: prevName,
nextOwner: nextName,
nextDisplayName: nextDisplayName
if (nextElement.type != null && typeof nextElement.type === 'string') {
nextDisplayName = nextElement.type;
}
if (typeof nextElement.type !== 'string' ||
nextElement.type === 'input' ||
nextElement.type === 'textarea') {
if ((prevElement._owner != null &&
prevElement._owner._isOwnerNecessary === false) ||
(nextElement._owner != null &&
nextElement._owner._isOwnerNecessary === false)) {
if (prevElement._owner != null) {
prevElement._owner._isOwnerNecessary = true;
}
if (nextElement._owner != null) {
nextElement._owner._isOwnerNecessary = true;
}
("production" !== process.env.NODE_ENV ? warning(
false,
'<%s /> is being rendered by both %s and %s using the same ' +
'key (%s) in the same place. Currently, this means that ' +
'they don\'t preserve state. This behavior should be very ' +
'rare so we\'re considering deprecating it. Please contact ' +
'the React team and explain your use case so that we can ' +
'take that into consideration.',
nextDisplayName || 'Unknown Component',
prevName || '[Unknown]',
nextName || '[Unknown]',
prevElement.key
) : null);
}
);
}
}

@@ -72,0 +94,0 @@ }

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -288,4 +288,4 @@ *

for (var topLevelType in topLevelEventsToDispatchConfig) {
topLevelEventsToDispatchConfig[topLevelType].dependencies = [topLevelType];
for (var type in topLevelEventsToDispatchConfig) {
topLevelEventsToDispatchConfig[type].dependencies = [type];
}

@@ -292,0 +292,0 @@

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013 Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -19,3 +19,3 @@ *

* This API assumes the caller knows the contents of the data type. For less
* well defined inputs use createArrayFrom.
* well defined inputs use createArrayFromMixed.
*

@@ -22,0 +22,0 @@ * @param {object|function|filelist} obj

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -15,2 +15,3 @@ *

var ReactElement = require("./ReactElement");
var ReactFragment = require("./ReactFragment");
var ReactInstanceHandles = require("./ReactInstanceHandles");

@@ -188,5 +189,6 @@

) : invariant(children.nodeType !== 1));
for (var key in children) {
if (children.hasOwnProperty(key)) {
child = children[key];
var fragment = ReactFragment.extract(children);
for (var key in fragment) {
if (fragment.hasOwnProperty(key)) {
child = fragment[key];
nextName = (

@@ -193,0 +195,0 @@ (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2013-2014, Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.

@@ -4,0 +4,0 @@ *

/**
* Copyright 2014, Facebook, Inc.
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.

@@ -34,3 +34,10 @@ *

if (format.indexOf('Failed CompositeComponent proptype check. ') === 0) {
if (format.length < 10 || /^[s\W]*$/.test(format)) {
throw new Error(
'The warning format should be able to uniquely identify this ' +
'warning. Please, use a more descriptive format than: ' + format
);
}
if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.

@@ -37,0 +44,0 @@ }

{
"name": "react",
"description": "React is a JavaScript library for building user interfaces.",
"version": "0.13.0-beta.1",
"version": "0.13.0-beta.2",
"keywords": [

@@ -6,0 +6,0 @@ "react"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc