react 0.14.0-beta1 → 0.14.0-beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/addons.js +5 -2
  2. package/dist/JSXTransformer.js +588 -227
  3. package/dist/react-with-addons.js +3118 -2707
  4. package/dist/react-with-addons.min.js +6 -6
  5. package/dist/react.js +3713 -3317
  6. package/dist/react.min.js +6 -5
  7. package/lib/AutoFocusUtils.js +3 -3
  8. package/lib/BeforeInputEventPlugin.js +13 -13
  9. package/lib/CSSProperty.js +3 -0
  10. package/lib/CSSPropertyOperations.js +13 -13
  11. package/lib/CallbackQueue.js +4 -4
  12. package/lib/ChangeEventPlugin.js +12 -12
  13. package/lib/DOMChildrenOperations.js +10 -6
  14. package/lib/DOMProperty.js +8 -8
  15. package/lib/DOMPropertyOperations.js +9 -9
  16. package/lib/Danger.js +14 -14
  17. package/lib/DefaultEventPluginOrder.js +2 -2
  18. package/lib/EnterLeaveEventPlugin.js +5 -5
  19. package/lib/EventConstants.js +23 -1
  20. package/lib/EventPluginHub.js +11 -11
  21. package/lib/EventPluginRegistry.js +8 -8
  22. package/lib/EventPluginUtils.js +11 -11
  23. package/lib/EventPropagators.js +7 -7
  24. package/lib/FallbackCompositionState.js +3 -3
  25. package/lib/HTMLDOMPropertyConfig.js +4 -2
  26. package/lib/LinkedStateMixin.js +2 -2
  27. package/lib/LinkedValueUtils.js +8 -8
  28. package/lib/MetaMatchers.js +118 -0
  29. package/lib/OrderedMap.js +453 -0
  30. package/lib/PooledClass.js +2 -2
  31. package/lib/React.js +6 -6
  32. package/lib/ReactBrowserComponentMixin.js +4 -4
  33. package/lib/ReactBrowserEventEmitter.js +30 -7
  34. package/lib/ReactCSSTransitionGroup.js +16 -5
  35. package/lib/ReactCSSTransitionGroupChild.js +12 -11
  36. package/lib/ReactChildReconciler.js +25 -18
  37. package/lib/ReactChildren.js +6 -6
  38. package/lib/ReactClass.js +42 -42
  39. package/lib/ReactComponent.js +13 -13
  40. package/lib/ReactComponentBrowserEnvironment.js +2 -2
  41. package/lib/ReactComponentEnvironment.js +2 -2
  42. package/lib/ReactComponentWithPureRenderMixin.js +1 -1
  43. package/lib/ReactCompositeComponent.js +38 -38
  44. package/lib/ReactDOM.js +72 -159
  45. package/lib/ReactDOMComponent.js +104 -60
  46. package/lib/ReactDOMFactories.js +177 -0
  47. package/lib/ReactDOMIDOperations.js +10 -24
  48. package/lib/ReactDOMInput.js +8 -8
  49. package/lib/ReactDOMOption.js +7 -7
  50. package/lib/ReactDOMSelect.js +8 -8
  51. package/lib/ReactDOMSelection.js +3 -3
  52. package/lib/ReactDOMServer.js +2 -2
  53. package/lib/ReactDOMTextComponent.js +11 -11
  54. package/lib/ReactDOMTextarea.js +11 -11
  55. package/lib/ReactDefaultBatchingStrategy.js +4 -4
  56. package/lib/ReactDefaultInjection.js +24 -24
  57. package/lib/ReactDefaultPerf.js +7 -7
  58. package/lib/ReactDefaultPerfAnalysis.js +6 -9
  59. package/lib/ReactElement.js +4 -4
  60. package/lib/ReactElementValidator.js +21 -21
  61. package/lib/ReactEmptyComponent.js +4 -4
  62. package/lib/ReactEventEmitterMixin.js +1 -1
  63. package/lib/ReactEventListener.js +19 -14
  64. package/lib/ReactFragment.js +11 -11
  65. package/lib/ReactInjection.js +11 -11
  66. package/lib/ReactInputSelection.js +4 -4
  67. package/lib/ReactInstanceHandles.js +10 -11
  68. package/lib/ReactIsomorphic.js +11 -11
  69. package/lib/ReactLink.js +1 -1
  70. package/lib/ReactMarkupChecksum.js +6 -2
  71. package/lib/ReactMount.js +68 -48
  72. package/lib/ReactMultiChild.js +83 -22
  73. package/lib/ReactMultiChildUpdateTypes.js +2 -1
  74. package/lib/ReactNativeComponent.js +3 -3
  75. package/lib/ReactNoopUpdateQueue.js +3 -3
  76. package/lib/ReactOwner.js +3 -3
  77. package/lib/ReactPerf.js +2 -2
  78. package/lib/ReactPropTransferer.js +3 -3
  79. package/lib/ReactPropTypeLocationNames.js +1 -1
  80. package/lib/ReactPropTypeLocations.js +1 -1
  81. package/lib/ReactPropTypes.js +34 -8
  82. package/lib/ReactReconcileTransaction.js +6 -6
  83. package/lib/ReactReconciler.js +12 -12
  84. package/lib/ReactRef.js +1 -1
  85. package/lib/ReactServerBatchingStrategy.js +5 -5
  86. package/lib/ReactServerRendering.js +12 -12
  87. package/lib/ReactServerRenderingTransaction.js +5 -5
  88. package/lib/ReactTestUtils.js +26 -27
  89. package/lib/ReactTransitionChildMapping.js +2 -2
  90. package/lib/ReactTransitionEvents.js +1 -1
  91. package/lib/ReactTransitionGroup.js +5 -6
  92. package/lib/ReactUpdateQueue.js +17 -17
  93. package/lib/ReactUpdates.js +14 -14
  94. package/lib/ReactWithAddons.js +14 -14
  95. package/lib/ResponderEventPlugin.js +514 -0
  96. package/lib/ResponderSyntheticEvent.js +40 -0
  97. package/lib/ResponderTouchHistoryStore.js +180 -0
  98. package/lib/SVGDOMPropertyConfig.js +1 -1
  99. package/lib/SelectEventPlugin.js +9 -9
  100. package/lib/SimpleEventPlugin.js +201 -25
  101. package/lib/SyntheticClipboardEvent.js +1 -1
  102. package/lib/SyntheticCompositionEvent.js +1 -1
  103. package/lib/SyntheticDragEvent.js +1 -1
  104. package/lib/SyntheticEvent.js +3 -3
  105. package/lib/SyntheticFocusEvent.js +1 -1
  106. package/lib/SyntheticInputEvent.js +1 -1
  107. package/lib/SyntheticKeyboardEvent.js +4 -4
  108. package/lib/SyntheticMouseEvent.js +3 -3
  109. package/lib/SyntheticTouchEvent.js +2 -2
  110. package/lib/SyntheticUIEvent.js +2 -2
  111. package/lib/SyntheticWheelEvent.js +1 -1
  112. package/lib/TapEventPlugin.js +119 -0
  113. package/lib/Transaction.js +6 -6
  114. package/lib/accumulate.js +44 -0
  115. package/lib/accumulateInto.js +2 -2
  116. package/lib/adler32.js +19 -7
  117. package/lib/cloneWithProps.js +11 -6
  118. package/lib/createHierarchyRenderer.js +85 -0
  119. package/lib/dangerousStyleValue.js +1 -1
  120. package/lib/deprecated.js +4 -4
  121. package/lib/findDOMNode.js +9 -9
  122. package/lib/flattenChildren.js +4 -4
  123. package/lib/getEventKey.js +1 -1
  124. package/lib/getTestDocument.js +28 -0
  125. package/lib/getTextContentAccessor.js +1 -1
  126. package/lib/instantiateReactComponent.js +12 -12
  127. package/lib/isEventSupported.js +1 -1
  128. package/lib/onlyChild.js +3 -3
  129. package/lib/quoteAttributeValueForBrowser.js +1 -1
  130. package/lib/reactComponentExpect.js +210 -0
  131. package/lib/renderSubtreeIntoContainer.js +1 -1
  132. package/lib/setInnerHTML.js +1 -1
  133. package/lib/setTextContent.js +3 -3
  134. package/lib/shallowCompare.js +1 -1
  135. package/lib/sliceChildren.js +51 -0
  136. package/lib/traverseAllChildren.js +14 -13
  137. package/lib/update.js +13 -13
  138. package/lib/validateDOMNesting.js +6 -6
  139. package/lib/webcomponents.js +6379 -0
  140. package/package.json +4 -6
  141. package/react.js +1 -1
  142. package/lib/CSSCore.js +0 -97
  143. package/lib/EventListener.js +0 -84
  144. package/lib/ExecutionEnvironment.js +0 -38
  145. package/lib/ReactDOMClient.js +0 -90
  146. package/lib/camelize.js +0 -32
  147. package/lib/camelizeStyleName.js +0 -40
  148. package/lib/containsNode.js +0 -55
  149. package/lib/createArrayFromMixed.js +0 -85
  150. package/lib/createNodesFromMarkup.js +0 -84
  151. package/lib/emptyFunction.js +0 -38
  152. package/lib/emptyObject.js +0 -20
  153. package/lib/focusNode.js +0 -26
  154. package/lib/getActiveElement.js +0 -29
  155. package/lib/getMarkupWrap.js +0 -93
  156. package/lib/getUnboundedScrollPosition.js +0 -38
  157. package/lib/hyphenate.js +0 -33
  158. package/lib/hyphenateStyleName.js +0 -39
  159. package/lib/invariant.js +0 -49
  160. package/lib/isNode.js +0 -23
  161. package/lib/isTextNode.js +0 -25
  162. package/lib/keyMirror.js +0 -48
  163. package/lib/keyOf.js +0 -35
  164. package/lib/mapObject.js +0 -51
  165. package/lib/performance.js +0 -23
  166. package/lib/performanceNow.js +0 -28
  167. package/lib/shallowEqual.js +0 -48
  168. package/lib/toArray.js +0 -57
  169. package/lib/warning.js +0 -57
@@ -12,17 +12,16 @@
12
12
 
13
13
  'use strict';
14
14
 
15
- var CSSPropertyOperations = require("./CSSPropertyOperations");
16
- var DOMChildrenOperations = require("./DOMChildrenOperations");
17
- var DOMPropertyOperations = require("./DOMPropertyOperations");
18
- var ReactMount = require("./ReactMount");
19
- var ReactPerf = require("./ReactPerf");
15
+ var CSSPropertyOperations = require('./CSSPropertyOperations');
16
+ var DOMChildrenOperations = require('./DOMChildrenOperations');
17
+ var DOMPropertyOperations = require('./DOMPropertyOperations');
18
+ var ReactMount = require('./ReactMount');
19
+ var ReactPerf = require('./ReactPerf');
20
20
 
21
- var invariant = require("./invariant");
22
- var setInnerHTML = require("./setInnerHTML");
21
+ var invariant = require('fbjs/lib/invariant');
23
22
 
24
23
  /**
25
- * Errors for properties that should not be updated with `updatePropertyById()`.
24
+ * Errors for properties that should not be updated with `updatePropertyByID()`.
26
25
  *
27
26
  * @type {object}
28
27
  * @private
@@ -49,7 +48,7 @@ var ReactDOMIDOperations = {
49
48
  */
50
49
  updatePropertyByID: function (id, name, value) {
51
50
  var node = ReactMount.getNode(id);
52
- !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? 'production' !== process.env.NODE_ENV ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
51
+ !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
53
52
 
54
53
  // If we're updating to null or undefined, we should remove the property
55
54
  // from the DOM node instead of inadvertantly setting to a string. This
@@ -71,7 +70,7 @@ var ReactDOMIDOperations = {
71
70
  */
72
71
  updateAttributeByID: function (id, name, value) {
73
72
  var node = ReactMount.getNode(id);
74
- !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? 'production' !== process.env.NODE_ENV ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
73
+ !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
75
74
  DOMPropertyOperations.setValueForAttribute(node, name, value);
76
75
  },
77
76
 
@@ -85,7 +84,7 @@ var ReactDOMIDOperations = {
85
84
  */
86
85
  deletePropertyByID: function (id, name, value) {
87
86
  var node = ReactMount.getNode(id);
88
- !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? 'production' !== process.env.NODE_ENV ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
87
+ !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
89
88
  DOMPropertyOperations.deleteValueForProperty(node, name, value);
90
89
  },
91
90
 
@@ -102,18 +101,6 @@ var ReactDOMIDOperations = {
102
101
  CSSPropertyOperations.setValueForStyles(node, styles);
103
102
  },
104
103
 
105
- /**
106
- * Updates a DOM node's innerHTML.
107
- *
108
- * @param {string} id ID of the node to update.
109
- * @param {string} html An HTML string.
110
- * @internal
111
- */
112
- updateInnerHTMLByID: function (id, html) {
113
- var node = ReactMount.getNode(id);
114
- setInnerHTML(node, html);
115
- },
116
-
117
104
  /**
118
105
  * Updates a DOM node's text content set by `props.content`.
119
106
  *
@@ -158,7 +145,6 @@ ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
158
145
  updatePropertyByID: 'updatePropertyByID',
159
146
  deletePropertyByID: 'deletePropertyByID',
160
147
  updateStylesByID: 'updateStylesByID',
161
- updateInnerHTMLByID: 'updateInnerHTMLByID',
162
148
  updateTextContentByID: 'updateTextContentByID',
163
149
  dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID',
164
150
  dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates'
@@ -11,13 +11,13 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var ReactDOMIDOperations = require("./ReactDOMIDOperations");
15
- var LinkedValueUtils = require("./LinkedValueUtils");
16
- var ReactMount = require("./ReactMount");
17
- var ReactUpdates = require("./ReactUpdates");
14
+ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
15
+ var LinkedValueUtils = require('./LinkedValueUtils');
16
+ var ReactMount = require('./ReactMount');
17
+ var ReactUpdates = require('./ReactUpdates');
18
18
 
19
- var assign = require("./Object.assign");
20
- var invariant = require("./invariant");
19
+ var assign = require('./Object.assign');
20
+ var invariant = require('fbjs/lib/invariant');
21
21
 
22
22
  var instancesByReactID = {};
23
23
 
@@ -128,9 +128,9 @@ function _handleChange(event) {
128
128
  continue;
129
129
  }
130
130
  var otherID = ReactMount.getID(otherNode);
131
- !otherID ? 'production' !== process.env.NODE_ENV ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.') : invariant(false) : undefined;
131
+ !otherID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.') : invariant(false) : undefined;
132
132
  var otherInstance = instancesByReactID[otherID];
133
- !otherInstance ? 'production' !== process.env.NODE_ENV ? invariant(false, 'ReactDOMInput: Unknown radio button ID %s.', otherID) : invariant(false) : undefined;
133
+ !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Unknown radio button ID %s.', otherID) : invariant(false) : undefined;
134
134
  // If this is a controlled radio button group, forcing the input that
135
135
  // was previously checked to update will cause it to be come re-checked
136
136
  // as appropriate.
@@ -11,11 +11,11 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var ReactChildren = require("./ReactChildren");
15
- var ReactDOMSelect = require("./ReactDOMSelect");
14
+ var ReactChildren = require('./ReactChildren');
15
+ var ReactDOMSelect = require('./ReactDOMSelect');
16
16
 
17
- var assign = require("./Object.assign");
18
- var warning = require("./warning");
17
+ var assign = require('./Object.assign');
18
+ var warning = require('fbjs/lib/warning');
19
19
 
20
20
  var valueContextKey = ReactDOMSelect.valueContextKey;
21
21
 
@@ -25,8 +25,8 @@ var valueContextKey = ReactDOMSelect.valueContextKey;
25
25
  var ReactDOMOption = {
26
26
  mountWrapper: function (inst, props, context) {
27
27
  // TODO (yungsters): Remove support for `selected` in <option>.
28
- if ('production' !== process.env.NODE_ENV) {
29
- 'production' !== process.env.NODE_ENV ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : undefined;
28
+ if (process.env.NODE_ENV !== 'production') {
29
+ process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : undefined;
30
30
  }
31
31
 
32
32
  // Look up whether this option is 'selected' via context
@@ -73,7 +73,7 @@ var ReactDOMOption = {
73
73
  if (typeof child === 'string' || typeof child === 'number') {
74
74
  content += child;
75
75
  } else {
76
- 'production' !== process.env.NODE_ENV ? warning(false, 'Only strings and numbers are supported as <option> children.') : undefined;
76
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : undefined;
77
77
  }
78
78
  });
79
79
 
@@ -11,12 +11,12 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var LinkedValueUtils = require("./LinkedValueUtils");
15
- var ReactMount = require("./ReactMount");
16
- var ReactUpdates = require("./ReactUpdates");
14
+ var LinkedValueUtils = require('./LinkedValueUtils');
15
+ var ReactMount = require('./ReactMount');
16
+ var ReactUpdates = require('./ReactUpdates');
17
17
 
18
- var assign = require("./Object.assign");
19
- var warning = require("./warning");
18
+ var assign = require('./Object.assign');
19
+ var warning = require('fbjs/lib/warning');
20
20
 
21
21
  var valueContextKey = '__ReactDOMSelect_value$' + Math.random().toString(36).slice(2);
22
22
 
@@ -59,9 +59,9 @@ function checkSelectPropTypes(inst, props) {
59
59
  continue;
60
60
  }
61
61
  if (props.multiple) {
62
- 'production' !== process.env.NODE_ENV ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
62
+ process.env.NODE_ENV !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
63
63
  } else {
64
- 'production' !== process.env.NODE_ENV ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
64
+ process.env.NODE_ENV !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
65
65
  }
66
66
  }
67
67
  }
@@ -129,7 +129,7 @@ var ReactDOMSelect = {
129
129
  },
130
130
 
131
131
  mountWrapper: function (inst, props) {
132
- if ('production' !== process.env.NODE_ENV) {
132
+ if (process.env.NODE_ENV !== 'production') {
133
133
  checkSelectPropTypes(inst, props);
134
134
  }
135
135
 
@@ -11,10 +11,10 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var ExecutionEnvironment = require("./ExecutionEnvironment");
14
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
15
15
 
16
- var getNodeForCharacterOffset = require("./getNodeForCharacterOffset");
17
- var getTextContentAccessor = require("./getTextContentAccessor");
16
+ var getNodeForCharacterOffset = require('./getNodeForCharacterOffset');
17
+ var getTextContentAccessor = require('./getTextContentAccessor');
18
18
 
19
19
  /**
20
20
  * While `isCollapsed` is available on the Selection object and `collapsed`
@@ -11,8 +11,8 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var ReactDefaultInjection = require("./ReactDefaultInjection");
15
- var ReactServerRendering = require("./ReactServerRendering");
14
+ var ReactDefaultInjection = require('./ReactDefaultInjection');
15
+ var ReactServerRendering = require('./ReactServerRendering');
16
16
 
17
17
  ReactDefaultInjection.inject();
18
18
 
@@ -12,13 +12,13 @@
12
12
 
13
13
  'use strict';
14
14
 
15
- var DOMPropertyOperations = require("./DOMPropertyOperations");
16
- var ReactComponentBrowserEnvironment = require("./ReactComponentBrowserEnvironment");
17
- var ReactDOMComponent = require("./ReactDOMComponent");
15
+ var DOMPropertyOperations = require('./DOMPropertyOperations');
16
+ var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
17
+ var ReactDOMComponent = require('./ReactDOMComponent');
18
18
 
19
- var assign = require("./Object.assign");
20
- var escapeTextContentForBrowser = require("./escapeTextContentForBrowser");
21
- var validateDOMNesting = require("./validateDOMNesting");
19
+ var assign = require('./Object.assign');
20
+ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
21
+ var validateDOMNesting = require('./validateDOMNesting');
22
22
 
23
23
  /**
24
24
  * Text nodes violate a couple assumptions that React makes about components:
@@ -35,7 +35,9 @@ var validateDOMNesting = require("./validateDOMNesting");
35
35
  * @extends ReactComponent
36
36
  * @internal
37
37
  */
38
- var ReactDOMTextComponent = function (props) {};
38
+ var ReactDOMTextComponent = function (props) {
39
+ // This constructor and its argument is currently used by mocks.
40
+ };
39
41
 
40
42
  assign(ReactDOMTextComponent.prototype, {
41
43
 
@@ -63,7 +65,7 @@ assign(ReactDOMTextComponent.prototype, {
63
65
  * @internal
64
66
  */
65
67
  mountComponent: function (rootID, transaction, context) {
66
- if ('production' !== process.env.NODE_ENV) {
68
+ if (process.env.NODE_ENV !== 'production') {
67
69
  if (context[validateDOMNesting.ancestorInfoContextKey]) {
68
70
  validateDOMNesting('span', null, context[validateDOMNesting.ancestorInfoContextKey]);
69
71
  }
@@ -109,6 +111,4 @@ assign(ReactDOMTextComponent.prototype, {
109
111
 
110
112
  });
111
113
 
112
- module.exports = ReactDOMTextComponent;
113
-
114
- // This constructor and its argument is currently used by mocks.
114
+ module.exports = ReactDOMTextComponent;
@@ -11,13 +11,13 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var LinkedValueUtils = require("./LinkedValueUtils");
15
- var ReactDOMIDOperations = require("./ReactDOMIDOperations");
16
- var ReactUpdates = require("./ReactUpdates");
14
+ var LinkedValueUtils = require('./LinkedValueUtils');
15
+ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
16
+ var ReactUpdates = require('./ReactUpdates');
17
17
 
18
- var assign = require("./Object.assign");
19
- var invariant = require("./invariant");
20
- var warning = require("./warning");
18
+ var assign = require('./Object.assign');
19
+ var invariant = require('fbjs/lib/invariant');
20
+ var warning = require('fbjs/lib/warning');
21
21
 
22
22
  function forceUpdateIfMounted() {
23
23
  if (this._rootNodeID) {
@@ -43,7 +43,7 @@ function forceUpdateIfMounted() {
43
43
  */
44
44
  var ReactDOMTextarea = {
45
45
  getNativeProps: function (inst, props, context) {
46
- !(props.dangerouslySetInnerHTML == null) ? 'production' !== process.env.NODE_ENV ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : invariant(false) : undefined;
46
+ !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : invariant(false) : undefined;
47
47
 
48
48
  // Always set children to the same thing. In IE9, the selection range will
49
49
  // get reset if `textContent` is mutated.
@@ -64,12 +64,12 @@ var ReactDOMTextarea = {
64
64
  // TODO (yungsters): Remove support for children content in <textarea>.
65
65
  var children = props.children;
66
66
  if (children != null) {
67
- if ('production' !== process.env.NODE_ENV) {
68
- 'production' !== process.env.NODE_ENV ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : undefined;
67
+ if (process.env.NODE_ENV !== 'production') {
68
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : undefined;
69
69
  }
70
- !(defaultValue == null) ? 'production' !== process.env.NODE_ENV ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : invariant(false) : undefined;
70
+ !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : invariant(false) : undefined;
71
71
  if (Array.isArray(children)) {
72
- !(children.length <= 1) ? 'production' !== process.env.NODE_ENV ? invariant(false, '<textarea> can only have at most one child.') : invariant(false) : undefined;
72
+ !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : invariant(false) : undefined;
73
73
  children = children[0];
74
74
  }
75
75
 
@@ -11,11 +11,11 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var ReactUpdates = require("./ReactUpdates");
15
- var Transaction = require("./Transaction");
14
+ var ReactUpdates = require('./ReactUpdates');
15
+ var Transaction = require('./Transaction');
16
16
 
17
- var assign = require("./Object.assign");
18
- var emptyFunction = require("./emptyFunction");
17
+ var assign = require('./Object.assign');
18
+ var emptyFunction = require('fbjs/lib/emptyFunction');
19
19
 
20
20
  var RESET_BATCHED_UPDATES = {
21
21
  initialize: emptyFunction,
@@ -11,28 +11,28 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var BeforeInputEventPlugin = require("./BeforeInputEventPlugin");
15
- var ChangeEventPlugin = require("./ChangeEventPlugin");
16
- var ClientReactRootIndex = require("./ClientReactRootIndex");
17
- var DefaultEventPluginOrder = require("./DefaultEventPluginOrder");
18
- var EnterLeaveEventPlugin = require("./EnterLeaveEventPlugin");
19
- var ExecutionEnvironment = require("./ExecutionEnvironment");
20
- var HTMLDOMPropertyConfig = require("./HTMLDOMPropertyConfig");
21
- var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");
22
- var ReactComponentBrowserEnvironment = require("./ReactComponentBrowserEnvironment");
23
- var ReactDefaultBatchingStrategy = require("./ReactDefaultBatchingStrategy");
24
- var ReactDOMComponent = require("./ReactDOMComponent");
25
- var ReactDOMIDOperations = require("./ReactDOMIDOperations");
26
- var ReactDOMTextComponent = require("./ReactDOMTextComponent");
27
- var ReactEventListener = require("./ReactEventListener");
28
- var ReactInjection = require("./ReactInjection");
29
- var ReactInstanceHandles = require("./ReactInstanceHandles");
30
- var ReactMount = require("./ReactMount");
31
- var ReactReconcileTransaction = require("./ReactReconcileTransaction");
32
- var SelectEventPlugin = require("./SelectEventPlugin");
33
- var ServerReactRootIndex = require("./ServerReactRootIndex");
34
- var SimpleEventPlugin = require("./SimpleEventPlugin");
35
- var SVGDOMPropertyConfig = require("./SVGDOMPropertyConfig");
14
+ var BeforeInputEventPlugin = require('./BeforeInputEventPlugin');
15
+ var ChangeEventPlugin = require('./ChangeEventPlugin');
16
+ var ClientReactRootIndex = require('./ClientReactRootIndex');
17
+ var DefaultEventPluginOrder = require('./DefaultEventPluginOrder');
18
+ var EnterLeaveEventPlugin = require('./EnterLeaveEventPlugin');
19
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
20
+ var HTMLDOMPropertyConfig = require('./HTMLDOMPropertyConfig');
21
+ var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin');
22
+ var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
23
+ var ReactDefaultBatchingStrategy = require('./ReactDefaultBatchingStrategy');
24
+ var ReactDOMComponent = require('./ReactDOMComponent');
25
+ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
26
+ var ReactDOMTextComponent = require('./ReactDOMTextComponent');
27
+ var ReactEventListener = require('./ReactEventListener');
28
+ var ReactInjection = require('./ReactInjection');
29
+ var ReactInstanceHandles = require('./ReactInstanceHandles');
30
+ var ReactMount = require('./ReactMount');
31
+ var ReactReconcileTransaction = require('./ReactReconcileTransaction');
32
+ var SelectEventPlugin = require('./SelectEventPlugin');
33
+ var ServerReactRootIndex = require('./ServerReactRootIndex');
34
+ var SimpleEventPlugin = require('./SimpleEventPlugin');
35
+ var SVGDOMPropertyConfig = require('./SVGDOMPropertyConfig');
36
36
 
37
37
  var alreadyInjected = false;
38
38
 
@@ -85,10 +85,10 @@ function inject() {
85
85
  ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
86
86
  ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations);
87
87
 
88
- if ('production' !== process.env.NODE_ENV) {
88
+ if (process.env.NODE_ENV !== 'production') {
89
89
  var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
90
90
  if (/[?&]react_perf\b/.test(url)) {
91
- var ReactDefaultPerf = require("./ReactDefaultPerf");
91
+ var ReactDefaultPerf = require('./ReactDefaultPerf');
92
92
  ReactDefaultPerf.start();
93
93
  }
94
94
  }
@@ -12,12 +12,12 @@
12
12
 
13
13
  'use strict';
14
14
 
15
- var DOMProperty = require("./DOMProperty");
16
- var ReactDefaultPerfAnalysis = require("./ReactDefaultPerfAnalysis");
17
- var ReactMount = require("./ReactMount");
18
- var ReactPerf = require("./ReactPerf");
15
+ var DOMProperty = require('./DOMProperty');
16
+ var ReactDefaultPerfAnalysis = require('./ReactDefaultPerfAnalysis');
17
+ var ReactMount = require('./ReactMount');
18
+ var ReactPerf = require('./ReactPerf');
19
19
 
20
- var performanceNow = require("./performanceNow");
20
+ var performanceNow = require('fbjs/lib/performanceNow');
21
21
 
22
22
  function roundFloat(val) {
23
23
  return Math.floor(val * 100) / 100;
@@ -103,8 +103,8 @@ var ReactDefaultPerf = {
103
103
  console.table(summary.map(function (item) {
104
104
  var result = {};
105
105
  result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id;
106
- result['type'] = item.type;
107
- result['args'] = JSON.stringify(item.args);
106
+ result.type = item.type;
107
+ result.args = JSON.stringify(item.args);
108
108
  return result;
109
109
  }));
110
110
  console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms');
@@ -11,7 +11,7 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var assign = require("./Object.assign");
14
+ var assign = require('./Object.assign');
15
15
 
16
16
  // Don't try to save users less than 1.2ms (a number I made up)
17
17
  var DONT_CARE_THRESHOLD = 1.2;
@@ -20,11 +20,11 @@ var DOM_OPERATION_TYPES = {
20
20
  INSERT_MARKUP: 'set innerHTML',
21
21
  MOVE_EXISTING: 'move',
22
22
  REMOVE_NODE: 'remove',
23
+ SET_MARKUP: 'set innerHTML',
23
24
  TEXT_CONTENT: 'set textContent',
24
25
  'updatePropertyByID': 'update attribute',
25
26
  'deletePropertyByID': 'delete attribute',
26
27
  'updateStylesByID': 'update styles',
27
- 'updateInnerHTMLByID': 'set innerHTML',
28
28
  'dangerouslyReplaceNodeWithMarkupByID': 'replace'
29
29
  };
30
30
 
@@ -43,11 +43,8 @@ function getTotalTime(measurements) {
43
43
 
44
44
  function getDOMSummary(measurements) {
45
45
  var items = [];
46
- for (var i = 0; i < measurements.length; i++) {
47
- var measurement = measurements[i];
48
- var id;
49
-
50
- for (id in measurement.writes) {
46
+ measurements.forEach(function (measurement) {
47
+ Object.keys(measurement.writes).forEach(function (id) {
51
48
  measurement.writes[id].forEach(function (write) {
52
49
  items.push({
53
50
  id: id,
@@ -55,8 +52,8 @@ function getDOMSummary(measurements) {
55
52
  args: write.args
56
53
  });
57
54
  });
58
- }
59
- }
55
+ });
56
+ });
60
57
  return items;
61
58
  }
62
59