react 15.3.2 → 15.4.0-rc.4

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 (210) hide show
  1. package/dist/react-with-addons.js +3864 -21390
  2. package/dist/react-with-addons.min.js +3 -6
  3. package/dist/react.js +2639 -19486
  4. package/dist/react.min.js +2 -6
  5. package/lib/KeyEscapeUtils.js +0 -1
  6. package/lib/LinkedStateMixin.js +1 -3
  7. package/lib/PooledClass.js +3 -1
  8. package/lib/React.js +0 -1
  9. package/lib/ReactAddonsDOMDependencies.js +35 -0
  10. package/lib/ReactAddonsDOMDependenciesUMDShim.js +31 -0
  11. package/lib/ReactCSSTransitionGroup.js +60 -43
  12. package/lib/ReactCSSTransitionGroupChild.js +2 -3
  13. package/lib/ReactChildren.js +0 -1
  14. package/lib/ReactClass.js +38 -54
  15. package/lib/ReactComponent.js +0 -1
  16. package/lib/ReactComponentTreeDevtool.js +0 -1
  17. package/lib/ReactComponentTreeHook.js +84 -101
  18. package/lib/{DOMNamespaces.js → ReactComponentTreeHookUMDShim.js} +4 -7
  19. package/lib/ReactComponentWithPureRenderMixin.js +0 -1
  20. package/lib/ReactCurrentOwner.js +1 -2
  21. package/lib/{renderSubtreeIntoContainer.js → ReactCurrentOwnerUMDShim.js} +5 -4
  22. package/lib/ReactDOMFactories.js +0 -1
  23. package/lib/ReactElement.js +6 -14
  24. package/lib/ReactElementSymbol.js +19 -0
  25. package/lib/{ReactDOMComponentFlags.js → ReactElementType.js} +3 -9
  26. package/lib/ReactElementValidator.js +1 -3
  27. package/lib/ReactFragment.js +0 -1
  28. package/lib/ReactLink.js +0 -1
  29. package/lib/ReactNoopUpdateQueue.js +0 -1
  30. package/lib/ReactPropTypeLocationNames.js +1 -1
  31. package/lib/ReactPropTypeLocations.js +2 -12
  32. package/lib/ReactPropTypes.js +5 -3
  33. package/lib/ReactPropTypesSecret.js +1 -1
  34. package/lib/ReactPureComponent.js +0 -1
  35. package/lib/ReactStateSetters.js +0 -1
  36. package/lib/ReactTransitionChildMapping.js +0 -1
  37. package/lib/ReactTransitionEvents.js +1 -2
  38. package/lib/ReactTransitionGroup.js +145 -142
  39. package/lib/ReactUMDEntry.js +11 -6
  40. package/lib/{ReactDOMFeatureFlags.js → ReactUMDShim.js} +3 -6
  41. package/lib/ReactVersion.js +1 -2
  42. package/lib/ReactWithAddons.js +15 -3
  43. package/lib/ReactWithAddonsUMDEntry.js +11 -6
  44. package/lib/canDefineProperty.js +2 -1
  45. package/lib/checkReactTypeSpec.js +0 -1
  46. package/lib/deprecated.js +0 -1
  47. package/lib/flattenChildren.js +0 -1
  48. package/lib/getIteratorFn.js +0 -1
  49. package/lib/onlyChild.js +0 -1
  50. package/lib/reactProdInvariant.js +0 -1
  51. package/lib/shallowCompare.js +1 -2
  52. package/lib/sliceChildren.js +0 -1
  53. package/lib/traverseAllChildren.js +11 -3
  54. package/lib/update.js +6 -8
  55. package/package.json +1 -1
  56. package/lib/AutoFocusUtils.js +0 -24
  57. package/lib/BeforeInputEventPlugin.js +0 -390
  58. package/lib/CSSProperty.js +0 -148
  59. package/lib/CSSPropertyOperations.js +0 -205
  60. package/lib/CallbackQueue.js +0 -106
  61. package/lib/ChangeEventPlugin.js +0 -325
  62. package/lib/DOMChildrenOperations.js +0 -194
  63. package/lib/DOMLazyTree.js +0 -118
  64. package/lib/DOMProperty.js +0 -206
  65. package/lib/DOMPropertyOperations.js +0 -221
  66. package/lib/Danger.js +0 -48
  67. package/lib/DefaultEventPluginOrder.js +0 -27
  68. package/lib/DisabledInputUtils.js +0 -50
  69. package/lib/EnterLeaveEventPlugin.js +0 -105
  70. package/lib/EventConstants.js +0 -97
  71. package/lib/EventPluginHub.js +0 -251
  72. package/lib/EventPluginRegistry.js +0 -247
  73. package/lib/EventPluginUtils.js +0 -229
  74. package/lib/EventPropagators.js +0 -137
  75. package/lib/FallbackCompositionState.js +0 -95
  76. package/lib/HTMLDOMPropertyConfig.js +0 -212
  77. package/lib/LinkedValueUtils.js +0 -136
  78. package/lib/NativeMethodsMixin.js +0 -167
  79. package/lib/ReactBrowserEventEmitter.js +0 -330
  80. package/lib/ReactChildReconciler.js +0 -154
  81. package/lib/ReactChildrenMutationWarningHook.js +0 -54
  82. package/lib/ReactComponentBrowserEnvironment.js +0 -30
  83. package/lib/ReactComponentEnvironment.js +0 -45
  84. package/lib/ReactComponentTreeTestUtils.js +0 -87
  85. package/lib/ReactCompositeComponent.js +0 -904
  86. package/lib/ReactDOM.js +0 -110
  87. package/lib/ReactDOMButton.js +0 -24
  88. package/lib/ReactDOMComponent.js +0 -1006
  89. package/lib/ReactDOMComponentTree.js +0 -188
  90. package/lib/ReactDOMContainerInfo.js +0 -33
  91. package/lib/ReactDOMEmptyComponent.js +0 -60
  92. package/lib/ReactDOMFiber.js +0 -76
  93. package/lib/ReactDOMIDOperations.js +0 -34
  94. package/lib/ReactDOMInput.js +0 -269
  95. package/lib/ReactDOMNullInputValuePropHook.js +0 -43
  96. package/lib/ReactDOMOption.js +0 -123
  97. package/lib/ReactDOMSelect.js +0 -201
  98. package/lib/ReactDOMSelection.js +0 -212
  99. package/lib/ReactDOMServer.js +0 -26
  100. package/lib/ReactDOMTextComponent.js +0 -164
  101. package/lib/ReactDOMTextarea.js +0 -155
  102. package/lib/ReactDOMTreeTraversal.js +0 -136
  103. package/lib/ReactDOMUnknownPropertyHook.js +0 -112
  104. package/lib/ReactDebugTool.js +0 -301
  105. package/lib/ReactDefaultBatchingStrategy.js +0 -68
  106. package/lib/ReactDefaultInjection.js +0 -84
  107. package/lib/ReactEmptyComponent.js +0 -30
  108. package/lib/ReactErrorUtils.js +0 -76
  109. package/lib/ReactEventEmitterMixin.js +0 -33
  110. package/lib/ReactEventListener.js +0 -157
  111. package/lib/ReactFeatureFlags.js +0 -22
  112. package/lib/ReactHostComponent.js +0 -76
  113. package/lib/ReactHostOperationHistoryHook.js +0 -37
  114. package/lib/ReactInjection.js +0 -36
  115. package/lib/ReactInputSelection.js +0 -124
  116. package/lib/ReactInstanceHandles.js +0 -302
  117. package/lib/ReactInstanceMap.js +0 -48
  118. package/lib/ReactInstrumentation.js +0 -21
  119. package/lib/ReactInvalidSetStateWarningHook.js +0 -36
  120. package/lib/ReactMarkupChecksum.js +0 -50
  121. package/lib/ReactMount.js +0 -534
  122. package/lib/ReactMultiChild.js +0 -451
  123. package/lib/ReactMultiChildUpdateTypes.js +0 -32
  124. package/lib/ReactNative.js +0 -71
  125. package/lib/ReactNativeAttributePayload.js +0 -371
  126. package/lib/ReactNativeBaseComponent.js +0 -198
  127. package/lib/ReactNativeBridgeEventPlugin.js +0 -60
  128. package/lib/ReactNativeComponentEnvironment.js +0 -31
  129. package/lib/ReactNativeComponentTree.js +0 -68
  130. package/lib/ReactNativeContainerInfo.js +0 -21
  131. package/lib/ReactNativeDOMIDOperations.js +0 -79
  132. package/lib/ReactNativeDefaultInjection.js +0 -101
  133. package/lib/ReactNativeEventEmitter.js +0 -191
  134. package/lib/ReactNativeEventPluginOrder.js +0 -16
  135. package/lib/ReactNativeGlobalResponderHandler.js +0 -25
  136. package/lib/ReactNativeMount.js +0 -193
  137. package/lib/ReactNativePropRegistry.js +0 -52
  138. package/lib/ReactNativeReconcileTransaction.js +0 -129
  139. package/lib/ReactNativeTagHandles.js +0 -56
  140. package/lib/ReactNativeTextComponent.js +0 -71
  141. package/lib/ReactNativeTreeTraversal.js +0 -127
  142. package/lib/ReactNodeTypes.js +0 -40
  143. package/lib/ReactNoop.js +0 -173
  144. package/lib/ReactOwner.js +0 -94
  145. package/lib/ReactPerf.js +0 -494
  146. package/lib/ReactReconcileTransaction.js +0 -178
  147. package/lib/ReactReconciler.js +0 -168
  148. package/lib/ReactRef.js +0 -80
  149. package/lib/ReactServerBatchingStrategy.js +0 -22
  150. package/lib/ReactServerRendering.js +0 -90
  151. package/lib/ReactServerRenderingTransaction.js +0 -90
  152. package/lib/ReactServerUpdateQueue.js +0 -141
  153. package/lib/ReactSimpleEmptyComponent.js +0 -37
  154. package/lib/ReactTestMount.js +0 -126
  155. package/lib/ReactTestReconcileTransaction.js +0 -121
  156. package/lib/ReactTestRenderer.js +0 -144
  157. package/lib/ReactTestUtils.js +0 -518
  158. package/lib/ReactUpdateQueue.js +0 -226
  159. package/lib/ReactUpdates.js +0 -251
  160. package/lib/ResponderEventPlugin.js +0 -510
  161. package/lib/ResponderSyntheticEvent.js +0 -39
  162. package/lib/ResponderTouchHistoryStore.js +0 -184
  163. package/lib/SVGDOMPropertyConfig.js +0 -302
  164. package/lib/SelectEventPlugin.js +0 -196
  165. package/lib/SimpleEventPlugin.js +0 -635
  166. package/lib/SyntheticAnimationEvent.js +0 -39
  167. package/lib/SyntheticClipboardEvent.js +0 -38
  168. package/lib/SyntheticCompositionEvent.js +0 -36
  169. package/lib/SyntheticDragEvent.js +0 -36
  170. package/lib/SyntheticEvent.js +0 -268
  171. package/lib/SyntheticFocusEvent.js +0 -36
  172. package/lib/SyntheticInputEvent.js +0 -37
  173. package/lib/SyntheticKeyboardEvent.js +0 -84
  174. package/lib/SyntheticMouseEvent.js +0 -72
  175. package/lib/SyntheticTouchEvent.js +0 -45
  176. package/lib/SyntheticTransitionEvent.js +0 -39
  177. package/lib/SyntheticUIEvent.js +0 -59
  178. package/lib/SyntheticWheelEvent.js +0 -54
  179. package/lib/TapEventPlugin.js +0 -110
  180. package/lib/TouchHistoryMath.js +0 -99
  181. package/lib/Transaction.js +0 -233
  182. package/lib/ViewportMetrics.js +0 -27
  183. package/lib/accumulate.js +0 -46
  184. package/lib/accumulateInto.js +0 -58
  185. package/lib/adler32.js +0 -44
  186. package/lib/createMicrosoftUnsafeLocalFunction.js +0 -32
  187. package/lib/createReactNativeComponentClass.js +0 -42
  188. package/lib/dangerousStyleValue.js +0 -79
  189. package/lib/escapeTextContentForBrowser.js +0 -123
  190. package/lib/findDOMNode.js +0 -60
  191. package/lib/findNodeHandle.js +0 -91
  192. package/lib/forEachAccumulated.js +0 -31
  193. package/lib/getEventCharCode.js +0 -50
  194. package/lib/getEventKey.js +0 -102
  195. package/lib/getEventModifierState.js +0 -43
  196. package/lib/getEventTarget.js +0 -35
  197. package/lib/getHostComponentFromComposite.js +0 -30
  198. package/lib/getNodeForCharacterOffset.js +0 -74
  199. package/lib/getTestDocument.js +0 -21
  200. package/lib/getTextContentAccessor.js +0 -33
  201. package/lib/getVendorPrefixedEventName.js +0 -101
  202. package/lib/instantiateReactComponent.js +0 -119
  203. package/lib/isEventSupported.js +0 -60
  204. package/lib/isTextInputElement.js +0 -51
  205. package/lib/quoteAttributeValueForBrowser.js +0 -26
  206. package/lib/reactComponentExpect.js +0 -217
  207. package/lib/setInnerHTML.js +0 -98
  208. package/lib/setTextContent.js +0 -48
  209. package/lib/shouldUpdateReactComponent.js +0 -42
  210. package/lib/validateDOMNesting.js +0 -382
@@ -6,7 +6,6 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactComponent
10
9
  */
11
10
 
12
11
  'use strict';
@@ -6,7 +6,6 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactComponentTreeDevtool
10
9
  */
11
10
  'use strict';
12
11
 
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactComponentTreeHook
9
+ *
10
10
  */
11
11
 
12
12
  'use strict';
@@ -49,113 +49,88 @@ typeof Set === 'function' && isNative(Set) &&
49
49
  // Set.prototype.keys
50
50
  Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
51
51
 
52
- var itemMap;
53
- var rootIDSet;
52
+ if (canUseCollections) {
53
+ var itemMap = new Map();
54
+ var rootIDSet = new Set();
54
55
 
55
- var itemByKey;
56
- var rootByKey;
56
+ var setItem = function (id, item) {
57
+ itemMap.set(id, item);
58
+ };
59
+ var getItem = function (id) {
60
+ return itemMap.get(id);
61
+ };
62
+ var removeItem = function (id) {
63
+ itemMap['delete'](id);
64
+ };
65
+ var getItemIDs = function () {
66
+ return Array.from(itemMap.keys());
67
+ };
57
68
 
58
- if (canUseCollections) {
59
- itemMap = new Map();
60
- rootIDSet = new Set();
69
+ var addRoot = function (id) {
70
+ rootIDSet.add(id);
71
+ };
72
+ var removeRoot = function (id) {
73
+ rootIDSet['delete'](id);
74
+ };
75
+ var getRootIDs = function () {
76
+ return Array.from(rootIDSet.keys());
77
+ };
61
78
  } else {
62
- itemByKey = {};
63
- rootByKey = {};
64
- }
65
-
66
- var unmountedIDs = [];
79
+ var itemByKey = {};
80
+ var rootByKey = {};
67
81
 
68
- // Use non-numeric keys to prevent V8 performance issues:
69
- // https://github.com/facebook/react/pull/7232
70
- function getKeyFromID(id) {
71
- return '.' + id;
72
- }
73
- function getIDFromKey(key) {
74
- return parseInt(key.substr(1), 10);
75
- }
82
+ // Use non-numeric keys to prevent V8 performance issues:
83
+ // https://github.com/facebook/react/pull/7232
84
+ var getKeyFromID = function (id) {
85
+ return '.' + id;
86
+ };
87
+ var getIDFromKey = function (key) {
88
+ return parseInt(key.substr(1), 10);
89
+ };
76
90
 
77
- function get(id) {
78
- if (canUseCollections) {
79
- return itemMap.get(id);
80
- } else {
91
+ var setItem = function (id, item) {
92
+ var key = getKeyFromID(id);
93
+ itemByKey[key] = item;
94
+ };
95
+ var getItem = function (id) {
81
96
  var key = getKeyFromID(id);
82
97
  return itemByKey[key];
83
- }
84
- }
85
-
86
- function remove(id) {
87
- if (canUseCollections) {
88
- itemMap['delete'](id);
89
- } else {
98
+ };
99
+ var removeItem = function (id) {
90
100
  var key = getKeyFromID(id);
91
101
  delete itemByKey[key];
92
- }
93
- }
94
-
95
- function create(id, element, parentID) {
96
- var item = {
97
- element: element,
98
- parentID: parentID,
99
- text: null,
100
- childIDs: [],
101
- isMounted: false,
102
- updateCount: 0
102
+ };
103
+ var getItemIDs = function () {
104
+ return Object.keys(itemByKey).map(getIDFromKey);
103
105
  };
104
106
 
105
- if (canUseCollections) {
106
- itemMap.set(id, item);
107
- } else {
108
- var key = getKeyFromID(id);
109
- itemByKey[key] = item;
110
- }
111
- }
112
-
113
- function addRoot(id) {
114
- if (canUseCollections) {
115
- rootIDSet.add(id);
116
- } else {
107
+ var addRoot = function (id) {
117
108
  var key = getKeyFromID(id);
118
109
  rootByKey[key] = true;
119
- }
120
- }
121
-
122
- function removeRoot(id) {
123
- if (canUseCollections) {
124
- rootIDSet['delete'](id);
125
- } else {
110
+ };
111
+ var removeRoot = function (id) {
126
112
  var key = getKeyFromID(id);
127
113
  delete rootByKey[key];
128
- }
129
- }
130
-
131
- function getRegisteredIDs() {
132
- if (canUseCollections) {
133
- return Array.from(itemMap.keys());
134
- } else {
135
- return Object.keys(itemByKey).map(getIDFromKey);
136
- }
137
- }
138
-
139
- function getRootIDs() {
140
- if (canUseCollections) {
141
- return Array.from(rootIDSet.keys());
142
- } else {
114
+ };
115
+ var getRootIDs = function () {
143
116
  return Object.keys(rootByKey).map(getIDFromKey);
144
- }
117
+ };
145
118
  }
146
119
 
120
+ var unmountedIDs = [];
121
+
147
122
  function purgeDeep(id) {
148
- var item = get(id);
123
+ var item = getItem(id);
149
124
  if (item) {
150
125
  var childIDs = item.childIDs;
151
126
 
152
- remove(id);
127
+ removeItem(id);
153
128
  childIDs.forEach(purgeDeep);
154
129
  }
155
130
  }
156
131
 
157
132
  function describeComponentFrame(name, source, ownerName) {
158
- return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
133
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
159
134
  }
160
135
 
161
136
  function getDisplayName(element) {
@@ -184,12 +159,13 @@ function describeID(id) {
184
159
 
185
160
  var ReactComponentTreeHook = {
186
161
  onSetChildren: function (id, nextChildIDs) {
187
- var item = get(id);
162
+ var item = getItem(id);
163
+ invariant(item, 'Item must have been set');
188
164
  item.childIDs = nextChildIDs;
189
165
 
190
166
  for (var i = 0; i < nextChildIDs.length; i++) {
191
167
  var nextChildID = nextChildIDs[i];
192
- var nextChild = get(nextChildID);
168
+ var nextChild = getItem(nextChildID);
193
169
  !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
194
170
  !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
195
171
  !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
@@ -197,16 +173,24 @@ var ReactComponentTreeHook = {
197
173
  nextChild.parentID = id;
198
174
  // TODO: This shouldn't be necessary but mounting a new root during in
199
175
  // componentWillMount currently causes not-yet-mounted components to
200
- // be purged from our tree data so their parent ID is missing.
176
+ // be purged from our tree data so their parent id is missing.
201
177
  }
202
178
  !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
203
179
  }
204
180
  },
205
181
  onBeforeMountComponent: function (id, element, parentID) {
206
- create(id, element, parentID);
182
+ var item = {
183
+ element: element,
184
+ parentID: parentID,
185
+ text: null,
186
+ childIDs: [],
187
+ isMounted: false,
188
+ updateCount: 0
189
+ };
190
+ setItem(id, item);
207
191
  },
208
192
  onBeforeUpdateComponent: function (id, element) {
209
- var item = get(id);
193
+ var item = getItem(id);
210
194
  if (!item || !item.isMounted) {
211
195
  // We may end up here as a result of setState() in componentWillUnmount().
212
196
  // In this case, ignore the element.
@@ -215,7 +199,8 @@ var ReactComponentTreeHook = {
215
199
  item.element = element;
216
200
  },
217
201
  onMountComponent: function (id) {
218
- var item = get(id);
202
+ var item = getItem(id);
203
+ invariant(item, 'Item must have been set');
219
204
  item.isMounted = true;
220
205
  var isRoot = item.parentID === 0;
221
206
  if (isRoot) {
@@ -223,7 +208,7 @@ var ReactComponentTreeHook = {
223
208
  }
224
209
  },
225
210
  onUpdateComponent: function (id) {
226
- var item = get(id);
211
+ var item = getItem(id);
227
212
  if (!item || !item.isMounted) {
228
213
  // We may end up here as a result of setState() in componentWillUnmount().
229
214
  // In this case, ignore the element.
@@ -232,7 +217,7 @@ var ReactComponentTreeHook = {
232
217
  item.updateCount++;
233
218
  },
234
219
  onUnmountComponent: function (id) {
235
- var item = get(id);
220
+ var item = getItem(id);
236
221
  if (item) {
237
222
  // We need to check if it exists.
238
223
  // `item` might not exist if it is inside an error boundary, and a sibling
@@ -260,16 +245,15 @@ var ReactComponentTreeHook = {
260
245
  unmountedIDs.length = 0;
261
246
  },
262
247
  isMounted: function (id) {
263
- var item = get(id);
248
+ var item = getItem(id);
264
249
  return item ? item.isMounted : false;
265
250
  },
266
251
  getCurrentStackAddendum: function (topElement) {
267
252
  var info = '';
268
253
  if (topElement) {
269
- var type = topElement.type;
270
- var name = typeof type === 'function' ? type.displayName || type.name : type;
254
+ var name = getDisplayName(topElement);
271
255
  var owner = topElement._owner;
272
- info += describeComponentFrame(name || 'Unknown', topElement._source, owner && owner.getName());
256
+ info += describeComponentFrame(name, topElement._source, owner && owner.getName());
273
257
  }
274
258
 
275
259
  var currentOwner = ReactCurrentOwner.current;
@@ -287,7 +271,7 @@ var ReactComponentTreeHook = {
287
271
  return info;
288
272
  },
289
273
  getChildIDs: function (id) {
290
- var item = get(id);
274
+ var item = getItem(id);
291
275
  return item ? item.childIDs : [];
292
276
  },
293
277
  getDisplayName: function (id) {
@@ -298,7 +282,7 @@ var ReactComponentTreeHook = {
298
282
  return getDisplayName(element);
299
283
  },
300
284
  getElement: function (id) {
301
- var item = get(id);
285
+ var item = getItem(id);
302
286
  return item ? item.element : null;
303
287
  },
304
288
  getOwnerID: function (id) {
@@ -309,11 +293,11 @@ var ReactComponentTreeHook = {
309
293
  return element._owner._debugID;
310
294
  },
311
295
  getParentID: function (id) {
312
- var item = get(id);
296
+ var item = getItem(id);
313
297
  return item ? item.parentID : null;
314
298
  },
315
299
  getSource: function (id) {
316
- var item = get(id);
300
+ var item = getItem(id);
317
301
  var element = item ? item.element : null;
318
302
  var source = element != null ? element._source : null;
319
303
  return source;
@@ -329,14 +313,13 @@ var ReactComponentTreeHook = {
329
313
  }
330
314
  },
331
315
  getUpdateCount: function (id) {
332
- var item = get(id);
316
+ var item = getItem(id);
333
317
  return item ? item.updateCount : 0;
334
318
  },
335
319
 
336
320
 
337
- getRegisteredIDs: getRegisteredIDs,
338
-
339
- getRootIDs: getRootIDs
321
+ getRootIDs: getRootIDs,
322
+ getRegisteredIDs: getItemIDs
340
323
  };
341
324
 
342
325
  module.exports = ReactComponentTreeHook;
@@ -6,15 +6,12 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule DOMNamespaces
10
9
  */
11
10
 
11
+ /* globals React */
12
+
12
13
  'use strict';
13
14
 
14
- var DOMNamespaces = {
15
- html: 'http://www.w3.org/1999/xhtml',
16
- mathml: 'http://www.w3.org/1998/Math/MathML',
17
- svg: 'http://www.w3.org/2000/svg'
18
- };
15
+ var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
19
16
 
20
- module.exports = DOMNamespaces;
17
+ module.exports = ReactInternals.ReactComponentTreeHook;
@@ -6,7 +6,6 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactComponentWithPureRenderMixin
10
9
  */
11
10
 
12
11
  'use strict';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactCurrentOwner
9
+ *
10
10
  */
11
11
 
12
12
  'use strict';
@@ -17,7 +17,6 @@
17
17
  * The current owner is the component who should own any components that are
18
18
  * currently being constructed.
19
19
  */
20
-
21
20
  var ReactCurrentOwner = {
22
21
 
23
22
  /**
@@ -6,11 +6,12 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule renderSubtreeIntoContainer
10
- */
9
+ */
10
+
11
+ /* globals React */
11
12
 
12
13
  'use strict';
13
14
 
14
- var ReactMount = require('./ReactMount');
15
+ var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
15
16
 
16
- module.exports = ReactMount.renderSubtreeIntoContainer;
17
+ module.exports = ReactInternals.ReactCurrentOwner;
@@ -6,7 +6,6 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactDOMFactories
10
9
  */
11
10
 
12
11
  'use strict';
@@ -6,7 +6,6 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactElement
10
9
  */
11
10
 
12
11
  'use strict';
@@ -19,9 +18,7 @@ var warning = require('fbjs/lib/warning');
19
18
  var canDefineProperty = require('./canDefineProperty');
20
19
  var hasOwnProperty = Object.prototype.hasOwnProperty;
21
20
 
22
- // The Symbol used to tag the ReactElement type. If there is no native Symbol
23
- // nor polyfill, then a plain number is used for performance.
24
- var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
21
+ var REACT_ELEMENT_TYPE = require('./ReactElementSymbol');
25
22
 
26
23
  var RESERVED_PROPS = {
27
24
  key: true,
@@ -125,7 +122,6 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
125
122
  // This can be replaced with a WeakMap once they are implemented in
126
123
  // commonly used development environments.
127
124
  element._store = {};
128
- var shadowChildren = Array.isArray(props.children) ? props.children.slice(0) : props.children;
129
125
 
130
126
  // To make comparing ReactElements easier for testing purposes, we make
131
127
  // the validation flag non-enumerable (where possible, which should
@@ -145,12 +141,6 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
145
141
  writable: false,
146
142
  value: self
147
143
  });
148
- Object.defineProperty(element, '_shadowChildren', {
149
- configurable: false,
150
- enumerable: false,
151
- writable: false,
152
- value: shadowChildren
153
- });
154
144
  // Two elements created in two different places should be considered
155
145
  // equal for testing purposes and therefore we hide it from enumeration.
156
146
  Object.defineProperty(element, '_source', {
@@ -162,7 +152,6 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
162
152
  } else {
163
153
  element._store.validated = false;
164
154
  element._self = self;
165
- element._shadowChildren = shadowChildren;
166
155
  element._source = source;
167
156
  }
168
157
  if (Object.freeze) {
@@ -217,6 +206,11 @@ ReactElement.createElement = function (type, config, children) {
217
206
  for (var i = 0; i < childrenLength; i++) {
218
207
  childArray[i] = arguments[i + 2];
219
208
  }
209
+ if (process.env.NODE_ENV !== 'production') {
210
+ if (Object.freeze) {
211
+ Object.freeze(childArray);
212
+ }
213
+ }
220
214
  props.children = childArray;
221
215
  }
222
216
 
@@ -343,6 +337,4 @@ ReactElement.isValidElement = function (object) {
343
337
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
344
338
  };
345
339
 
346
- ReactElement.REACT_ELEMENT_TYPE = REACT_ELEMENT_TYPE;
347
-
348
340
  module.exports = ReactElement;