react-source 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/build/JSXTransformer.js +1 -1
- data/build/react-with-addons.js +30 -12
- data/build/react-with-addons.min.js +5 -5
- data/build/react.js +27 -10
- data/build/react.min.js +4 -4
- metadata +2 -2
data/build/react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* React v0.5.
|
2
|
+
* React v0.5.1
|
3
3
|
*/
|
4
4
|
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.React=e():"undefined"!=typeof global?global.React=e():"undefined"!=typeof self&&(self.React=e())}(function(){var define,module,exports;
|
5
5
|
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(require,module,exports){
|
@@ -1609,7 +1609,7 @@ var Danger = {
|
|
1609
1609
|
|
1610
1610
|
invariant(
|
1611
1611
|
resultList.length === markupList.length,
|
1612
|
-
'Danger: Expected markup to render %
|
1612
|
+
'Danger: Expected markup to render %s nodes, but rendered %s.',
|
1613
1613
|
markupList.length,
|
1614
1614
|
resultList.length
|
1615
1615
|
);
|
@@ -1707,7 +1707,7 @@ var DefaultDOMPropertyConfig = {
|
|
1707
1707
|
data: null, // For `<object />` acts as `src`.
|
1708
1708
|
dateTime: MUST_USE_ATTRIBUTE,
|
1709
1709
|
dir: null,
|
1710
|
-
disabled:
|
1710
|
+
disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
|
1711
1711
|
draggable: null,
|
1712
1712
|
encType: null,
|
1713
1713
|
form: MUST_USE_ATTRIBUTE,
|
@@ -3292,7 +3292,7 @@ var React = {
|
|
3292
3292
|
|
3293
3293
|
// Version exists only in the open-source version of React, not in Facebook's
|
3294
3294
|
// internal version.
|
3295
|
-
React.version = '0.5.
|
3295
|
+
React.version = '0.5.1';
|
3296
3296
|
|
3297
3297
|
module.exports = React;
|
3298
3298
|
|
@@ -8666,6 +8666,10 @@ var ReactMount = {
|
|
8666
8666
|
unmountComponentFromNode: function(instance, container) {
|
8667
8667
|
instance.unmountComponent();
|
8668
8668
|
|
8669
|
+
if (container.nodeType === DOC_NODE_TYPE) {
|
8670
|
+
container = container.documentElement;
|
8671
|
+
}
|
8672
|
+
|
8669
8673
|
// http://jsperf.com/emptying-a-node
|
8670
8674
|
while (container.lastChild) {
|
8671
8675
|
container.removeChild(container.lastChild);
|
@@ -8828,6 +8832,8 @@ var ReactMount = {
|
|
8828
8832
|
|
8829
8833
|
ATTR_NAME: ATTR_NAME,
|
8830
8834
|
|
8835
|
+
getReactRootID: getReactRootID,
|
8836
|
+
|
8831
8837
|
getID: getID,
|
8832
8838
|
|
8833
8839
|
setID: setID,
|
@@ -10427,6 +10433,7 @@ var EventConstants = require("./EventConstants");
|
|
10427
10433
|
var EventPluginHub = require("./EventPluginHub");
|
10428
10434
|
var EventPropagators = require("./EventPropagators");
|
10429
10435
|
var ExecutionEnvironment = require("./ExecutionEnvironment");
|
10436
|
+
var ReactInputSelection = require("./ReactInputSelection");
|
10430
10437
|
var SyntheticEvent = require("./SyntheticEvent");
|
10431
10438
|
|
10432
10439
|
var getActiveElement = require("./getActiveElement");
|
@@ -10470,7 +10477,8 @@ var mouseDown = false;
|
|
10470
10477
|
* @param {object}
|
10471
10478
|
*/
|
10472
10479
|
function getSelection(node) {
|
10473
|
-
if ('selectionStart' in node
|
10480
|
+
if ('selectionStart' in node &&
|
10481
|
+
ReactInputSelection.hasSelectionCapabilities(node)) {
|
10474
10482
|
return {
|
10475
10483
|
start: node.selectionStart,
|
10476
10484
|
end: node.selectionEnd
|
@@ -10585,14 +10593,12 @@ var SelectEventPlugin = {
|
|
10585
10593
|
activeElement = topLevelTarget;
|
10586
10594
|
activeElementID = topLevelTargetID;
|
10587
10595
|
lastSelection = null;
|
10588
|
-
mouseDown = false;
|
10589
10596
|
}
|
10590
10597
|
break;
|
10591
10598
|
case topLevelTypes.topBlur:
|
10592
10599
|
activeElement = null;
|
10593
10600
|
activeElementID = null;
|
10594
10601
|
lastSelection = null;
|
10595
|
-
mouseDown = false;
|
10596
10602
|
break;
|
10597
10603
|
|
10598
10604
|
// Don't fire the event while the user is dragging. This matches the
|
@@ -10623,7 +10629,7 @@ var SelectEventPlugin = {
|
|
10623
10629
|
|
10624
10630
|
module.exports = SelectEventPlugin;
|
10625
10631
|
|
10626
|
-
},{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./SyntheticEvent":65,"./getActiveElement":88,"./isEventSupported":96,"./isTextInputElement":98,"./keyOf":102,"./shallowEqual":113}],62:[function(require,module,exports){
|
10632
|
+
},{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":46,"./SyntheticEvent":65,"./getActiveElement":88,"./isEventSupported":96,"./isTextInputElement":98,"./keyOf":102,"./shallowEqual":113}],62:[function(require,module,exports){
|
10627
10633
|
/**
|
10628
10634
|
* Copyright 2013 Facebook, Inc.
|
10629
10635
|
*
|
@@ -13006,12 +13012,23 @@ module.exports = getNodeForCharacterOffset;
|
|
13006
13012
|
|
13007
13013
|
"use strict";
|
13008
13014
|
|
13015
|
+
var DOC_NODE_TYPE = 9;
|
13016
|
+
|
13009
13017
|
/**
|
13010
|
-
* @param {DOMElement} container DOM element that may contain
|
13018
|
+
* @param {DOMElement|DOMDocument} container DOM element that may contain
|
13019
|
+
* a React component
|
13011
13020
|
* @return {?*} DOM element that may have the reactRoot ID, or null.
|
13012
13021
|
*/
|
13013
13022
|
function getReactRootElementInContainer(container) {
|
13014
|
-
|
13023
|
+
if (!container) {
|
13024
|
+
return null;
|
13025
|
+
}
|
13026
|
+
|
13027
|
+
if (container.nodeType === DOC_NODE_TYPE) {
|
13028
|
+
return container.documentElement;
|
13029
|
+
} else {
|
13030
|
+
return container.firstChild;
|
13031
|
+
}
|
13015
13032
|
}
|
13016
13033
|
|
13017
13034
|
module.exports = getReactRootElementInContainer;
|