react 15.3.0-rc.2 → 15.3.1-rc.2
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.
- package/dist/react-with-addons.js +1362 -1408
- package/dist/react-with-addons.min.js +6 -6
- package/dist/react.js +1291 -1339
- package/dist/react.min.js +6 -6
- package/lib/DOMPropertyOperations.js +0 -7
- package/lib/EventPluginHub.js +2 -0
- package/lib/ReactChildReconciler.js +21 -5
- package/lib/{ReactChildrenMutationWarningDevtool.js → ReactChildrenMutationWarningHook.js} +11 -19
- package/lib/ReactComponentBrowserEnvironment.js +1 -10
- package/lib/ReactComponentEnvironment.js +0 -8
- package/lib/ReactComponentTreeDevtool.js +2 -205
- package/lib/ReactComponentTreeHook.js +342 -0
- package/lib/ReactComponentTreeTestUtils.js +11 -11
- package/lib/ReactCompositeComponent.js +10 -34
- package/lib/ReactDOM.js +9 -0
- package/lib/ReactDOMComponent.js +23 -43
- package/lib/ReactDOMComponentTree.js +1 -1
- package/lib/ReactDOMEmptyComponent.js +1 -1
- package/lib/ReactDOMFactories.js +138 -144
- package/lib/ReactDOMInput.js +25 -3
- package/lib/{ReactDOMNullInputValuePropDevtool.js → ReactDOMNullInputValuePropHook.js} +5 -5
- package/lib/ReactDOMSelect.js +5 -4
- package/lib/ReactDOMTextComponent.js +1 -8
- package/lib/{ReactDOMUnknownPropertyDevtool.js → ReactDOMUnknownPropertyHook.js} +8 -8
- package/lib/ReactDebugTool.js +73 -79
- package/lib/ReactElement.js +37 -33
- package/lib/ReactElementValidator.js +5 -3
- package/lib/{ReactHostOperationHistoryDevtool.js → ReactHostOperationHistoryHook.js} +4 -4
- package/lib/{ReactInvalidSetStateWarningDevTool.js → ReactInvalidSetStateWarningHook.js} +3 -3
- package/lib/ReactMount.js +3 -7
- package/lib/ReactMultiChild.js +11 -13
- package/lib/ReactNativeBaseComponent.js +5 -3
- package/lib/ReactNativeComponentEnvironment.js +0 -7
- package/lib/ReactNativeMount.js +2 -5
- package/lib/ReactNativeTextComponent.js +2 -10
- package/lib/ReactPropTypes.js +4 -2
- package/lib/ReactReconciler.js +5 -11
- package/lib/ReactServerRendering.js +2 -1
- package/lib/ReactSimpleEmptyComponent.js +3 -2
- package/lib/ReactTestMount.js +0 -5
- package/lib/ReactTestUtils.js +8 -6
- package/lib/ReactUpdateQueue.js +2 -1
- package/lib/ReactVersion.js +1 -1
- package/lib/ResponderEventPlugin.js +6 -5
- package/lib/SimpleEventPlugin.js +2 -0
- package/lib/SyntheticEvent.js +8 -1
- package/lib/checkReactTypeSpec.js +16 -3
- package/lib/createReactNativeComponentClass.js +1 -1
- package/lib/flattenChildren.js +17 -2
- package/lib/instantiateReactComponent.js +1 -28
- package/package.json +1 -1
- package/lib/ReactDOMDebugTool.js +0 -67
- package/lib/ReactDOMInstrumentation.js +0 -21
- package/lib/createHierarchyRenderer.js +0 -85
|
@@ -17,23 +17,23 @@ var _extends = _assign || function (target) { for (var i = 1; i < arguments.leng
|
|
|
17
17
|
|
|
18
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var ReactComponentTreeHook = require('./ReactComponentTreeHook');
|
|
21
21
|
|
|
22
22
|
function getRootDisplayNames() {
|
|
23
|
-
return
|
|
23
|
+
return ReactComponentTreeHook.getRootIDs().map(ReactComponentTreeHook.getDisplayName);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function getRegisteredDisplayNames() {
|
|
27
|
-
return
|
|
27
|
+
return ReactComponentTreeHook.getRegisteredIDs().map(ReactComponentTreeHook.getDisplayName);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function expectTree(rootID, expectedTree, parentPath) {
|
|
31
|
-
var displayName =
|
|
32
|
-
var ownerID =
|
|
33
|
-
var parentID =
|
|
34
|
-
var childIDs =
|
|
35
|
-
var text =
|
|
36
|
-
var element =
|
|
31
|
+
var displayName = ReactComponentTreeHook.getDisplayName(rootID);
|
|
32
|
+
var ownerID = ReactComponentTreeHook.getOwnerID(rootID);
|
|
33
|
+
var parentID = ReactComponentTreeHook.getParentID(rootID);
|
|
34
|
+
var childIDs = ReactComponentTreeHook.getChildIDs(rootID);
|
|
35
|
+
var text = ReactComponentTreeHook.getText(rootID);
|
|
36
|
+
var element = ReactComponentTreeHook.getElement(rootID);
|
|
37
37
|
var path = parentPath ? parentPath + ' > ' + displayName : displayName;
|
|
38
38
|
|
|
39
39
|
function expectEqual(actual, expected, name) {
|
|
@@ -47,10 +47,10 @@ function expectTree(rootID, expectedTree, parentPath) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (expectedTree.parentDisplayName !== undefined) {
|
|
50
|
-
expectEqual(
|
|
50
|
+
expectEqual(ReactComponentTreeHook.getDisplayName(parentID), expectedTree.parentDisplayName, 'parentDisplayName');
|
|
51
51
|
}
|
|
52
52
|
if (expectedTree.ownerDisplayName !== undefined) {
|
|
53
|
-
expectEqual(
|
|
53
|
+
expectEqual(ReactComponentTreeHook.getDisplayName(ownerID), expectedTree.ownerDisplayName, 'ownerDisplayName');
|
|
54
54
|
}
|
|
55
55
|
if (expectedTree.parentID !== undefined) {
|
|
56
56
|
expectEqual(parentID, expectedTree.parentID, 'parentID');
|
|
@@ -131,7 +131,7 @@ var ReactCompositeComponentMixin = {
|
|
|
131
131
|
*/
|
|
132
132
|
construct: function (element) {
|
|
133
133
|
this._currentElement = element;
|
|
134
|
-
this._rootNodeID =
|
|
134
|
+
this._rootNodeID = 0;
|
|
135
135
|
this._compositeType = null;
|
|
136
136
|
this._instance = null;
|
|
137
137
|
this._hostParent = null;
|
|
@@ -173,8 +173,6 @@ var ReactCompositeComponentMixin = {
|
|
|
173
173
|
* @internal
|
|
174
174
|
*/
|
|
175
175
|
mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
|
176
|
-
var _this = this;
|
|
177
|
-
|
|
178
176
|
this._context = context;
|
|
179
177
|
this._mountOrder = nextMountID++;
|
|
180
178
|
this._hostParent = hostParent;
|
|
@@ -270,15 +268,6 @@ var ReactCompositeComponentMixin = {
|
|
|
270
268
|
}
|
|
271
269
|
}
|
|
272
270
|
|
|
273
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
274
|
-
if (this._debugID) {
|
|
275
|
-
var callback = function (component) {
|
|
276
|
-
return ReactInstrumentation.debugTool.onComponentHasMounted(_this._debugID);
|
|
277
|
-
};
|
|
278
|
-
transaction.getReactMountReady().enqueue(callback, this);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
271
|
return markup;
|
|
283
272
|
},
|
|
284
273
|
|
|
@@ -388,13 +377,12 @@ var ReactCompositeComponentMixin = {
|
|
|
388
377
|
var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
|
|
389
378
|
);
|
|
390
379
|
this._renderedComponent = child;
|
|
380
|
+
|
|
381
|
+
var selfDebugID = 0;
|
|
391
382
|
if (process.env.NODE_ENV !== 'production') {
|
|
392
|
-
|
|
393
|
-
ReactInstrumentation.debugTool.onSetParent(child._debugID, this._debugID);
|
|
394
|
-
}
|
|
383
|
+
selfDebugID = this._debugID;
|
|
395
384
|
}
|
|
396
|
-
|
|
397
|
-
var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context));
|
|
385
|
+
var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), selfDebugID);
|
|
398
386
|
|
|
399
387
|
if (process.env.NODE_ENV !== 'production') {
|
|
400
388
|
if (this._debugID !== 0) {
|
|
@@ -460,7 +448,7 @@ var ReactCompositeComponentMixin = {
|
|
|
460
448
|
// These fields do not really need to be reset since this object is no
|
|
461
449
|
// longer accessible.
|
|
462
450
|
this._context = null;
|
|
463
|
-
this._rootNodeID =
|
|
451
|
+
this._rootNodeID = 0;
|
|
464
452
|
this._topLevelWrapper = null;
|
|
465
453
|
|
|
466
454
|
// Delete the reference from the instance to this internal representation
|
|
@@ -716,8 +704,6 @@ var ReactCompositeComponentMixin = {
|
|
|
716
704
|
* @private
|
|
717
705
|
*/
|
|
718
706
|
_performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
|
|
719
|
-
var _this2 = this;
|
|
720
|
-
|
|
721
707
|
var inst = this._instance;
|
|
722
708
|
|
|
723
709
|
var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
|
|
@@ -759,15 +745,6 @@ var ReactCompositeComponentMixin = {
|
|
|
759
745
|
transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
|
|
760
746
|
}
|
|
761
747
|
}
|
|
762
|
-
|
|
763
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
764
|
-
if (this._debugID) {
|
|
765
|
-
var callback = function () {
|
|
766
|
-
return ReactInstrumentation.debugTool.onComponentHasUpdated(_this2._debugID);
|
|
767
|
-
};
|
|
768
|
-
transaction.getReactMountReady().enqueue(callback, this);
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
748
|
},
|
|
772
749
|
|
|
773
750
|
/**
|
|
@@ -791,13 +768,12 @@ var ReactCompositeComponentMixin = {
|
|
|
791
768
|
var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
|
|
792
769
|
);
|
|
793
770
|
this._renderedComponent = child;
|
|
771
|
+
|
|
772
|
+
var selfDebugID = 0;
|
|
794
773
|
if (process.env.NODE_ENV !== 'production') {
|
|
795
|
-
|
|
796
|
-
ReactInstrumentation.debugTool.onSetParent(child._debugID, this._debugID);
|
|
797
|
-
}
|
|
774
|
+
selfDebugID = this._debugID;
|
|
798
775
|
}
|
|
799
|
-
|
|
800
|
-
var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context));
|
|
776
|
+
var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), selfDebugID);
|
|
801
777
|
|
|
802
778
|
if (process.env.NODE_ENV !== 'production') {
|
|
803
779
|
if (this._debugID !== 0) {
|
package/lib/ReactDOM.js
CHANGED
|
@@ -98,4 +98,13 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
102
|
+
var ReactInstrumentation = require('./ReactInstrumentation');
|
|
103
|
+
var ReactDOMUnknownPropertyHook = require('./ReactDOMUnknownPropertyHook');
|
|
104
|
+
var ReactDOMNullInputValuePropHook = require('./ReactDOMNullInputValuePropHook');
|
|
105
|
+
|
|
106
|
+
ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
|
|
107
|
+
ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
|
|
108
|
+
}
|
|
109
|
+
|
|
101
110
|
module.exports = ReactDOM;
|
package/lib/ReactDOMComponent.js
CHANGED
|
@@ -26,7 +26,6 @@ var EventConstants = require('./EventConstants');
|
|
|
26
26
|
var EventPluginHub = require('./EventPluginHub');
|
|
27
27
|
var EventPluginRegistry = require('./EventPluginRegistry');
|
|
28
28
|
var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
|
|
29
|
-
var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
|
|
30
29
|
var ReactDOMButton = require('./ReactDOMButton');
|
|
31
30
|
var ReactDOMComponentFlags = require('./ReactDOMComponentFlags');
|
|
32
31
|
var ReactDOMComponentTree = require('./ReactDOMComponentTree');
|
|
@@ -201,7 +200,8 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
201
200
|
setContentChildForInstrumentation = function (content) {
|
|
202
201
|
var hasExistingContent = this._contentDebugID != null;
|
|
203
202
|
var debugID = this._debugID;
|
|
204
|
-
|
|
203
|
+
// This ID represents the inlined child that has no backing instance:
|
|
204
|
+
var contentDebugID = -debugID;
|
|
205
205
|
|
|
206
206
|
if (content == null) {
|
|
207
207
|
if (hasExistingContent) {
|
|
@@ -212,17 +212,11 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
this._contentDebugID = contentDebugID;
|
|
215
|
-
var text = '' + content;
|
|
216
|
-
|
|
217
|
-
ReactInstrumentation.debugTool.onSetDisplayName(contentDebugID, '#text');
|
|
218
|
-
ReactInstrumentation.debugTool.onSetParent(contentDebugID, debugID);
|
|
219
|
-
ReactInstrumentation.debugTool.onSetText(contentDebugID, text);
|
|
220
|
-
|
|
221
215
|
if (hasExistingContent) {
|
|
222
216
|
ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
|
|
223
217
|
ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
|
|
224
218
|
} else {
|
|
225
|
-
ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content);
|
|
219
|
+
ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
|
|
226
220
|
ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
|
|
227
221
|
ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
|
|
228
222
|
}
|
|
@@ -383,8 +377,8 @@ function ReactDOMComponent(element) {
|
|
|
383
377
|
this._previousStyleCopy = null;
|
|
384
378
|
this._hostNode = null;
|
|
385
379
|
this._hostParent = null;
|
|
386
|
-
this._rootNodeID =
|
|
387
|
-
this._domID =
|
|
380
|
+
this._rootNodeID = 0;
|
|
381
|
+
this._domID = 0;
|
|
388
382
|
this._hostContainerInfo = null;
|
|
389
383
|
this._wrapperState = null;
|
|
390
384
|
this._topLevelWrapper = null;
|
|
@@ -405,14 +399,12 @@ ReactDOMComponent.Mixin = {
|
|
|
405
399
|
*
|
|
406
400
|
* @internal
|
|
407
401
|
* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
|
|
408
|
-
* @param {?ReactDOMComponent} the
|
|
402
|
+
* @param {?ReactDOMComponent} the parent component instance
|
|
409
403
|
* @param {?object} info about the host container
|
|
410
404
|
* @param {object} context
|
|
411
405
|
* @return {string} The computed markup.
|
|
412
406
|
*/
|
|
413
407
|
mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
|
414
|
-
var _this = this;
|
|
415
|
-
|
|
416
408
|
this._rootNodeID = globalIdCounter++;
|
|
417
409
|
this._domID = hostContainerInfo._idCounter++;
|
|
418
410
|
this._hostParent = hostParent;
|
|
@@ -568,15 +560,6 @@ ReactDOMComponent.Mixin = {
|
|
|
568
560
|
break;
|
|
569
561
|
}
|
|
570
562
|
|
|
571
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
572
|
-
if (this._debugID) {
|
|
573
|
-
var callback = function () {
|
|
574
|
-
return ReactInstrumentation.debugTool.onComponentHasMounted(_this._debugID);
|
|
575
|
-
};
|
|
576
|
-
transaction.getReactMountReady().enqueue(callback, this);
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
563
|
return mountImage;
|
|
581
564
|
},
|
|
582
565
|
|
|
@@ -745,8 +728,6 @@ ReactDOMComponent.Mixin = {
|
|
|
745
728
|
* @overridable
|
|
746
729
|
*/
|
|
747
730
|
updateComponent: function (transaction, prevElement, nextElement, context) {
|
|
748
|
-
var _this2 = this;
|
|
749
|
-
|
|
750
731
|
var lastProps = prevElement.props;
|
|
751
732
|
var nextProps = this._currentElement.props;
|
|
752
733
|
|
|
@@ -756,7 +737,6 @@ ReactDOMComponent.Mixin = {
|
|
|
756
737
|
nextProps = ReactDOMButton.getHostProps(this, nextProps);
|
|
757
738
|
break;
|
|
758
739
|
case 'input':
|
|
759
|
-
ReactDOMInput.updateWrapper(this);
|
|
760
740
|
lastProps = ReactDOMInput.getHostProps(this, lastProps);
|
|
761
741
|
nextProps = ReactDOMInput.getHostProps(this, nextProps);
|
|
762
742
|
break;
|
|
@@ -769,7 +749,6 @@ ReactDOMComponent.Mixin = {
|
|
|
769
749
|
nextProps = ReactDOMSelect.getHostProps(this, nextProps);
|
|
770
750
|
break;
|
|
771
751
|
case 'textarea':
|
|
772
|
-
ReactDOMTextarea.updateWrapper(this);
|
|
773
752
|
lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
|
|
774
753
|
nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
|
|
775
754
|
break;
|
|
@@ -779,19 +758,21 @@ ReactDOMComponent.Mixin = {
|
|
|
779
758
|
this._updateDOMProperties(lastProps, nextProps, transaction);
|
|
780
759
|
this._updateDOMChildren(lastProps, nextProps, transaction, context);
|
|
781
760
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
761
|
+
switch (this._tag) {
|
|
762
|
+
case 'input':
|
|
763
|
+
// Update the wrapper around inputs *after* updating props. This has to
|
|
764
|
+
// happen after `_updateDOMProperties`. Otherwise HTML5 input validations
|
|
765
|
+
// raise warnings and prevent the new value from being assigned.
|
|
766
|
+
ReactDOMInput.updateWrapper(this);
|
|
767
|
+
break;
|
|
768
|
+
case 'textarea':
|
|
769
|
+
ReactDOMTextarea.updateWrapper(this);
|
|
770
|
+
break;
|
|
771
|
+
case 'select':
|
|
772
|
+
// <select> value update needs to occur after <option> children
|
|
773
|
+
// reconciliation
|
|
774
|
+
transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
|
|
775
|
+
break;
|
|
795
776
|
}
|
|
796
777
|
},
|
|
797
778
|
|
|
@@ -1004,9 +985,8 @@ ReactDOMComponent.Mixin = {
|
|
|
1004
985
|
this.unmountChildren(safely);
|
|
1005
986
|
ReactDOMComponentTree.uncacheNode(this);
|
|
1006
987
|
EventPluginHub.deleteAllListeners(this);
|
|
1007
|
-
|
|
1008
|
-
this.
|
|
1009
|
-
this._domID = null;
|
|
988
|
+
this._rootNodeID = 0;
|
|
989
|
+
this._domID = 0;
|
|
1010
990
|
this._wrapperState = null;
|
|
1011
991
|
|
|
1012
992
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -82,7 +82,7 @@ function precacheChildNodes(inst, node) {
|
|
|
82
82
|
}
|
|
83
83
|
var childInst = children[name];
|
|
84
84
|
var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
|
|
85
|
-
if (childID
|
|
85
|
+
if (childID === 0) {
|
|
86
86
|
// We're currently unmounting this child in ReactMultiChild; skip it.
|
|
87
87
|
continue;
|
|
88
88
|
}
|
|
@@ -23,7 +23,7 @@ var ReactDOMEmptyComponent = function (instantiate) {
|
|
|
23
23
|
this._hostNode = null;
|
|
24
24
|
this._hostParent = null;
|
|
25
25
|
this._hostContainerInfo = null;
|
|
26
|
-
this._domID =
|
|
26
|
+
this._domID = 0;
|
|
27
27
|
};
|
|
28
28
|
_assign(ReactDOMEmptyComponent.prototype, {
|
|
29
29
|
mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
package/lib/ReactDOMFactories.js
CHANGED
|
@@ -13,20 +13,15 @@
|
|
|
13
13
|
|
|
14
14
|
var ReactElement = require('./ReactElement');
|
|
15
15
|
|
|
16
|
-
var mapObject = require('fbjs/lib/mapObject');
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
* Create a factory that creates HTML tag elements.
|
|
20
18
|
*
|
|
21
|
-
* @param {string} tag Tag name (e.g. `div`).
|
|
22
19
|
* @private
|
|
23
20
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
return ReactElement.createFactory(tag);
|
|
21
|
+
var createDOMFactory = ReactElement.createFactory;
|
|
22
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
23
|
+
var ReactElementValidator = require('./ReactElementValidator');
|
|
24
|
+
createDOMFactory = ReactElementValidator.createFactory;
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
/**
|
|
@@ -35,142 +30,141 @@ function createDOMFactory(tag) {
|
|
|
35
30
|
*
|
|
36
31
|
* @public
|
|
37
32
|
*/
|
|
38
|
-
var ReactDOMFactories =
|
|
39
|
-
a: 'a',
|
|
40
|
-
abbr: 'abbr',
|
|
41
|
-
address: 'address',
|
|
42
|
-
area: 'area',
|
|
43
|
-
article: 'article',
|
|
44
|
-
aside: 'aside',
|
|
45
|
-
audio: 'audio',
|
|
46
|
-
b: 'b',
|
|
47
|
-
base: 'base',
|
|
48
|
-
bdi: 'bdi',
|
|
49
|
-
bdo: 'bdo',
|
|
50
|
-
big: 'big',
|
|
51
|
-
blockquote: 'blockquote',
|
|
52
|
-
body: 'body',
|
|
53
|
-
br: 'br',
|
|
54
|
-
button: 'button',
|
|
55
|
-
canvas: 'canvas',
|
|
56
|
-
caption: 'caption',
|
|
57
|
-
cite: 'cite',
|
|
58
|
-
code: 'code',
|
|
59
|
-
col: 'col',
|
|
60
|
-
colgroup: 'colgroup',
|
|
61
|
-
data: 'data',
|
|
62
|
-
datalist: 'datalist',
|
|
63
|
-
dd: 'dd',
|
|
64
|
-
del: 'del',
|
|
65
|
-
details: 'details',
|
|
66
|
-
dfn: 'dfn',
|
|
67
|
-
dialog: 'dialog',
|
|
68
|
-
div: 'div',
|
|
69
|
-
dl: 'dl',
|
|
70
|
-
dt: 'dt',
|
|
71
|
-
em: 'em',
|
|
72
|
-
embed: 'embed',
|
|
73
|
-
fieldset: 'fieldset',
|
|
74
|
-
figcaption: 'figcaption',
|
|
75
|
-
figure: 'figure',
|
|
76
|
-
footer: 'footer',
|
|
77
|
-
form: 'form',
|
|
78
|
-
h1: 'h1',
|
|
79
|
-
h2: 'h2',
|
|
80
|
-
h3: 'h3',
|
|
81
|
-
h4: 'h4',
|
|
82
|
-
h5: 'h5',
|
|
83
|
-
h6: 'h6',
|
|
84
|
-
head: 'head',
|
|
85
|
-
header: 'header',
|
|
86
|
-
hgroup: 'hgroup',
|
|
87
|
-
hr: 'hr',
|
|
88
|
-
html: 'html',
|
|
89
|
-
i: 'i',
|
|
90
|
-
iframe: 'iframe',
|
|
91
|
-
img: 'img',
|
|
92
|
-
input: 'input',
|
|
93
|
-
ins: 'ins',
|
|
94
|
-
kbd: 'kbd',
|
|
95
|
-
keygen: 'keygen',
|
|
96
|
-
label: 'label',
|
|
97
|
-
legend: 'legend',
|
|
98
|
-
li: 'li',
|
|
99
|
-
link: 'link',
|
|
100
|
-
main: 'main',
|
|
101
|
-
map: 'map',
|
|
102
|
-
mark: 'mark',
|
|
103
|
-
menu: 'menu',
|
|
104
|
-
menuitem: 'menuitem',
|
|
105
|
-
meta: 'meta',
|
|
106
|
-
meter: 'meter',
|
|
107
|
-
nav: 'nav',
|
|
108
|
-
noscript: 'noscript',
|
|
109
|
-
object: 'object',
|
|
110
|
-
ol: 'ol',
|
|
111
|
-
optgroup: 'optgroup',
|
|
112
|
-
option: 'option',
|
|
113
|
-
output: 'output',
|
|
114
|
-
p: 'p',
|
|
115
|
-
param: 'param',
|
|
116
|
-
picture: 'picture',
|
|
117
|
-
pre: 'pre',
|
|
118
|
-
progress: 'progress',
|
|
119
|
-
q: 'q',
|
|
120
|
-
rp: 'rp',
|
|
121
|
-
rt: 'rt',
|
|
122
|
-
ruby: 'ruby',
|
|
123
|
-
s: 's',
|
|
124
|
-
samp: 'samp',
|
|
125
|
-
script: 'script',
|
|
126
|
-
section: 'section',
|
|
127
|
-
select: 'select',
|
|
128
|
-
small: 'small',
|
|
129
|
-
source: 'source',
|
|
130
|
-
span: 'span',
|
|
131
|
-
strong: 'strong',
|
|
132
|
-
style: 'style',
|
|
133
|
-
sub: 'sub',
|
|
134
|
-
summary: 'summary',
|
|
135
|
-
sup: 'sup',
|
|
136
|
-
table: 'table',
|
|
137
|
-
tbody: 'tbody',
|
|
138
|
-
td: 'td',
|
|
139
|
-
textarea: 'textarea',
|
|
140
|
-
tfoot: 'tfoot',
|
|
141
|
-
th: 'th',
|
|
142
|
-
thead: 'thead',
|
|
143
|
-
time: 'time',
|
|
144
|
-
title: 'title',
|
|
145
|
-
tr: 'tr',
|
|
146
|
-
track: 'track',
|
|
147
|
-
u: 'u',
|
|
148
|
-
ul: 'ul',
|
|
149
|
-
'var': 'var',
|
|
150
|
-
video: 'video',
|
|
151
|
-
wbr: 'wbr',
|
|
33
|
+
var ReactDOMFactories = {
|
|
34
|
+
a: createDOMFactory('a'),
|
|
35
|
+
abbr: createDOMFactory('abbr'),
|
|
36
|
+
address: createDOMFactory('address'),
|
|
37
|
+
area: createDOMFactory('area'),
|
|
38
|
+
article: createDOMFactory('article'),
|
|
39
|
+
aside: createDOMFactory('aside'),
|
|
40
|
+
audio: createDOMFactory('audio'),
|
|
41
|
+
b: createDOMFactory('b'),
|
|
42
|
+
base: createDOMFactory('base'),
|
|
43
|
+
bdi: createDOMFactory('bdi'),
|
|
44
|
+
bdo: createDOMFactory('bdo'),
|
|
45
|
+
big: createDOMFactory('big'),
|
|
46
|
+
blockquote: createDOMFactory('blockquote'),
|
|
47
|
+
body: createDOMFactory('body'),
|
|
48
|
+
br: createDOMFactory('br'),
|
|
49
|
+
button: createDOMFactory('button'),
|
|
50
|
+
canvas: createDOMFactory('canvas'),
|
|
51
|
+
caption: createDOMFactory('caption'),
|
|
52
|
+
cite: createDOMFactory('cite'),
|
|
53
|
+
code: createDOMFactory('code'),
|
|
54
|
+
col: createDOMFactory('col'),
|
|
55
|
+
colgroup: createDOMFactory('colgroup'),
|
|
56
|
+
data: createDOMFactory('data'),
|
|
57
|
+
datalist: createDOMFactory('datalist'),
|
|
58
|
+
dd: createDOMFactory('dd'),
|
|
59
|
+
del: createDOMFactory('del'),
|
|
60
|
+
details: createDOMFactory('details'),
|
|
61
|
+
dfn: createDOMFactory('dfn'),
|
|
62
|
+
dialog: createDOMFactory('dialog'),
|
|
63
|
+
div: createDOMFactory('div'),
|
|
64
|
+
dl: createDOMFactory('dl'),
|
|
65
|
+
dt: createDOMFactory('dt'),
|
|
66
|
+
em: createDOMFactory('em'),
|
|
67
|
+
embed: createDOMFactory('embed'),
|
|
68
|
+
fieldset: createDOMFactory('fieldset'),
|
|
69
|
+
figcaption: createDOMFactory('figcaption'),
|
|
70
|
+
figure: createDOMFactory('figure'),
|
|
71
|
+
footer: createDOMFactory('footer'),
|
|
72
|
+
form: createDOMFactory('form'),
|
|
73
|
+
h1: createDOMFactory('h1'),
|
|
74
|
+
h2: createDOMFactory('h2'),
|
|
75
|
+
h3: createDOMFactory('h3'),
|
|
76
|
+
h4: createDOMFactory('h4'),
|
|
77
|
+
h5: createDOMFactory('h5'),
|
|
78
|
+
h6: createDOMFactory('h6'),
|
|
79
|
+
head: createDOMFactory('head'),
|
|
80
|
+
header: createDOMFactory('header'),
|
|
81
|
+
hgroup: createDOMFactory('hgroup'),
|
|
82
|
+
hr: createDOMFactory('hr'),
|
|
83
|
+
html: createDOMFactory('html'),
|
|
84
|
+
i: createDOMFactory('i'),
|
|
85
|
+
iframe: createDOMFactory('iframe'),
|
|
86
|
+
img: createDOMFactory('img'),
|
|
87
|
+
input: createDOMFactory('input'),
|
|
88
|
+
ins: createDOMFactory('ins'),
|
|
89
|
+
kbd: createDOMFactory('kbd'),
|
|
90
|
+
keygen: createDOMFactory('keygen'),
|
|
91
|
+
label: createDOMFactory('label'),
|
|
92
|
+
legend: createDOMFactory('legend'),
|
|
93
|
+
li: createDOMFactory('li'),
|
|
94
|
+
link: createDOMFactory('link'),
|
|
95
|
+
main: createDOMFactory('main'),
|
|
96
|
+
map: createDOMFactory('map'),
|
|
97
|
+
mark: createDOMFactory('mark'),
|
|
98
|
+
menu: createDOMFactory('menu'),
|
|
99
|
+
menuitem: createDOMFactory('menuitem'),
|
|
100
|
+
meta: createDOMFactory('meta'),
|
|
101
|
+
meter: createDOMFactory('meter'),
|
|
102
|
+
nav: createDOMFactory('nav'),
|
|
103
|
+
noscript: createDOMFactory('noscript'),
|
|
104
|
+
object: createDOMFactory('object'),
|
|
105
|
+
ol: createDOMFactory('ol'),
|
|
106
|
+
optgroup: createDOMFactory('optgroup'),
|
|
107
|
+
option: createDOMFactory('option'),
|
|
108
|
+
output: createDOMFactory('output'),
|
|
109
|
+
p: createDOMFactory('p'),
|
|
110
|
+
param: createDOMFactory('param'),
|
|
111
|
+
picture: createDOMFactory('picture'),
|
|
112
|
+
pre: createDOMFactory('pre'),
|
|
113
|
+
progress: createDOMFactory('progress'),
|
|
114
|
+
q: createDOMFactory('q'),
|
|
115
|
+
rp: createDOMFactory('rp'),
|
|
116
|
+
rt: createDOMFactory('rt'),
|
|
117
|
+
ruby: createDOMFactory('ruby'),
|
|
118
|
+
s: createDOMFactory('s'),
|
|
119
|
+
samp: createDOMFactory('samp'),
|
|
120
|
+
script: createDOMFactory('script'),
|
|
121
|
+
section: createDOMFactory('section'),
|
|
122
|
+
select: createDOMFactory('select'),
|
|
123
|
+
small: createDOMFactory('small'),
|
|
124
|
+
source: createDOMFactory('source'),
|
|
125
|
+
span: createDOMFactory('span'),
|
|
126
|
+
strong: createDOMFactory('strong'),
|
|
127
|
+
style: createDOMFactory('style'),
|
|
128
|
+
sub: createDOMFactory('sub'),
|
|
129
|
+
summary: createDOMFactory('summary'),
|
|
130
|
+
sup: createDOMFactory('sup'),
|
|
131
|
+
table: createDOMFactory('table'),
|
|
132
|
+
tbody: createDOMFactory('tbody'),
|
|
133
|
+
td: createDOMFactory('td'),
|
|
134
|
+
textarea: createDOMFactory('textarea'),
|
|
135
|
+
tfoot: createDOMFactory('tfoot'),
|
|
136
|
+
th: createDOMFactory('th'),
|
|
137
|
+
thead: createDOMFactory('thead'),
|
|
138
|
+
time: createDOMFactory('time'),
|
|
139
|
+
title: createDOMFactory('title'),
|
|
140
|
+
tr: createDOMFactory('tr'),
|
|
141
|
+
track: createDOMFactory('track'),
|
|
142
|
+
u: createDOMFactory('u'),
|
|
143
|
+
ul: createDOMFactory('ul'),
|
|
144
|
+
'var': createDOMFactory('var'),
|
|
145
|
+
video: createDOMFactory('video'),
|
|
146
|
+
wbr: createDOMFactory('wbr'),
|
|
152
147
|
|
|
153
148
|
// SVG
|
|
154
|
-
circle: 'circle',
|
|
155
|
-
clipPath: 'clipPath',
|
|
156
|
-
defs: 'defs',
|
|
157
|
-
ellipse: 'ellipse',
|
|
158
|
-
g: 'g',
|
|
159
|
-
image: 'image',
|
|
160
|
-
line: 'line',
|
|
161
|
-
linearGradient: 'linearGradient',
|
|
162
|
-
mask: 'mask',
|
|
163
|
-
path: 'path',
|
|
164
|
-
pattern: 'pattern',
|
|
165
|
-
polygon: 'polygon',
|
|
166
|
-
polyline: 'polyline',
|
|
167
|
-
radialGradient: 'radialGradient',
|
|
168
|
-
rect: 'rect',
|
|
169
|
-
stop: 'stop',
|
|
170
|
-
svg: 'svg',
|
|
171
|
-
text: 'text',
|
|
172
|
-
tspan: 'tspan'
|
|
173
|
-
|
|
174
|
-
}, createDOMFactory);
|
|
149
|
+
circle: createDOMFactory('circle'),
|
|
150
|
+
clipPath: createDOMFactory('clipPath'),
|
|
151
|
+
defs: createDOMFactory('defs'),
|
|
152
|
+
ellipse: createDOMFactory('ellipse'),
|
|
153
|
+
g: createDOMFactory('g'),
|
|
154
|
+
image: createDOMFactory('image'),
|
|
155
|
+
line: createDOMFactory('line'),
|
|
156
|
+
linearGradient: createDOMFactory('linearGradient'),
|
|
157
|
+
mask: createDOMFactory('mask'),
|
|
158
|
+
path: createDOMFactory('path'),
|
|
159
|
+
pattern: createDOMFactory('pattern'),
|
|
160
|
+
polygon: createDOMFactory('polygon'),
|
|
161
|
+
polyline: createDOMFactory('polyline'),
|
|
162
|
+
radialGradient: createDOMFactory('radialGradient'),
|
|
163
|
+
rect: createDOMFactory('rect'),
|
|
164
|
+
stop: createDOMFactory('stop'),
|
|
165
|
+
svg: createDOMFactory('svg'),
|
|
166
|
+
text: createDOMFactory('text'),
|
|
167
|
+
tspan: createDOMFactory('tspan')
|
|
168
|
+
};
|
|
175
169
|
|
|
176
170
|
module.exports = ReactDOMFactories;
|