react 0.13.2 → 0.14.0-alpha3

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 (197) hide show
  1. package/README.md +1 -1
  2. package/addons.js +7 -0
  3. package/addons/CSSTransitionGroup.js +1 -0
  4. package/addons/LinkedStateMixin.js +1 -0
  5. package/addons/Perf.js +1 -0
  6. package/addons/PureRenderMixin.js +1 -0
  7. package/addons/TestUtils.js +1 -0
  8. package/addons/TransitionGroup.js +1 -0
  9. package/addons/batchedUpdates.js +1 -0
  10. package/addons/cloneWithProps.js +1 -0
  11. package/addons/createFragment.js +1 -0
  12. package/addons/renderSubtreeIntoContainer.js +1 -0
  13. package/addons/shallowCompare.js +1 -0
  14. package/addons/update.js +1 -0
  15. package/dist/JSXTransformer.js +3355 -1685
  16. package/dist/react-with-addons.js +3320 -5133
  17. package/dist/react-with-addons.min.js +6 -7
  18. package/dist/react.js +2962 -4548
  19. package/dist/react.min.js +5 -5
  20. package/lib/AutoFocusMixin.js +4 -3
  21. package/lib/BeforeInputEventPlugin.js +30 -118
  22. package/lib/CSSCore.js +12 -23
  23. package/lib/CSSProperty.js +4 -3
  24. package/lib/CSSPropertyOperations.js +14 -30
  25. package/lib/CallbackQueue.js +7 -10
  26. package/lib/ChangeEventPlugin.js +24 -88
  27. package/lib/ClientReactRootIndex.js +2 -2
  28. package/lib/DOMChildrenOperations.js +13 -33
  29. package/lib/DOMProperty.js +41 -67
  30. package/lib/DOMPropertyOperations.js +30 -51
  31. package/lib/Danger.js +19 -62
  32. package/lib/DefaultEventPluginOrder.js +2 -12
  33. package/lib/EnterLeaveEventPlugin.js +11 -33
  34. package/lib/EventConstants.js +2 -2
  35. package/lib/EventListener.js +11 -13
  36. package/lib/EventPluginHub.js +44 -47
  37. package/lib/EventPluginRegistry.js +18 -74
  38. package/lib/EventPluginUtils.js +27 -38
  39. package/lib/EventPropagators.js +23 -26
  40. package/lib/ExecutionEnvironment.js +4 -8
  41. package/lib/FallbackCompositionState.js +3 -3
  42. package/lib/HTMLDOMPropertyConfig.js +7 -19
  43. package/lib/LinkedStateMixin.js +3 -6
  44. package/lib/LinkedValueUtils.js +34 -64
  45. package/lib/LocalEventTrapMixin.js +9 -16
  46. package/lib/Object.assign.js +1 -1
  47. package/lib/PooledClass.js +8 -11
  48. package/lib/React.js +9 -129
  49. package/lib/ReactBrowserComponentMixin.js +9 -2
  50. package/lib/ReactBrowserEventEmitter.js +26 -82
  51. package/lib/ReactCSSTransitionGroup.js +13 -24
  52. package/lib/ReactCSSTransitionGroupChild.js +18 -28
  53. package/lib/ReactChildReconciler.js +11 -19
  54. package/lib/ReactChildren.js +21 -28
  55. package/lib/ReactClass.js +81 -234
  56. package/lib/ReactComponent.js +17 -33
  57. package/lib/ReactComponentBrowserEnvironment.js +4 -8
  58. package/lib/ReactComponentEnvironment.js +6 -12
  59. package/lib/ReactComponentWithPureRenderMixin.js +4 -5
  60. package/lib/ReactCompositeComponent.js +87 -311
  61. package/lib/ReactContext.js +2 -44
  62. package/lib/ReactCurrentOwner.js +1 -3
  63. package/lib/ReactDOM.js +4 -2
  64. package/lib/ReactDOMButton.js +3 -4
  65. package/lib/ReactDOMClient.js +85 -0
  66. package/lib/ReactDOMComponent.js +182 -146
  67. package/lib/ReactDOMForm.js +3 -3
  68. package/lib/ReactDOMIDOperations.js +11 -22
  69. package/lib/ReactDOMIframe.js +3 -3
  70. package/lib/ReactDOMImg.js +3 -3
  71. package/lib/ReactDOMInput.js +22 -35
  72. package/lib/ReactDOMOption.js +67 -10
  73. package/lib/ReactDOMSelect.js +50 -28
  74. package/lib/ReactDOMSelection.js +5 -20
  75. package/lib/ReactDOMServer.js +24 -0
  76. package/lib/ReactDOMTextComponent.js +17 -18
  77. package/lib/ReactDOMTextarea.js +15 -27
  78. package/lib/ReactDefaultBatchingStrategy.js +9 -13
  79. package/lib/ReactDefaultInjection.js +31 -40
  80. package/lib/ReactDefaultPerf.js +36 -69
  81. package/lib/ReactDefaultPerfAnalysis.js +8 -14
  82. package/lib/ReactElement.js +24 -57
  83. package/lib/ReactElementValidator.js +38 -105
  84. package/lib/ReactEmptyComponent.js +7 -11
  85. package/lib/ReactErrorUtils.js +2 -2
  86. package/lib/ReactEventEmitterMixin.js +3 -12
  87. package/lib/ReactEventListener.js +16 -38
  88. package/lib/ReactFragment.js +23 -54
  89. package/lib/ReactInjection.js +1 -1
  90. package/lib/ReactInputSelection.js +11 -21
  91. package/lib/ReactInstanceHandles.js +27 -57
  92. package/lib/ReactInstanceMap.js +5 -5
  93. package/lib/ReactIsomorphic.js +70 -0
  94. package/lib/ReactLifeCycle.js +1 -1
  95. package/lib/ReactLink.js +2 -4
  96. package/lib/ReactMarkupChecksum.js +5 -10
  97. package/lib/ReactMount.js +137 -260
  98. package/lib/ReactMultiChild.js +19 -45
  99. package/lib/ReactMultiChildUpdateTypes.js +1 -1
  100. package/lib/ReactNativeComponent.js +7 -11
  101. package/lib/ReactOwner.js +7 -24
  102. package/lib/ReactPerf.js +8 -12
  103. package/lib/ReactPropTransferer.js +4 -4
  104. package/lib/ReactPropTypeLocationNames.js +2 -2
  105. package/lib/ReactPropTypeLocations.js +1 -1
  106. package/lib/ReactPropTypes.js +41 -61
  107. package/lib/ReactReconcileTransaction.js +9 -34
  108. package/lib/ReactReconciler.js +9 -19
  109. package/lib/ReactRef.js +5 -8
  110. package/lib/ReactRootIndex.js +2 -2
  111. package/lib/ReactServerRendering.js +7 -15
  112. package/lib/ReactServerRenderingTransaction.js +7 -32
  113. package/lib/ReactStateSetters.js +6 -6
  114. package/lib/ReactTestUtils.js +93 -165
  115. package/lib/ReactTransitionChildMapping.js +5 -7
  116. package/lib/ReactTransitionEvents.js +5 -5
  117. package/lib/ReactTransitionGroup.js +30 -52
  118. package/lib/ReactUpdateQueue.js +27 -90
  119. package/lib/ReactUpdates.js +27 -79
  120. package/lib/ReactWithAddons.js +7 -6
  121. package/lib/SVGDOMPropertyConfig.js +41 -4
  122. package/lib/SelectEventPlugin.js +28 -29
  123. package/lib/ServerReactRootIndex.js +2 -2
  124. package/lib/SimpleEventPlugin.js +136 -128
  125. package/lib/SyntheticClipboardEvent.js +3 -7
  126. package/lib/SyntheticCompositionEvent.js +3 -9
  127. package/lib/SyntheticDragEvent.js +1 -1
  128. package/lib/SyntheticEvent.js +8 -10
  129. package/lib/SyntheticFocusEvent.js +1 -1
  130. package/lib/SyntheticInputEvent.js +3 -9
  131. package/lib/SyntheticKeyboardEvent.js +4 -4
  132. package/lib/SyntheticMouseEvent.js +8 -14
  133. package/lib/SyntheticTouchEvent.js +1 -1
  134. package/lib/SyntheticUIEvent.js +3 -3
  135. package/lib/SyntheticWheelEvent.js +11 -15
  136. package/lib/Transaction.js +12 -24
  137. package/lib/ViewportMetrics.js +2 -2
  138. package/lib/accumulateInto.js +2 -5
  139. package/lib/adler32.js +2 -4
  140. package/lib/camelize.js +4 -2
  141. package/lib/camelizeStyleName.js +2 -2
  142. package/lib/cloneWithProps.js +5 -11
  143. package/lib/containsNode.js +29 -16
  144. package/lib/createArrayFromMixed.js +17 -16
  145. package/lib/createFullPageComponent.js +4 -11
  146. package/lib/createNodesFromMarkup.js +6 -8
  147. package/lib/dangerousStyleValue.js +2 -3
  148. package/lib/emptyFunction.js +10 -4
  149. package/lib/emptyObject.js +1 -1
  150. package/lib/escapeTextContentForBrowser.js +1 -1
  151. package/lib/findDOMNode.js +5 -24
  152. package/lib/flattenChildren.js +4 -10
  153. package/lib/focusNode.js +2 -3
  154. package/lib/forEachAccumulated.js +2 -2
  155. package/lib/getActiveElement.js +4 -2
  156. package/lib/getEventCharCode.js +1 -1
  157. package/lib/getEventKey.js +1 -1
  158. package/lib/getEventModifierState.js +1 -1
  159. package/lib/getEventTarget.js +1 -1
  160. package/lib/getIteratorFn.js +2 -4
  161. package/lib/getMarkupWrap.js +7 -5
  162. package/lib/getNodeForCharacterOffset.js +1 -1
  163. package/lib/getTextContentAccessor.js +2 -4
  164. package/lib/getUnboundedScrollPosition.js +1 -1
  165. package/lib/hyphenate.js +3 -1
  166. package/lib/hyphenateStyleName.js +2 -2
  167. package/lib/instantiateReactComponent.js +14 -38
  168. package/lib/invariant.js +8 -12
  169. package/lib/isEventSupported.js +7 -10
  170. package/lib/isNode.js +4 -6
  171. package/lib/isTextInputElement.js +2 -4
  172. package/lib/isTextNode.js +3 -1
  173. package/lib/joinClasses.js +2 -2
  174. package/lib/keyMirror.js +3 -6
  175. package/lib/keyOf.js +4 -3
  176. package/lib/mapObject.js +1 -1
  177. package/lib/memoizeStringOnly.js +2 -2
  178. package/lib/onlyChild.js +2 -5
  179. package/lib/performance.js +2 -5
  180. package/lib/performanceNow.js +3 -1
  181. package/lib/quoteAttributeValueForBrowser.js +1 -1
  182. package/lib/renderSubtreeIntoContainer.js +16 -0
  183. package/lib/setInnerHTML.js +11 -8
  184. package/lib/setTextContent.js +3 -3
  185. package/lib/shallowCompare.js +24 -0
  186. package/lib/shallowEqual.js +17 -11
  187. package/lib/shouldUpdateReactComponent.js +3 -64
  188. package/lib/toArray.js +8 -19
  189. package/lib/traverseAllChildren.js +22 -89
  190. package/lib/update.js +25 -85
  191. package/lib/validateDOMNesting.js +363 -0
  192. package/lib/warning.js +17 -15
  193. package/package.json +3 -3
  194. package/lib/MobileSafariClickEventPlugin.js +0 -56
  195. package/lib/ReactPutListenerQueue.js +0 -54
  196. package/lib/cx.js +0 -52
  197. package/lib/getReactRootElementInContainer.js +0 -33
@@ -19,12 +19,8 @@ var SyntheticEvent = require("./SyntheticEvent");
19
19
  * @see http://www.w3.org/TR/clipboard-apis/
20
20
  */
21
21
  var ClipboardEventInterface = {
22
- clipboardData: function(event) {
23
- return (
24
- 'clipboardData' in event ?
25
- event.clipboardData :
26
- window.clipboardData
27
- );
22
+ clipboardData: function (event) {
23
+ return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
28
24
  }
29
25
  };
30
26
 
@@ -40,4 +36,4 @@ function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {
40
36
 
41
37
  SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
42
38
 
43
- module.exports = SyntheticClipboardEvent;
39
+ module.exports = SyntheticClipboardEvent;
@@ -28,16 +28,10 @@ var CompositionEventInterface = {
28
28
  * @param {object} nativeEvent Native browser event.
29
29
  * @extends {SyntheticUIEvent}
30
30
  */
31
- function SyntheticCompositionEvent(
32
- dispatchConfig,
33
- dispatchMarker,
34
- nativeEvent) {
31
+ function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent) {
35
32
  SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
36
33
  }
37
34
 
38
- SyntheticEvent.augmentClass(
39
- SyntheticCompositionEvent,
40
- CompositionEventInterface
41
- );
35
+ SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
42
36
 
43
- module.exports = SyntheticCompositionEvent;
37
+ module.exports = SyntheticCompositionEvent;
@@ -34,4 +34,4 @@ function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) {
34
34
 
35
35
  SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
36
36
 
37
- module.exports = SyntheticDragEvent;
37
+ module.exports = SyntheticDragEvent;
@@ -30,7 +30,7 @@ var EventInterface = {
30
30
  eventPhase: null,
31
31
  bubbles: null,
32
32
  cancelable: null,
33
- timeStamp: function(event) {
33
+ timeStamp: function (event) {
34
34
  return event.timeStamp || Date.now();
35
35
  },
36
36
  defaultPrevented: null,
@@ -72,9 +72,7 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
72
72
  }
73
73
  }
74
74
 
75
- var defaultPrevented = nativeEvent.defaultPrevented != null ?
76
- nativeEvent.defaultPrevented :
77
- nativeEvent.returnValue === false;
75
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
78
76
  if (defaultPrevented) {
79
77
  this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
80
78
  } else {
@@ -85,7 +83,7 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
85
83
 
86
84
  assign(SyntheticEvent.prototype, {
87
85
 
88
- preventDefault: function() {
86
+ preventDefault: function () {
89
87
  this.defaultPrevented = true;
90
88
  var event = this.nativeEvent;
91
89
  if (event.preventDefault) {
@@ -96,7 +94,7 @@ assign(SyntheticEvent.prototype, {
96
94
  this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
97
95
  },
98
96
 
99
- stopPropagation: function() {
97
+ stopPropagation: function () {
100
98
  var event = this.nativeEvent;
101
99
  if (event.stopPropagation) {
102
100
  event.stopPropagation();
@@ -111,7 +109,7 @@ assign(SyntheticEvent.prototype, {
111
109
  * them back into the pool. This allows a way to hold onto a reference that
112
110
  * won't be added back into the pool.
113
111
  */
114
- persist: function() {
112
+ persist: function () {
115
113
  this.isPersistent = emptyFunction.thatReturnsTrue;
116
114
  },
117
115
 
@@ -125,7 +123,7 @@ assign(SyntheticEvent.prototype, {
125
123
  /**
126
124
  * `PooledClass` looks for `destructor` on each instance it releases.
127
125
  */
128
- destructor: function() {
126
+ destructor: function () {
129
127
  var Interface = this.constructor.Interface;
130
128
  for (var propName in Interface) {
131
129
  this[propName] = null;
@@ -145,7 +143,7 @@ SyntheticEvent.Interface = EventInterface;
145
143
  * @param {function} Class
146
144
  * @param {?object} Interface
147
145
  */
148
- SyntheticEvent.augmentClass = function(Class, Interface) {
146
+ SyntheticEvent.augmentClass = function (Class, Interface) {
149
147
  var Super = this;
150
148
 
151
149
  var prototype = Object.create(Super.prototype);
@@ -161,4 +159,4 @@ SyntheticEvent.augmentClass = function(Class, Interface) {
161
159
 
162
160
  PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler);
163
161
 
164
- module.exports = SyntheticEvent;
162
+ module.exports = SyntheticEvent;
@@ -34,4 +34,4 @@ function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) {
34
34
 
35
35
  SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
36
36
 
37
- module.exports = SyntheticFocusEvent;
37
+ module.exports = SyntheticFocusEvent;
@@ -29,16 +29,10 @@ var InputEventInterface = {
29
29
  * @param {object} nativeEvent Native browser event.
30
30
  * @extends {SyntheticUIEvent}
31
31
  */
32
- function SyntheticInputEvent(
33
- dispatchConfig,
34
- dispatchMarker,
35
- nativeEvent) {
32
+ function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent) {
36
33
  SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
37
34
  }
38
35
 
39
- SyntheticEvent.augmentClass(
40
- SyntheticInputEvent,
41
- InputEventInterface
42
- );
36
+ SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
43
37
 
44
- module.exports = SyntheticInputEvent;
38
+ module.exports = SyntheticInputEvent;
@@ -33,7 +33,7 @@ var KeyboardEventInterface = {
33
33
  locale: null,
34
34
  getModifierState: getEventModifierState,
35
35
  // Legacy Interface
36
- charCode: function(event) {
36
+ charCode: function (event) {
37
37
  // `charCode` is the result of a KeyPress event and represents the value of
38
38
  // the actual printable character.
39
39
 
@@ -44,7 +44,7 @@ var KeyboardEventInterface = {
44
44
  }
45
45
  return 0;
46
46
  },
47
- keyCode: function(event) {
47
+ keyCode: function (event) {
48
48
  // `keyCode` is the result of a KeyDown/Up event and represents the value of
49
49
  // physical keyboard key.
50
50
 
@@ -57,7 +57,7 @@ var KeyboardEventInterface = {
57
57
  }
58
58
  return 0;
59
59
  },
60
- which: function(event) {
60
+ which: function (event) {
61
61
  // `which` is an alias for either `keyCode` or `charCode` depending on the
62
62
  // type of the event.
63
63
  if (event.type === 'keypress') {
@@ -82,4 +82,4 @@ function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {
82
82
 
83
83
  SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
84
84
 
85
- module.exports = SyntheticKeyboardEvent;
85
+ module.exports = SyntheticKeyboardEvent;
@@ -31,7 +31,7 @@ var MouseEventInterface = {
31
31
  altKey: null,
32
32
  metaKey: null,
33
33
  getModifierState: getEventModifierState,
34
- button: function(event) {
34
+ button: function (event) {
35
35
  // Webkit, Firefox, IE9+
36
36
  // which: 1 2 3
37
37
  // button: 0 1 2 (standard)
@@ -46,21 +46,15 @@ var MouseEventInterface = {
46
46
  return button === 2 ? 2 : button === 4 ? 1 : 0;
47
47
  },
48
48
  buttons: null,
49
- relatedTarget: function(event) {
50
- return event.relatedTarget || (
51
- ((event.fromElement === event.srcElement ? event.toElement : event.fromElement))
52
- );
49
+ relatedTarget: function (event) {
50
+ return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
53
51
  },
54
52
  // "Proprietary" Interface.
55
- pageX: function(event) {
56
- return 'pageX' in event ?
57
- event.pageX :
58
- event.clientX + ViewportMetrics.currentScrollLeft;
53
+ pageX: function (event) {
54
+ return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
59
55
  },
60
- pageY: function(event) {
61
- return 'pageY' in event ?
62
- event.pageY :
63
- event.clientY + ViewportMetrics.currentScrollTop;
56
+ pageY: function (event) {
57
+ return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
64
58
  }
65
59
  };
66
60
 
@@ -76,4 +70,4 @@ function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) {
76
70
 
77
71
  SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
78
72
 
79
- module.exports = SyntheticMouseEvent;
73
+ module.exports = SyntheticMouseEvent;
@@ -43,4 +43,4 @@ function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) {
43
43
 
44
44
  SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
45
45
 
46
- module.exports = SyntheticTouchEvent;
46
+ module.exports = SyntheticTouchEvent;
@@ -21,7 +21,7 @@ var getEventTarget = require("./getEventTarget");
21
21
  * @see http://www.w3.org/TR/DOM-Level-3-Events/
22
22
  */
23
23
  var UIEventInterface = {
24
- view: function(event) {
24
+ view: function (event) {
25
25
  if (event.view) {
26
26
  return event.view;
27
27
  }
@@ -40,7 +40,7 @@ var UIEventInterface = {
40
40
  return window;
41
41
  }
42
42
  },
43
- detail: function(event) {
43
+ detail: function (event) {
44
44
  return event.detail || 0;
45
45
  }
46
46
  };
@@ -57,4 +57,4 @@ function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) {
57
57
 
58
58
  SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
59
59
 
60
- module.exports = SyntheticUIEvent;
60
+ module.exports = SyntheticUIEvent;
@@ -19,21 +19,17 @@ var SyntheticMouseEvent = require("./SyntheticMouseEvent");
19
19
  * @see http://www.w3.org/TR/DOM-Level-3-Events/
20
20
  */
21
21
  var WheelEventInterface = {
22
- deltaX: function(event) {
23
- return (
24
- 'deltaX' in event ? event.deltaX :
25
- // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
26
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0
27
- );
22
+ deltaX: function (event) {
23
+ return 'deltaX' in event ? event.deltaX :
24
+ // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
25
+ 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
28
26
  },
29
- deltaY: function(event) {
30
- return (
31
- 'deltaY' in event ? event.deltaY :
32
- // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
33
- 'wheelDeltaY' in event ? -event.wheelDeltaY :
34
- // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
35
- 'wheelDelta' in event ? -event.wheelDelta : 0
36
- );
27
+ deltaY: function (event) {
28
+ return 'deltaY' in event ? event.deltaY :
29
+ // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
30
+ 'wheelDeltaY' in event ? -event.wheelDeltaY :
31
+ // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
32
+ 'wheelDelta' in event ? -event.wheelDelta : 0;
37
33
  },
38
34
  deltaZ: null,
39
35
 
@@ -56,4 +52,4 @@ function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) {
56
52
 
57
53
  SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
58
54
 
59
- module.exports = SyntheticWheelEvent;
55
+ module.exports = SyntheticWheelEvent;
@@ -82,7 +82,7 @@ var Mixin = {
82
82
  * That can be useful if you decide to make your subclass of this mixin a
83
83
  * "PooledClass".
84
84
  */
85
- reinitializeTransaction: function() {
85
+ reinitializeTransaction: function () {
86
86
  this.transactionWrappers = this.getTransactionWrappers();
87
87
  if (!this.wrapperInitData) {
88
88
  this.wrapperInitData = [];
@@ -100,7 +100,7 @@ var Mixin = {
100
100
  */
101
101
  getTransactionWrappers: null,
102
102
 
103
- isInTransaction: function() {
103
+ isInTransaction: function () {
104
104
  return !!this._isInTransaction;
105
105
  },
106
106
 
@@ -115,12 +115,8 @@ var Mixin = {
115
115
  * Helps prevent need to bind in many cases.
116
116
  * @return Return value from `method`.
117
117
  */
118
- perform: function(method, scope, a, b, c, d, e, f) {
119
- ("production" !== process.env.NODE_ENV ? invariant(
120
- !this.isInTransaction(),
121
- 'Transaction.perform(...): Cannot initialize a transaction when there ' +
122
- 'is already an outstanding transaction.'
123
- ) : invariant(!this.isInTransaction()));
118
+ perform: function (method, scope, a, b, c, d, e, f) {
119
+ !!this.isInTransaction() ? 'production' !== process.env.NODE_ENV ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : undefined;
124
120
  var errorThrown;
125
121
  var ret;
126
122
  try {
@@ -140,8 +136,7 @@ var Mixin = {
140
136
  // by invoking `closeAll`.
141
137
  try {
142
138
  this.closeAll(0);
143
- } catch (err) {
144
- }
139
+ } catch (err) {}
145
140
  } else {
146
141
  // Since `method` didn't throw, we don't want to silence the exception
147
142
  // here.
@@ -154,7 +149,7 @@ var Mixin = {
154
149
  return ret;
155
150
  },
156
151
 
157
- initializeAll: function(startIndex) {
152
+ initializeAll: function (startIndex) {
158
153
  var transactionWrappers = this.transactionWrappers;
159
154
  for (var i = startIndex; i < transactionWrappers.length; i++) {
160
155
  var wrapper = transactionWrappers[i];
@@ -164,9 +159,7 @@ var Mixin = {
164
159
  // of initialize -- if it's still set to OBSERVED_ERROR in the finally
165
160
  // block, it means wrapper.initialize threw.
166
161
  this.wrapperInitData[i] = Transaction.OBSERVED_ERROR;
167
- this.wrapperInitData[i] = wrapper.initialize ?
168
- wrapper.initialize.call(this) :
169
- null;
162
+ this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
170
163
  } finally {
171
164
  if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) {
172
165
  // The initializer for wrapper i threw an error; initialize the
@@ -174,8 +167,7 @@ var Mixin = {
174
167
  // that the first error is the one to bubble up.
175
168
  try {
176
169
  this.initializeAll(i + 1);
177
- } catch (err) {
178
- }
170
+ } catch (err) {}
179
171
  }
180
172
  }
181
173
  }
@@ -187,11 +179,8 @@ var Mixin = {
187
179
  * (`close`rs that correspond to initializers that failed will not be
188
180
  * invoked).
189
181
  */
190
- closeAll: function(startIndex) {
191
- ("production" !== process.env.NODE_ENV ? invariant(
192
- this.isInTransaction(),
193
- 'Transaction.closeAll(): Cannot close transaction when none are open.'
194
- ) : invariant(this.isInTransaction()));
182
+ closeAll: function (startIndex) {
183
+ !this.isInTransaction() ? 'production' !== process.env.NODE_ENV ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : undefined;
195
184
  var transactionWrappers = this.transactionWrappers;
196
185
  for (var i = startIndex; i < transactionWrappers.length; i++) {
197
186
  var wrapper = transactionWrappers[i];
@@ -214,8 +203,7 @@ var Mixin = {
214
203
  // first error is the one to bubble up.
215
204
  try {
216
205
  this.closeAll(i + 1);
217
- } catch (e) {
218
- }
206
+ } catch (e) {}
219
207
  }
220
208
  }
221
209
  }
@@ -234,4 +222,4 @@ var Transaction = {
234
222
 
235
223
  };
236
224
 
237
- module.exports = Transaction;
225
+ module.exports = Transaction;
@@ -17,11 +17,11 @@ var ViewportMetrics = {
17
17
 
18
18
  currentScrollTop: 0,
19
19
 
20
- refreshScrollValues: function(scrollPosition) {
20
+ refreshScrollValues: function (scrollPosition) {
21
21
  ViewportMetrics.currentScrollLeft = scrollPosition.x;
22
22
  ViewportMetrics.currentScrollTop = scrollPosition.y;
23
23
  }
24
24
 
25
25
  };
26
26
 
27
- module.exports = ViewportMetrics;
27
+ module.exports = ViewportMetrics;
@@ -28,10 +28,7 @@ var invariant = require("./invariant");
28
28
  */
29
29
 
30
30
  function accumulateInto(current, next) {
31
- ("production" !== process.env.NODE_ENV ? invariant(
32
- next != null,
33
- 'accumulateInto(...): Accumulated items must not be null or undefined.'
34
- ) : invariant(next != null));
31
+ !(next != null) ? 'production' !== process.env.NODE_ENV ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(false) : undefined;
35
32
  if (current == null) {
36
33
  return next;
37
34
  }
@@ -59,4 +56,4 @@ function accumulateInto(current, next) {
59
56
  return [current, next];
60
57
  }
61
58
 
62
- module.exports = accumulateInto;
59
+ module.exports = accumulateInto;
package/lib/adler32.js CHANGED
@@ -9,8 +9,6 @@
9
9
  * @providesModule adler32
10
10
  */
11
11
 
12
- /* jslint bitwise:true */
13
-
14
12
  'use strict';
15
13
 
16
14
  var MOD = 65521;
@@ -26,7 +24,7 @@ function adler32(data) {
26
24
  a = (a + data.charCodeAt(i)) % MOD;
27
25
  b = (b + a) % MOD;
28
26
  }
29
- return a | (b << 16);
27
+ return a | b << 16;
30
28
  }
31
29
 
32
- module.exports = adler32;
30
+ module.exports = adler32;
package/lib/camelize.js CHANGED
@@ -10,6 +10,8 @@
10
10
  * @typechecks
11
11
  */
12
12
 
13
+ "use strict";
14
+
13
15
  var _hyphenPattern = /-(.)/g;
14
16
 
15
17
  /**
@@ -22,9 +24,9 @@ var _hyphenPattern = /-(.)/g;
22
24
  * @return {string}
23
25
  */
24
26
  function camelize(string) {
25
- return string.replace(_hyphenPattern, function(_, character) {
27
+ return string.replace(_hyphenPattern, function (_, character) {
26
28
  return character.toUpperCase();
27
29
  });
28
30
  }
29
31
 
30
- module.exports = camelize;
32
+ module.exports = camelize;