From f2bdd4d43d94033f4cb8d267bb3f6d73263257af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20de=20Campredon?= Date: Wed, 11 Mar 2015 22:43:21 +0100 Subject: [PATCH] bump version and dependencies --- examples/autocomplete/bundle.js | 22462 ++++---------- examples/autocomplete/package.json | 4 +- examples/basic-state-stream/bundle.js | 33723 ++++++++++----------- examples/basic-state-stream/package.json | 4 +- package.json | 8 +- 5 files changed, 22910 insertions(+), 33291 deletions(-) diff --git a/examples/autocomplete/bundle.js b/examples/autocomplete/bundle.js index c98897c..6d9689c 100644 --- a/examples/autocomplete/bundle.js +++ b/examples/autocomplete/bundle.js @@ -55,7 +55,7 @@ var ____Class0=RxReact.Component;for(var ____Class0____Key in ____Class0){if(___ React.render(React.createElement(SearchWikipedia, null), document.getElementById('container')); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"react":155,"rx-dom":157,"rx-react":158}],2:[function(require,module,exports){ +},{"react":158,"rx-dom":160,"rx-react":161}],2:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -395,6 +395,7 @@ process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues +process.versions = {}; function noop() {} @@ -419,7 +420,7 @@ process.umask = function() { return 0; }; },{}],4:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -444,9 +445,9 @@ var AutoFocusMixin = { module.exports = AutoFocusMixin; -},{"./focusNode":120}],5:[function(require,module,exports){ +},{"./focusNode":122}],5:[function(require,module,exports){ /** - * Copyright 2013 Facebook, Inc. + * Copyright 2013-2015 Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -577,9 +578,6 @@ var eventTypes = { } }; -// Track characters inserted via keypress and composition events. -var fallbackBeforeInputChars = null; - // Track whether we've ever handled a keypress on the space key. var hasSpaceKeypress = false; @@ -883,7 +881,6 @@ function extractBeforeInputEvent( ); event.data = chars; - fallbackBeforeInputChars = null; EventPropagators.accumulateTwoPhaseDispatches(event); return event; } @@ -943,9 +940,9 @@ var BeforeInputEventPlugin = { module.exports = BeforeInputEventPlugin; -},{"./EventConstants":17,"./EventPropagators":22,"./ExecutionEnvironment":23,"./FallbackCompositionState":24,"./SyntheticCompositionEvent":94,"./SyntheticInputEvent":98,"./keyOf":142}],6:[function(require,module,exports){ +},{"./EventConstants":17,"./EventPropagators":22,"./ExecutionEnvironment":23,"./FallbackCompositionState":24,"./SyntheticCompositionEvent":96,"./SyntheticInputEvent":100,"./keyOf":144}],6:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -961,6 +958,8 @@ module.exports = BeforeInputEventPlugin; * CSS properties which accept numbers but are not in units of "px". */ var isUnitlessNumber = { + boxFlex: true, + boxFlexGroup: true, columnCount: true, flex: true, flexGrow: true, @@ -1065,7 +1064,7 @@ module.exports = CSSProperty; },{}],7:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -1245,10 +1244,10 @@ module.exports = CSSPropertyOperations; }).call(this,require('_process')) -},{"./CSSProperty":6,"./ExecutionEnvironment":23,"./camelizeStyleName":109,"./dangerousStyleValue":114,"./hyphenateStyleName":134,"./memoizeStringOnly":144,"./warning":154,"_process":3}],8:[function(require,module,exports){ +},{"./CSSProperty":6,"./ExecutionEnvironment":23,"./camelizeStyleName":111,"./dangerousStyleValue":116,"./hyphenateStyleName":136,"./memoizeStringOnly":146,"./warning":157,"_process":3}],8:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -1346,9 +1345,9 @@ module.exports = CallbackQueue; }).call(this,require('_process')) -},{"./Object.assign":29,"./PooledClass":30,"./invariant":136,"_process":3}],9:[function(require,module,exports){ +},{"./Object.assign":29,"./PooledClass":30,"./invariant":138,"_process":3}],9:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -1728,9 +1727,9 @@ var ChangeEventPlugin = { module.exports = ChangeEventPlugin; -},{"./EventConstants":17,"./EventPluginHub":19,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactUpdates":88,"./SyntheticEvent":96,"./isEventSupported":137,"./isTextInputElement":139,"./keyOf":142}],10:[function(require,module,exports){ +},{"./EventConstants":17,"./EventPluginHub":19,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactUpdates":90,"./SyntheticEvent":98,"./isEventSupported":139,"./isTextInputElement":141,"./keyOf":144}],10:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -1756,7 +1755,7 @@ module.exports = ClientReactRootIndex; },{}],11:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -1772,17 +1771,9 @@ module.exports = ClientReactRootIndex; var Danger = require("./Danger"); var ReactMultiChildUpdateTypes = require("./ReactMultiChildUpdateTypes"); -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`. * @@ -1802,37 +1793,6 @@ function insertChildAt(parentNode, childNode, index) { ); } -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)); - } - }; -} - /** * Operations for updating with DOM children. */ @@ -1840,7 +1800,7 @@ var DOMChildrenOperations = { dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup, - updateTextContent: updateTextContent, + updateTextContent: setTextContent, /** * Updates a component's children by processing a series of updates. The @@ -1913,7 +1873,7 @@ var DOMChildrenOperations = { ); break; case ReactMultiChildUpdateTypes.TEXT_CONTENT: - updateTextContent( + setTextContent( update.parentNode, update.textContent ); @@ -1931,10 +1891,10 @@ module.exports = DOMChildrenOperations; }).call(this,require('_process')) -},{"./Danger":14,"./ReactMultiChildUpdateTypes":73,"./getTextContentAccessor":131,"./invariant":136,"_process":3}],12:[function(require,module,exports){ +},{"./Danger":14,"./ReactMultiChildUpdateTypes":75,"./invariant":138,"./setTextContent":152,"_process":3}],12:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -2231,10 +2191,10 @@ module.exports = DOMProperty; }).call(this,require('_process')) -},{"./invariant":136,"_process":3}],13:[function(require,module,exports){ +},{"./invariant":138,"_process":3}],13:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -2249,8 +2209,7 @@ module.exports = DOMProperty; var DOMProperty = require("./DOMProperty"); -var escapeTextForBrowser = require("./escapeTextForBrowser"); -var memoizeStringOnly = require("./memoizeStringOnly"); +var quoteAttributeValueForBrowser = require("./quoteAttributeValueForBrowser"); var warning = require("./warning"); function shouldIgnoreValue(name, value) { @@ -2261,10 +2220,6 @@ function shouldIgnoreValue(name, value) { (DOMProperty.hasOverloadedBooleanValue[name] && value === false); } -var processAttributeNameAndPrefix = memoizeStringOnly(function(name) { - return escapeTextForBrowser(name) + '="'; -}); - if ("production" !== process.env.NODE_ENV) { var reactProps = { children: true, @@ -2316,8 +2271,8 @@ var DOMPropertyOperations = { * @return {string} Markup string. */ createMarkupForID: function(id) { - return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) + - escapeTextForBrowser(id) + '"'; + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + + quoteAttributeValueForBrowser(id); }, /** @@ -2336,16 +2291,14 @@ var DOMPropertyOperations = { var attributeName = DOMProperty.getAttributeName[name]; if (DOMProperty.hasBooleanValue[name] || (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) { - return escapeTextForBrowser(attributeName); + return attributeName; } - return processAttributeNameAndPrefix(attributeName) + - escapeTextForBrowser(value) + '"'; + return attributeName + '=' + quoteAttributeValueForBrowser(value); } else if (DOMProperty.isCustomAttribute(name)) { if (value == null) { return ''; } - return processAttributeNameAndPrefix(name) + - escapeTextForBrowser(value) + '"'; + return name + '=' + quoteAttributeValueForBrowser(value); } else if ("production" !== process.env.NODE_ENV) { warnUnknownProperty(name); } @@ -2431,10 +2384,10 @@ module.exports = DOMPropertyOperations; }).call(this,require('_process')) -},{"./DOMProperty":12,"./escapeTextForBrowser":117,"./memoizeStringOnly":144,"./warning":154,"_process":3}],14:[function(require,module,exports){ +},{"./DOMProperty":12,"./quoteAttributeValueForBrowser":150,"./warning":157,"_process":3}],14:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -2619,9 +2572,9 @@ module.exports = Danger; }).call(this,require('_process')) -},{"./ExecutionEnvironment":23,"./createNodesFromMarkup":113,"./emptyFunction":115,"./getMarkupWrap":128,"./invariant":136,"_process":3}],15:[function(require,module,exports){ +},{"./ExecutionEnvironment":23,"./createNodesFromMarkup":115,"./emptyFunction":117,"./getMarkupWrap":130,"./invariant":138,"_process":3}],15:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -2633,7 +2586,7 @@ module.exports = Danger; 'use strict'; - var keyOf = require("./keyOf"); +var keyOf = require("./keyOf"); /** * Module that is injectable into `EventPluginHub`, that specifies a @@ -2658,9 +2611,9 @@ var DefaultEventPluginOrder = [ module.exports = DefaultEventPluginOrder; -},{"./keyOf":142}],16:[function(require,module,exports){ +},{"./keyOf":144}],16:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -2798,9 +2751,9 @@ var EnterLeaveEventPlugin = { module.exports = EnterLeaveEventPlugin; -},{"./EventConstants":17,"./EventPropagators":22,"./ReactMount":71,"./SyntheticMouseEvent":100,"./keyOf":142}],17:[function(require,module,exports){ +},{"./EventConstants":17,"./EventPropagators":22,"./ReactMount":73,"./SyntheticMouseEvent":102,"./keyOf":144}],17:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -2870,10 +2823,10 @@ var EventConstants = { module.exports = EventConstants; -},{"./keyMirror":141}],18:[function(require,module,exports){ +},{"./keyMirror":143}],18:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014 Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -2961,10 +2914,10 @@ module.exports = EventListener; }).call(this,require('_process')) -},{"./emptyFunction":115,"_process":3}],19:[function(require,module,exports){ +},{"./emptyFunction":117,"_process":3}],19:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -3240,10 +3193,10 @@ module.exports = EventPluginHub; }).call(this,require('_process')) -},{"./EventPluginRegistry":20,"./EventPluginUtils":21,"./accumulateInto":106,"./forEachAccumulated":121,"./invariant":136,"_process":3}],20:[function(require,module,exports){ +},{"./EventPluginRegistry":20,"./EventPluginUtils":21,"./accumulateInto":108,"./forEachAccumulated":123,"./invariant":138,"_process":3}],20:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -3521,10 +3474,10 @@ module.exports = EventPluginRegistry; }).call(this,require('_process')) -},{"./invariant":136,"_process":3}],21:[function(require,module,exports){ +},{"./invariant":138,"_process":3}],21:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -3640,8 +3593,8 @@ function executeDispatch(event, listener, domID) { /** * Standard/simple iteration through an event's collected dispatches. */ -function executeDispatchesInOrder(event, executeDispatch) { - forEachEventDispatch(event, executeDispatch); +function executeDispatchesInOrder(event, cb) { + forEachEventDispatch(event, cb); event._dispatchListeners = null; event._dispatchIDs = null; } @@ -3743,10 +3696,10 @@ module.exports = EventPluginUtils; }).call(this,require('_process')) -},{"./EventConstants":17,"./invariant":136,"_process":3}],22:[function(require,module,exports){ +},{"./EventConstants":17,"./invariant":138,"_process":3}],22:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -3886,9 +3839,9 @@ module.exports = EventPropagators; }).call(this,require('_process')) -},{"./EventConstants":17,"./EventPluginHub":19,"./accumulateInto":106,"./forEachAccumulated":121,"_process":3}],23:[function(require,module,exports){ +},{"./EventConstants":17,"./EventPluginHub":19,"./accumulateInto":108,"./forEachAccumulated":123,"_process":3}],23:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -3932,7 +3885,7 @@ module.exports = ExecutionEnvironment; },{}],24:[function(require,module,exports){ /** - * Copyright 2013 Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4021,9 +3974,9 @@ PooledClass.addPoolingTo(FallbackCompositionState); module.exports = FallbackCompositionState; -},{"./Object.assign":29,"./PooledClass":30,"./getTextContentAccessor":131}],25:[function(require,module,exports){ +},{"./Object.assign":29,"./PooledClass":30,"./getTextContentAccessor":133}],25:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4144,7 +4097,7 @@ var HTMLDOMPropertyConfig = { muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, name: null, noValidate: HAS_BOOLEAN_VALUE, - open: null, + open: HAS_BOOLEAN_VALUE, pattern: null, placeholder: null, poster: null, @@ -4188,11 +4141,16 @@ var HTMLDOMPropertyConfig = { // keyboard hints. autoCapitalize: 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. property: null }, @@ -4208,7 +4166,9 @@ var HTMLDOMPropertyConfig = { autoCorrect: 'autocorrect', autoFocus: 'autofocus', 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', radioGroup: 'radiogroup', spellCheck: 'spellcheck', @@ -4222,7 +4182,7 @@ module.exports = HTMLDOMPropertyConfig; },{"./DOMProperty":12,"./ExecutionEnvironment":23}],26:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4376,10 +4336,10 @@ module.exports = LinkedValueUtils; }).call(this,require('_process')) -},{"./ReactPropTypes":79,"./invariant":136,"_process":3}],27:[function(require,module,exports){ +},{"./ReactPropTypes":81,"./invariant":138,"_process":3}],27:[function(require,module,exports){ (function (process){ /** - * Copyright 2014, Facebook, Inc. + * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4434,9 +4394,9 @@ module.exports = LocalEventTrapMixin; }).call(this,require('_process')) -},{"./ReactBrowserEventEmitter":33,"./accumulateInto":106,"./forEachAccumulated":121,"./invariant":136,"_process":3}],28:[function(require,module,exports){ +},{"./ReactBrowserEventEmitter":33,"./accumulateInto":108,"./forEachAccumulated":123,"./invariant":138,"_process":3}],28:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4492,9 +4452,9 @@ var MobileSafariClickEventPlugin = { module.exports = MobileSafariClickEventPlugin; -},{"./EventConstants":17,"./emptyFunction":115}],29:[function(require,module,exports){ +},{"./EventConstants":17,"./emptyFunction":117}],29:[function(require,module,exports){ /** - * Copyright 2014, Facebook, Inc. + * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4544,7 +4504,7 @@ module.exports = assign; },{}],30:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4658,10 +4618,10 @@ module.exports = PooledClass; }).call(this,require('_process')) -},{"./invariant":136,"_process":3}],31:[function(require,module,exports){ +},{"./invariant":138,"_process":3}],31:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4675,7 +4635,6 @@ module.exports = PooledClass; 'use strict'; -var DOMPropertyOperations = require("./DOMPropertyOperations"); var EventPluginUtils = require("./EventPluginUtils"); var ReactChildren = require("./ReactChildren"); var ReactComponent = require("./ReactComponent"); @@ -4685,14 +4644,13 @@ var ReactCurrentOwner = require("./ReactCurrentOwner"); var ReactElement = require("./ReactElement"); var ReactElementValidator = require("./ReactElementValidator"); var ReactDOM = require("./ReactDOM"); -var ReactDOMComponent = require("./ReactDOMComponent"); var ReactDOMTextComponent = require("./ReactDOMTextComponent"); var ReactDefaultInjection = require("./ReactDefaultInjection"); var ReactInstanceHandles = require("./ReactInstanceHandles"); var ReactMount = require("./ReactMount"); -var ReactMultiChild = require("./ReactMultiChild"); var ReactPerf = require("./ReactPerf"); var ReactPropTypes = require("./ReactPropTypes"); +var ReactReconciler = require("./ReactReconciler"); var ReactServerRendering = require("./ReactServerRendering"); var assign = require("./Object.assign"); @@ -4703,10 +4661,12 @@ ReactDefaultInjection.inject(); var createElement = ReactElement.createElement; var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; if ("production" !== process.env.NODE_ENV) { createElement = ReactElementValidator.createElement; createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; } var render = ReactPerf.measure('React', 'render', ReactMount.render); @@ -4726,6 +4686,7 @@ var React = { }, createClass: ReactClass.createClass, createElement: createElement, + cloneElement: cloneElement, createFactory: createFactory, createMixin: function(mixin) { // Currently a noop. Will be used to validate and trace mixins. @@ -4751,13 +4712,10 @@ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { __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 }); } @@ -4807,15 +4765,15 @@ if ("production" !== process.env.NODE_ENV) { } } -React.version = '0.13.0-beta.1'; +React.version = '0.13.0'; module.exports = React; }).call(this,require('_process')) -},{"./DOMPropertyOperations":13,"./EventPluginUtils":21,"./ExecutionEnvironment":23,"./Object.assign":29,"./ReactChildren":35,"./ReactClass":36,"./ReactComponent":37,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactDOM":43,"./ReactDOMComponent":45,"./ReactDOMTextComponent":53,"./ReactDefaultInjection":56,"./ReactElement":59,"./ReactElementValidator":60,"./ReactInstanceHandles":67,"./ReactMount":71,"./ReactMultiChild":72,"./ReactPerf":76,"./ReactPropTypes":79,"./ReactServerRendering":85,"./findDOMNode":118,"./onlyChild":146,"_process":3}],32:[function(require,module,exports){ +},{"./EventPluginUtils":21,"./ExecutionEnvironment":23,"./Object.assign":29,"./ReactChildren":35,"./ReactClass":36,"./ReactComponent":37,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactDOM":43,"./ReactDOMTextComponent":54,"./ReactDefaultInjection":57,"./ReactElement":60,"./ReactElementValidator":61,"./ReactInstanceHandles":69,"./ReactMount":73,"./ReactPerf":78,"./ReactPropTypes":81,"./ReactReconciler":84,"./ReactServerRendering":87,"./findDOMNode":120,"./onlyChild":147,"_process":3}],32:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4844,9 +4802,9 @@ var ReactBrowserComponentMixin = { module.exports = ReactBrowserComponentMixin; -},{"./findDOMNode":118}],33:[function(require,module,exports){ +},{"./findDOMNode":120}],33:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -5173,7 +5131,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { * * @see http://www.quirksmode.org/dom/events/scroll.html */ - ensureScrollValueMonitoring: function(){ + ensureScrollValueMonitoring: function() { if (!isMonitoringScrollValue) { var refresh = ViewportMetrics.refreshScrollValues; ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); @@ -5197,9 +5155,9 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { module.exports = ReactBrowserEventEmitter; -},{"./EventConstants":17,"./EventPluginHub":19,"./EventPluginRegistry":20,"./Object.assign":29,"./ReactEventEmitterMixin":63,"./ViewportMetrics":105,"./isEventSupported":137}],34:[function(require,module,exports){ +},{"./EventConstants":17,"./EventPluginHub":19,"./EventPluginRegistry":20,"./Object.assign":29,"./ReactEventEmitterMixin":64,"./ViewportMetrics":107,"./isEventSupported":139}],34:[function(require,module,exports){ /** - * Copyright 2014, Facebook, Inc. + * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -5324,10 +5282,10 @@ var ReactChildReconciler = { module.exports = ReactChildReconciler; -},{"./ReactReconciler":82,"./flattenChildren":119,"./instantiateReactComponent":135,"./shouldUpdateReactComponent":151}],35:[function(require,module,exports){ +},{"./ReactReconciler":84,"./flattenChildren":121,"./instantiateReactComponent":137,"./shouldUpdateReactComponent":154}],35:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -5340,6 +5298,7 @@ module.exports = ReactChildReconciler; 'use strict'; var PooledClass = require("./PooledClass"); +var ReactFragment = require("./ReactFragment"); var traverseAllChildren = require("./traverseAllChildren"); var warning = require("./warning"); @@ -5449,7 +5408,7 @@ function mapChildren(children, func, context) { var traverseContext = MapBookKeeping.getPooled(mapResult, func, context); traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); MapBookKeeping.release(traverseContext); - return mapResult; + return ReactFragment.create(mapResult); } function forEachSingleChildDummy(traverseContext, child, name, i) { @@ -5477,10 +5436,10 @@ module.exports = ReactChildren; }).call(this,require('_process')) -},{"./PooledClass":30,"./traverseAllChildren":153,"./warning":154,"_process":3}],36:[function(require,module,exports){ +},{"./PooledClass":30,"./ReactFragment":66,"./traverseAllChildren":156,"./warning":157,"_process":3}],36:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -5493,6 +5452,7 @@ module.exports = ReactChildren; 'use strict'; var ReactComponent = require("./ReactComponent"); +var ReactCurrentOwner = require("./ReactCurrentOwner"); var ReactElement = require("./ReactElement"); var ReactErrorUtils = require("./ReactErrorUtils"); var ReactInstanceMap = require("./ReactInstanceMap"); @@ -5505,7 +5465,6 @@ var assign = require("./Object.assign"); var invariant = require("./invariant"); var keyMirror = require("./keyMirror"); var keyOf = require("./keyOf"); -var monitorCodeUse = require("./monitorCodeUse"); var warning = require("./warning"); var MIXINS_KEY = keyOf({mixins: null}); @@ -6142,18 +6101,20 @@ function bindAutoBindMethod(component, method) { // ignore the value of "this" that the user is trying to use, so // let's warn. 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 %s', + componentName + ) : null); return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); @@ -6197,6 +6158,9 @@ var typeDeprecationDescriptor = { displayName, displayName ) : null); + Object.defineProperty(this, 'type', { + value: this + }); return this; } }; @@ -6225,6 +6189,21 @@ var ReactClassMixin = { * @final */ isMounted: function() { + if ("production" !== process.env.NODE_ENV) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + ("production" !== process.env.NODE_ENV ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component' + ) : null); + owner._warnedAboutRefsInRender = true; + } + } var internalInstance = ReactInstanceMap.get(this); return ( internalInstance && @@ -6291,6 +6270,14 @@ var ReactClass = { // This constructor is overridden by mocks. The argument is used // by mocks to assert on what gets mounted. + if ("production" !== process.env.NODE_ENV) { + ("production" !== process.env.NODE_ENV ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: http://fb.me/react-legacyfactory' + ) : null); + } + // Wire up auto-binding if (this.__reactAutoBindMap) { bindAutoBindMethods(this); @@ -6354,18 +6341,14 @@ var ReactClass = { ) : invariant(Constructor.prototype.render)); 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); } // Reduce time spent doing lookups by setting these on the prototype. @@ -6378,8 +6361,10 @@ var ReactClass = { // Legacy hook Constructor.type = Constructor; 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) } } @@ -6398,10 +6383,10 @@ module.exports = ReactClass; }).call(this,require('_process')) -},{"./Object.assign":29,"./ReactComponent":37,"./ReactElement":59,"./ReactErrorUtils":62,"./ReactInstanceMap":68,"./ReactLifeCycle":69,"./ReactPropTypeLocationNames":77,"./ReactPropTypeLocations":78,"./ReactUpdateQueue":87,"./invariant":136,"./keyMirror":141,"./keyOf":142,"./monitorCodeUse":145,"./warning":154,"_process":3}],37:[function(require,module,exports){ +},{"./Object.assign":29,"./ReactComponent":37,"./ReactCurrentOwner":42,"./ReactElement":60,"./ReactErrorUtils":63,"./ReactInstanceMap":70,"./ReactLifeCycle":71,"./ReactPropTypeLocationNames":79,"./ReactPropTypeLocations":80,"./ReactUpdateQueue":89,"./invariant":138,"./keyMirror":143,"./keyOf":144,"./warning":157,"_process":3}],37:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -6438,16 +6423,29 @@ function ReactComponent(props, context) { * callback that will be executed when the call to setState is actually * completed. * - * @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. * @final * @protected */ ReactComponent.prototype.setState = function(partialState, callback) { ("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) { ("production" !== process.env.NODE_ENV ? warning( partialState != null, @@ -6468,7 +6466,7 @@ ReactComponent.prototype.setState = function(partialState, callback) { * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * - * This will not invoke `shouldUpdateComponent`, but it will invoke + * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {?function} callback Called after update is complete. @@ -6488,14 +6486,15 @@ ReactComponent.prototype.forceUpdate = function(callback) { * modern base class. Instead, we define a getter that warns if it's accessed. */ 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', + replaceProps: 'replaceProps', + replaceState: 'replaceState', + setProps: 'setProps' + }; + var defineDeprecationWarning = function(methodName, displayName) { + try { Object.defineProperty(ReactComponent.prototype, methodName, { get: function() { ("production" !== process.env.NODE_ENV ? warning( @@ -6506,11 +6505,13 @@ if ("production" !== process.env.NODE_ENV) { return undefined; } }); - }; - 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]); } } } @@ -6519,9 +6520,9 @@ module.exports = ReactComponent; }).call(this,require('_process')) -},{"./ReactUpdateQueue":87,"./invariant":136,"./warning":154,"_process":3}],38:[function(require,module,exports){ +},{"./ReactUpdateQueue":89,"./invariant":138,"./warning":157,"_process":3}],38:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -6566,10 +6567,10 @@ var ReactComponentBrowserEnvironment = { module.exports = ReactComponentBrowserEnvironment; -},{"./ReactDOMIDOperations":47,"./ReactMount":71}],39:[function(require,module,exports){ +},{"./ReactDOMIDOperations":47,"./ReactMount":73}],39:[function(require,module,exports){ (function (process){ /** - * Copyright 2014, Facebook, Inc. + * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -6628,10 +6629,10 @@ module.exports = ReactComponentEnvironment; }).call(this,require('_process')) -},{"./invariant":136,"_process":3}],40:[function(require,module,exports){ +},{"./invariant":138,"_process":3}],40:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -6728,7 +6729,8 @@ var ReactCompositeComponentMixin = { // See ReactUpdateQueue this._pendingElement = null; - this._pendingState = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; this._pendingForceUpdate = false; this._renderedComponent = null; @@ -6764,6 +6766,20 @@ var ReactCompositeComponentMixin = { // Initialize the public class var inst = new Component(publicProps, publicContext); + + if ("production" !== process.env.NODE_ENV) { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + ("production" !== process.env.NODE_ENV ? warning( + inst.render != null, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render` in your ' + + 'component or you may have accidentally tried to render an element ' + + 'whose type is a function that isn\'t a React component.', + Component.displayName || Component.name || 'Component' + ) : null); + } + // These should be set up in the constructor, but as a convenience for // simpler class abstractions, we set them up after the fact. inst.props = publicProps; @@ -6823,26 +6839,29 @@ var ReactCompositeComponentMixin = { this.getName() || 'ReactCompositeComponent' ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); - 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._pendingState` without triggering a re-render. - if (this._pendingState) { - inst.state = this._pendingState; - this._pendingState = null; + // 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); + } } + + renderedElement = this._renderValidatedComponent(); + } finally { + ReactLifeCycle.currentlyMountingInstance = previouslyMounting; } - var renderedElement = this._renderValidatedComponent(); this._renderedComponent = this._instantiateReactComponent( renderedElement, this._currentElement.type // The wrapping type @@ -6884,13 +6903,12 @@ var ReactCompositeComponentMixin = { this._renderedComponent = null; // Reset pending fields - this._pendingState = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; this._pendingForceUpdate = false; this._pendingCallbacks = null; this._pendingElement = null; - ReactComponentEnvironment.unmountIDFromEnvironment(this._rootNodeID); - // These fields do not really need to be reset since this object is no // longer accessible. this._context = null; @@ -7076,10 +7094,19 @@ var ReactCompositeComponentMixin = { if (location === ReactPropTypeLocations.prop) { // 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%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%s', + error.message, + addendum + ) : null); } } } @@ -7102,7 +7129,7 @@ var ReactCompositeComponentMixin = { }, /** - * If any of `_pendingElement`, `_pendingState`, or `_pendingForceUpdate` + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` * is set, update the component. * * @param {ReactReconcileTransaction} transaction @@ -7118,7 +7145,7 @@ var ReactCompositeComponentMixin = { ); } - if (this._pendingState != null || this._pendingForceUpdate) { + if (this._pendingStateQueue !== null || this._pendingForceUpdate) { if ("production" !== process.env.NODE_ENV) { ReactElementValidator.checkAndWarnForMutatedProps( this._currentElement @@ -7183,10 +7210,8 @@ var ReactCompositeComponentMixin = { ) { var inst = this._instance; - var prevContext = inst.context; - var prevProps = inst.props; - var nextContext = prevContext; - var nextProps = prevProps; + var nextContext = inst.context; + var nextProps = inst.props; // Distinguish between a props update versus a simple state update if (prevParentElement !== nextParentElement) { @@ -7195,12 +7220,15 @@ var ReactCompositeComponentMixin = { if ("production" !== process.env.NODE_ENV) { if (nextUnmaskedContext != null) { - this._warnIfContextsDiffer(nextParentElement._context, nextUnmaskedContext); + this._warnIfContextsDiffer( + nextParentElement._context, + nextUnmaskedContext + ); } } // 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. if (inst.componentWillReceiveProps) { @@ -7208,8 +7236,7 @@ var ReactCompositeComponentMixin = { } } - var nextState = this._pendingState || inst.state; - this._pendingState = null; + var nextState = this._processPendingState(nextProps, nextContext); var shouldUpdate = this._pendingForceUpdate || @@ -7217,13 +7244,12 @@ var ReactCompositeComponentMixin = { inst.shouldComponentUpdate(nextProps, nextState, nextContext); 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); } if (shouldUpdate) { @@ -7248,6 +7274,31 @@ var ReactCompositeComponentMixin = { } }, + _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; + }, + /** * Merges new props and state, notifies delegate methods of update and * performs update. @@ -7270,7 +7321,6 @@ var ReactCompositeComponentMixin = { ) { var inst = this._instance; - var prevElement = this._currentElement; var prevProps = inst.props; var prevState = inst.state; var prevContext = inst.context; @@ -7470,9 +7520,10 @@ module.exports = ReactCompositeComponent; }).call(this,require('_process')) -},{"./Object.assign":29,"./ReactComponentEnvironment":39,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactElement":59,"./ReactElementValidator":60,"./ReactInstanceMap":68,"./ReactLifeCycle":69,"./ReactNativeComponent":74,"./ReactPerf":76,"./ReactPropTypeLocationNames":77,"./ReactPropTypeLocations":78,"./ReactReconciler":82,"./ReactUpdates":88,"./emptyObject":116,"./invariant":136,"./shouldUpdateReactComponent":151,"./warning":154,"_process":3}],41:[function(require,module,exports){ +},{"./Object.assign":29,"./ReactComponentEnvironment":39,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactElement":60,"./ReactElementValidator":61,"./ReactInstanceMap":70,"./ReactLifeCycle":71,"./ReactNativeComponent":76,"./ReactPerf":78,"./ReactPropTypeLocationNames":79,"./ReactPropTypeLocations":80,"./ReactReconciler":84,"./ReactUpdates":90,"./emptyObject":118,"./invariant":138,"./shouldUpdateReactComponent":154,"./warning":157,"_process":3}],41:[function(require,module,exports){ +(function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -7486,7 +7537,9 @@ module.exports = ReactCompositeComponent; var assign = require("./Object.assign"); var emptyObject = require("./emptyObject"); -var monitorCodeUse = require("./monitorCodeUse"); +var warning = require("./warning"); + +var didWarn = false; /** * Keeps track of the current context. @@ -7519,7 +7572,15 @@ var ReactContext = { * @return {ReactComponent|array} */ 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; var previousContext = ReactContext.current; @@ -7536,9 +7597,11 @@ var ReactContext = { module.exports = ReactContext; -},{"./Object.assign":29,"./emptyObject":116,"./monitorCodeUse":145}],42:[function(require,module,exports){ +}).call(this,require('_process')) + +},{"./Object.assign":29,"./emptyObject":118,"./warning":157,"_process":3}],42:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -7573,7 +7636,7 @@ module.exports = ReactCurrentOwner; },{}],43:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -7749,9 +7812,9 @@ module.exports = ReactDOM; }).call(this,require('_process')) -},{"./ReactElement":59,"./ReactElementValidator":60,"./mapObject":143,"_process":3}],44:[function(require,module,exports){ +},{"./ReactElement":60,"./ReactElementValidator":61,"./mapObject":145,"_process":3}],44:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -7813,10 +7876,10 @@ var ReactDOMButton = ReactClass.createClass({ module.exports = ReactDOMButton; -},{"./AutoFocusMixin":4,"./ReactBrowserComponentMixin":32,"./ReactClass":36,"./ReactElement":59,"./keyMirror":141}],45:[function(require,module,exports){ +},{"./AutoFocusMixin":4,"./ReactBrowserComponentMixin":32,"./ReactClass":36,"./ReactElement":60,"./keyMirror":143}],45:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -7835,16 +7898,17 @@ var CSSPropertyOperations = require("./CSSPropertyOperations"); var DOMProperty = require("./DOMProperty"); var DOMPropertyOperations = require("./DOMPropertyOperations"); var ReactBrowserEventEmitter = require("./ReactBrowserEventEmitter"); +var ReactComponentBrowserEnvironment = + require("./ReactComponentBrowserEnvironment"); var ReactMount = require("./ReactMount"); var ReactMultiChild = require("./ReactMultiChild"); var ReactPerf = require("./ReactPerf"); 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"); var deleteListener = ReactBrowserEventEmitter.deleteListener; @@ -7879,7 +7943,8 @@ function assertValidProps(props) { ("production" !== process.env.NODE_ENV ? invariant( props.dangerouslySetInnerHTML.__html != null, '`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)); } if ("production" !== process.env.NODE_ENV) { @@ -7888,14 +7953,13 @@ function assertValidProps(props) { 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.' ) : 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); } ("production" !== process.env.NODE_ENV ? invariant( props.style == null || typeof props.style === 'object', @@ -7909,11 +7973,10 @@ function putListener(id, registrationName, listener, transaction) { if ("production" !== process.env.NODE_ENV) { // IE8 has no API for event capturing and the `onScroll` event doesn't // 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); } var container = ReactMount.findReactContainerForID(id); if (container) { @@ -8099,7 +8162,7 @@ ReactDOMComponent.Mixin = { CONTENT_TYPES[typeof props.children] ? props.children : null; var childrenToUse = contentToUse != null ? null : props.children; if (contentToUse != null) { - return prefix + escapeTextForBrowser(contentToUse); + return prefix + escapeTextContentForBrowser(contentToUse); } else if (childrenToUse != null) { var mountImages = this.mountChildren( childrenToUse, @@ -8292,7 +8355,7 @@ ReactDOMComponent.Mixin = { unmountComponent: function() { this.unmountChildren(); ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID); - ReactMount.purgeID(this._rootNodeID); + ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); this._rootNodeID = null; } @@ -8319,9 +8382,9 @@ module.exports = ReactDOMComponent; }).call(this,require('_process')) -},{"./CSSPropertyOperations":7,"./DOMProperty":12,"./DOMPropertyOperations":13,"./Object.assign":29,"./ReactBrowserEventEmitter":33,"./ReactMount":71,"./ReactMultiChild":72,"./ReactPerf":76,"./escapeTextForBrowser":117,"./invariant":136,"./isEventSupported":137,"./keyOf":142,"./monitorCodeUse":145,"./warning":154,"_process":3}],46:[function(require,module,exports){ +},{"./CSSPropertyOperations":7,"./DOMProperty":12,"./DOMPropertyOperations":13,"./Object.assign":29,"./ReactBrowserEventEmitter":33,"./ReactComponentBrowserEnvironment":38,"./ReactMount":73,"./ReactMultiChild":74,"./ReactPerf":78,"./escapeTextContentForBrowser":119,"./invariant":138,"./isEventSupported":139,"./keyOf":144,"./warning":157,"_process":3}],46:[function(require,module,exports){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -8368,10 +8431,10 @@ var ReactDOMForm = ReactClass.createClass({ module.exports = ReactDOMForm; -},{"./EventConstants":17,"./LocalEventTrapMixin":27,"./ReactBrowserComponentMixin":32,"./ReactClass":36,"./ReactElement":59}],47:[function(require,module,exports){ +},{"./EventConstants":17,"./LocalEventTrapMixin":27,"./ReactBrowserComponentMixin":32,"./ReactClass":36,"./ReactElement":60}],47:[function(require,module,exports){ (function (process){ /** - * Copyright 2013-2014, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -8504,8 +8567,8 @@ var ReactDOMIDOperations = { * @see {Danger.dangerouslyReplaceNodeWithMarkup} */ dangerouslyReplaceNodeWithMarkupByID: function(id, markup) { - var node = ReactMount.getNode(id); - DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); + var node = ReactMount.getNode(id); + DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); }, /** @@ -8537,9 +8600,54 @@ module.exports = ReactDOMIDOperations; }).call(this,require('_process')) -},{"./CSSPropertyOperations":7,"./DOMChildrenOperations":11,"./DOMPropertyOperations":13,"./ReactMount":71,"./ReactPerf":76,"./invariant":136,"./setInnerHTML":149,"_process":3}],48:[function(require,module,exports){ +},{"./CSSPropertyOperations":7,"./DOMChildrenOperations":11,"./DOMPropertyOperations":13,"./ReactMount":73,"./ReactPerf":78,"./invariant":138,"./setInnerHTML":151,"_process":3}],48:[function(require,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMIframe + */ + +'use strict'; + +var EventConstants = require("./EventConstants"); +var LocalEventTrapMixin = require("./LocalEventTrapMixin"); +var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin"); +var ReactClass = require("./ReactClass"); +var ReactElement = require("./ReactElement"); + +var iframe = ReactElement.createFactory('iframe'); + +/** + * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to + * capture it on the