react
Advanced tools
Comparing version 0.9.0-rc1 to 0.9.0
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -62,2 +62,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, | ||
crossOrigin: null, | ||
data: null, // For `<object />` acts as `src`. | ||
@@ -68,2 +69,3 @@ dateTime: MUST_USE_ATTRIBUTE, | ||
disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, | ||
download: null, | ||
draggable: null, | ||
@@ -77,2 +79,3 @@ encType: null, | ||
href: null, | ||
hrefLang: null, | ||
htmlFor: null, | ||
@@ -88,5 +91,7 @@ httpEquiv: null, | ||
maxLength: MUST_USE_ATTRIBUTE, | ||
mediaGroup: null, | ||
method: null, | ||
min: null, | ||
multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, | ||
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, | ||
name: null, | ||
@@ -184,2 +189,3 @@ noValidate: HAS_BOOLEAN_VALUE, | ||
encType: 'enctype', | ||
hrefLang: 'hreflang', | ||
radioGroup: 'radiogroup', | ||
@@ -186,0 +192,0 @@ spellCheck: 'spellcheck', |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -144,2 +144,4 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs, | ||
registrationNameModules: EventPluginRegistry.registrationNameModules, | ||
@@ -146,0 +148,0 @@ |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -92,2 +92,10 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { | ||
("production" !== process.env.NODE_ENV ? invariant( | ||
!EventPluginRegistry.eventNameDispatchConfigs[eventName], | ||
'EventPluginHub: More than one plugin attempted to publish the same ' + | ||
'event name, `%s`.', | ||
eventName | ||
) : invariant(!EventPluginRegistry.eventNameDispatchConfigs[eventName])); | ||
EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; | ||
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; | ||
@@ -150,4 +158,9 @@ if (phasedRegistrationNames) { | ||
/** | ||
* Mapping from registration names to plugin modules. | ||
* Mapping from event name to dispatch config | ||
*/ | ||
eventNameDispatchConfigs: {}, | ||
/** | ||
* Mapping from registration name to plugin module | ||
*/ | ||
registrationNameModules: {}, | ||
@@ -252,2 +265,10 @@ | ||
EventPluginRegistry.plugins.length = 0; | ||
var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; | ||
for (var eventName in eventNameDispatchConfigs) { | ||
if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { | ||
delete eventNameDispatchConfigs[eventName]; | ||
} | ||
} | ||
var registrationNameModules = EventPluginRegistry.registrationNameModules; | ||
@@ -254,0 +275,0 @@ for (var registrationName in registrationNameModules) { |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -19,2 +19,4 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
"use strict"; | ||
/** | ||
@@ -31,3 +33,3 @@ * Use invariant() to assert state which your program assumes to be true. | ||
function invariant(condition) { | ||
var invariant = function(condition) { | ||
if (!condition) { | ||
@@ -41,8 +43,6 @@ var error = new Error( | ||
} | ||
} | ||
}; | ||
module.exports = invariant; | ||
if ("production" !== process.env.NODE_ENV) { | ||
var invariantDev = function(condition, format, a, b, c, d, e, f) { | ||
invariant = function(condition, format, a, b, c, d, e, f) { | ||
if (format === undefined) { | ||
@@ -63,4 +63,4 @@ throw new Error('invariant requires an error message argument'); | ||
}; | ||
} | ||
module.exports = invariantDev; | ||
} | ||
module.exports = invariant; |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -93,4 +93,4 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
// internal version. | ||
React.version = '0.9.0-rc1'; | ||
React.version = '0.9.0'; | ||
module.exports = React; |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -55,3 +55,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
* | ||
* @param {array} children | ||
* @param {?*} children Children tree container. | ||
* @param {function(*, int)} forEachFunc. | ||
@@ -111,6 +111,6 @@ * @param {*} forEachContext Context for forEachContext. | ||
* | ||
* @param {array} children | ||
* @param {?*} children Children tree container. | ||
* @param {function(*, int)} mapFunction. | ||
* @param {*} mapContext Context for mapFunction. | ||
* @return {array} mirrored array with mapped children. | ||
* @return {object} Object containing the ordered map of results. | ||
*/ | ||
@@ -117,0 +117,0 @@ function mapChildren(children, func, context) { |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -321,2 +321,4 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs, | ||
registrationNameModules: EventPluginHub.registrationNameModules, | ||
@@ -323,0 +325,0 @@ |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -22,2 +22,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
var PooledClass = require("./PooledClass"); | ||
var ReactEventEmitter = require("./ReactEventEmitter"); | ||
@@ -28,2 +29,3 @@ var ReactInstanceHandles = require("./ReactInstanceHandles"); | ||
var getEventTarget = require("./getEventTarget"); | ||
var mixInto = require("./mixInto"); | ||
@@ -55,2 +57,49 @@ /** | ||
/** | ||
* Calls ReactEventEmitter.handleTopLevel for each node stored in bookKeeping's | ||
* ancestor list. Separated from createTopLevelCallback to avoid try/finally | ||
* deoptimization. | ||
* | ||
* @param {string} topLevelType | ||
* @param {DOMEvent} nativeEvent | ||
* @param {TopLevelCallbackBookKeeping} bookKeeping | ||
*/ | ||
function handleTopLevelImpl(topLevelType, nativeEvent, bookKeeping) { | ||
var topLevelTarget = ReactMount.getFirstReactDOM( | ||
getEventTarget(nativeEvent) | ||
) || window; | ||
// Loop through the hierarchy, in case there's any nested components. | ||
// It's important that we build the array of ancestors before calling any | ||
// event handlers, because event handlers can modify the DOM, leading to | ||
// inconsistencies with ReactMount's node cache. See #1105. | ||
var ancestor = topLevelTarget; | ||
while (ancestor) { | ||
bookKeeping.ancestors.push(ancestor); | ||
ancestor = findParent(ancestor); | ||
} | ||
for (var i = 0, l = bookKeeping.ancestors.length; i < l; i++) { | ||
topLevelTarget = bookKeeping.ancestors[i]; | ||
var topLevelTargetID = ReactMount.getID(topLevelTarget) || ''; | ||
ReactEventEmitter.handleTopLevel( | ||
topLevelType, | ||
topLevelTarget, | ||
topLevelTargetID, | ||
nativeEvent | ||
); | ||
} | ||
} | ||
// Used to store ancestor hierarchy in top level callback | ||
function TopLevelCallbackBookKeeping() { | ||
this.ancestors = []; | ||
} | ||
mixInto(TopLevelCallbackBookKeeping, { | ||
destructor: function() { | ||
this.ancestors.length = 0; | ||
} | ||
}); | ||
PooledClass.addPoolingTo(TopLevelCallbackBookKeeping); | ||
/** | ||
* Top-level callback creator used to implement event handling using delegation. | ||
@@ -91,17 +140,8 @@ * This is used via dependency injection. | ||
} | ||
var topLevelTarget = ReactMount.getFirstReactDOM( | ||
getEventTarget(nativeEvent) | ||
) || window; | ||
// Loop through the hierarchy, in case there's any nested components. | ||
while (topLevelTarget) { | ||
var topLevelTargetID = ReactMount.getID(topLevelTarget) || ''; | ||
ReactEventEmitter.handleTopLevel( | ||
topLevelType, | ||
topLevelTarget, | ||
topLevelTargetID, | ||
nativeEvent | ||
); | ||
topLevelTarget = findParent(topLevelTarget); | ||
var bookKeeping = TopLevelCallbackBookKeeping.getPooled(); | ||
try { | ||
handleTopLevelImpl(topLevelType, nativeEvent, bookKeeping); | ||
} finally { | ||
TopLevelCallbackBookKeeping.release(bookKeeping); | ||
} | ||
@@ -108,0 +148,0 @@ }; |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -148,3 +148,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -157,3 +157,3 @@ 'Invalid %s `%s` of type `%s` supplied to `%s`, expected `%s`.', | ||
expectedType | ||
); | ||
) : null); | ||
} | ||
@@ -172,3 +172,3 @@ return isValid; | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -180,3 +180,3 @@ 'Invalid %s `%s` supplied to `%s`, expected one of %s.', | ||
JSON.stringify(Object.keys(expectedEnum)) | ||
); | ||
) : null); | ||
} | ||
@@ -203,3 +203,3 @@ return isValid; | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -211,3 +211,3 @@ 'Invalid %s `%s` of type `%s` supplied to `%s`, expected `object`.', | ||
componentName | ||
); | ||
) : null); | ||
} | ||
@@ -225,3 +225,3 @@ return isValid; | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -233,3 +233,3 @@ 'Invalid %s `%s` supplied to `%s`, expected instance of `%s`.', | ||
expectedClass.name || ANONYMOUS | ||
); | ||
) : null); | ||
} | ||
@@ -254,3 +254,3 @@ return isValid; | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -261,3 +261,3 @@ 'Invalid %s `%s` supplied to `%s`, expected an array.', | ||
componentName | ||
); | ||
) : null); | ||
} | ||
@@ -275,3 +275,3 @@ return isValid; | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -282,3 +282,3 @@ 'Invalid %s `%s` supplied to `%s`, expected a renderable prop.', | ||
componentName | ||
); | ||
) : null); | ||
} | ||
@@ -296,3 +296,3 @@ return isValid; | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -303,3 +303,3 @@ 'Invalid %s `%s` supplied to `%s`, expected a React component.', | ||
componentName | ||
); | ||
) : null); | ||
} | ||
@@ -324,3 +324,3 @@ return isValid; | ||
} | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -331,3 +331,3 @@ 'Invalid %s `%s` supplied to `%s`.', | ||
componentName || ANONYMOUS | ||
); | ||
) : null); | ||
return isValid; | ||
@@ -354,3 +354,3 @@ }; | ||
if (shouldWarn) { | ||
warning( | ||
("production" !== process.env.NODE_ENV ? warning( | ||
isValid, | ||
@@ -361,3 +361,3 @@ 'Required %s `%s` was not specified in `%s`.', | ||
componentName || ANONYMOUS | ||
); | ||
) : null); | ||
} | ||
@@ -364,0 +364,0 @@ return isValid; |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -32,2 +32,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
var ReactTransitionGroup = require("./ReactTransitionGroup"); | ||
var ReactCSSTransitionGroup = require("./ReactCSSTransitionGroup"); | ||
@@ -46,3 +47,7 @@ var cx = require("./cx"); | ||
if ("production" !== process.env.NODE_ENV) { | ||
React.addons.TestUtils = require("./ReactTestUtils"); | ||
} | ||
module.exports = React; | ||
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2013 Facebook, Inc. | ||
* Copyright 2013-2014 Facebook, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -19,3 +19,6 @@ /** | ||
"use strict"; | ||
var emptyFunction = require("./emptyFunction"); | ||
/** | ||
@@ -27,16 +30,21 @@ * Similar to invariant but only logs a warning if the condition is not met. | ||
*/ | ||
function warning(condition, format ) {var args=Array.prototype.slice.call(arguments,2); | ||
if (format === undefined) { | ||
throw new Error( | ||
'`warning(condition, format, ...args)` requires a warning ' + | ||
'message argument' | ||
); | ||
} | ||
if (!condition) { | ||
var argIndex = 0; | ||
console.warn('Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];})); | ||
} | ||
var warning = emptyFunction; | ||
if ("production" !== process.env.NODE_ENV) { | ||
warning = function(condition, format ) {var args=Array.prototype.slice.call(arguments,2); | ||
if (format === undefined) { | ||
throw new Error( | ||
'`warning(condition, format, ...args)` requires a warning ' + | ||
'message argument' | ||
); | ||
} | ||
if (!condition) { | ||
var argIndex = 0; | ||
console.warn('Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];})); | ||
} | ||
}; | ||
} | ||
module.exports = warning; |
{ | ||
"name": "react", | ||
"version": "0.9.0-rc1", | ||
"description": "React is a JavaScript library for building user interfaces.", | ||
"version": "0.9.0", | ||
"keywords": [ | ||
@@ -30,3 +31,3 @@ "react" | ||
"peerDependencies": { | ||
"envify": "~1.0.1" | ||
"envify": "~1.2.0" | ||
}, | ||
@@ -33,0 +34,0 @@ "browserify": { |
563384
146
16075
187