Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
v0.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zpao committed Jul 25, 2014
1 parent 14681ea commit b40055e
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 36 deletions.
4 changes: 1 addition & 3 deletions JSXTransformer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* JSXTransformer v0.11.0
* JSXTransformer v0.11.1
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/*!
Expand Down Expand Up @@ -12427,8 +12427,6 @@ var docblock = _dereq_('jstransform/src/docblock');
var transform = _dereq_('jstransform').transform;
var visitors = _dereq_('./fbtransform/visitors');

var runScripts;
var loadScripts;
var headEl;
var dummyAnchor;
var inlineScriptCount = 0;
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react",
"version": "0.11.0",
"version": "0.11.1",
"main": "react.js"
}
38 changes: 27 additions & 11 deletions react-with-addons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* React (with addons) v0.11.0
* React (with addons) v0.11.1
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
Expand Down Expand Up @@ -4367,7 +4367,7 @@ if ("production" !== "development") {

// Version exists only in the open-source version of React, not in Facebook's
// internal version.
React.version = '0.11.0';
React.version = '0.11.1';

module.exports = React;

Expand Down Expand Up @@ -6644,7 +6644,15 @@ var ReactCompositeComponentMixin = {
replaceState: function(completeState, callback) {
validateLifeCycleOnReplaceState(this);
this._pendingState = completeState;
ReactUpdates.enqueueUpdate(this, callback);
if (this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING) {
// If we're in a componentWillMount handler, don't enqueue a rerender
// because ReactUpdates assumes we're in a browser context (which is wrong
// for server rendering) and we're about to do a render anyway.
// TODO: The callback here is ignored when setState is called from
// componentWillMount. Either fix it or disallow doing so completely in
// favor of getInitialState.
ReactUpdates.enqueueUpdate(this, callback);
}
},

/**
Expand Down Expand Up @@ -16489,7 +16497,7 @@ var MouseEventInterface = {
shiftKey: null,
altKey: null,
metaKey: null,
getEventModifierState: getEventModifierState,
getModifierState: getEventModifierState,
button: function(event) {
// Webkit, Firefox, IE9+
// which: 1 2 3
Expand Down Expand Up @@ -18084,10 +18092,10 @@ module.exports = getEventKey;
*/

var modifierKeyToProp = {
'alt': 'altKey',
'control': 'ctrlKey',
'meta': 'metaKey',
'shift': 'shiftKey'
'Alt': 'altKey',
'Control': 'ctrlKey',
'Meta': 'metaKey',
'Shift': 'shiftKey'
};

// IE8 does not implement getModifierState so we simply map it to the only
Expand All @@ -18100,8 +18108,8 @@ function modifierStateGetter(keyArg) {
if (nativeEvent.getModifierState) {
return nativeEvent.getModifierState(keyArg);
}
var keyProp = modifierKeyToProp[keyArg.toLowerCase()];
return keyProp && nativeEvent[keyProp];
var keyProp = modifierKeyToProp[keyArg];
return keyProp ? !!nativeEvent[keyProp] : false;
}

function getEventModifierState(nativeEvent) {
Expand Down Expand Up @@ -19628,7 +19636,15 @@ if (ExecutionEnvironment.canUseDOM) {
// Recover leading whitespace by temporarily prepending any character.
// \uFEFF has the potential advantage of being zero-width/invisible.
node.innerHTML = '\uFEFF' + html;
node.firstChild.deleteData(0, 1);

// deleteData leaves an empty `TextNode` which offsets the index of all
// children. Definitely want to avoid this.
var textNode = node.firstChild;
if (textNode.data.length === 1) {
node.removeChild(textNode);
} else {
textNode.deleteData(0, 1);
}
} else {
node.innerHTML = html;
}
Expand Down
12 changes: 6 additions & 6 deletions react-with-addons.min.js

Large diffs are not rendered by default.

38 changes: 27 additions & 11 deletions react.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* React v0.11.0
* React v0.11.1
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
Expand Down Expand Up @@ -4202,7 +4202,7 @@ if ("production" !== "development") {

// Version exists only in the open-source version of React, not in Facebook's
// internal version.
React.version = '0.11.0';
React.version = '0.11.1';

module.exports = React;

Expand Down Expand Up @@ -6217,7 +6217,15 @@ var ReactCompositeComponentMixin = {
replaceState: function(completeState, callback) {
validateLifeCycleOnReplaceState(this);
this._pendingState = completeState;
ReactUpdates.enqueueUpdate(this, callback);
if (this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING) {
// If we're in a componentWillMount handler, don't enqueue a rerender
// because ReactUpdates assumes we're in a browser context (which is wrong
// for server rendering) and we're about to do a render anyway.
// TODO: The callback here is ignored when setState is called from
// componentWillMount. Either fix it or disallow doing so completely in
// favor of getInitialState.
ReactUpdates.enqueueUpdate(this, callback);
}
},

/**
Expand Down Expand Up @@ -14979,7 +14987,7 @@ var MouseEventInterface = {
shiftKey: null,
altKey: null,
metaKey: null,
getEventModifierState: getEventModifierState,
getModifierState: getEventModifierState,
button: function(event) {
// Webkit, Firefox, IE9+
// which: 1 2 3
Expand Down Expand Up @@ -16465,10 +16473,10 @@ module.exports = getEventKey;
*/

var modifierKeyToProp = {
'alt': 'altKey',
'control': 'ctrlKey',
'meta': 'metaKey',
'shift': 'shiftKey'
'Alt': 'altKey',
'Control': 'ctrlKey',
'Meta': 'metaKey',
'Shift': 'shiftKey'
};

// IE8 does not implement getModifierState so we simply map it to the only
Expand All @@ -16481,8 +16489,8 @@ function modifierStateGetter(keyArg) {
if (nativeEvent.getModifierState) {
return nativeEvent.getModifierState(keyArg);
}
var keyProp = modifierKeyToProp[keyArg.toLowerCase()];
return keyProp && nativeEvent[keyProp];
var keyProp = modifierKeyToProp[keyArg];
return keyProp ? !!nativeEvent[keyProp] : false;
}

function getEventModifierState(nativeEvent) {
Expand Down Expand Up @@ -18009,7 +18017,15 @@ if (ExecutionEnvironment.canUseDOM) {
// Recover leading whitespace by temporarily prepending any character.
// \uFEFF has the potential advantage of being zero-width/invisible.
node.innerHTML = '\uFEFF' + html;
node.firstChild.deleteData(0, 1);

// deleteData leaves an empty `TextNode` which offsets the index of all
// children. Definitely want to avoid this.
var textNode = node.firstChild;
if (textNode.data.length === 1) {
node.removeChild(textNode);
} else {
textNode.deleteData(0, 1);
}
} else {
node.innerHTML = html;
}
Expand Down
8 changes: 4 additions & 4 deletions react.min.js

Large diffs are not rendered by default.

0 comments on commit b40055e

Please sign in to comment.