react 0.11.2 → 0.12.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/JSXTransformer.js +2714 -7859
- package/dist/react-with-addons.js +3139 -3593
- package/dist/react-with-addons.min.js +11 -17
- package/dist/react.js +2940 -3308
- package/dist/react.min.js +11 -16
- package/lib/AutoFocusMixin.js +5 -12
- package/lib/BeforeInputEventPlugin.js +12 -14
- package/lib/CSSCore.js +6 -13
- package/lib/CSSProperty.js +10 -14
- package/lib/CSSPropertyOperations.js +46 -12
- package/lib/CallbackQueue.js +7 -14
- package/lib/ChangeEventPlugin.js +5 -12
- package/lib/ClientReactRootIndex.js +5 -12
- package/lib/CompositionEventPlugin.js +5 -12
- package/lib/DOMChildrenOperations.js +8 -15
- package/lib/DOMProperty.js +16 -19
- package/lib/DOMPropertyOperations.js +14 -14
- package/lib/Danger.js +12 -17
- package/lib/DefaultEventPluginOrder.js +5 -12
- package/lib/EnterLeaveEventPlugin.js +5 -12
- package/lib/EventConstants.js +5 -12
- package/lib/EventListener.js +14 -0
- package/lib/EventPluginHub.js +8 -26
- package/lib/EventPluginRegistry.js +5 -12
- package/lib/EventPluginUtils.js +5 -12
- package/lib/EventPropagators.js +12 -17
- package/lib/ExecutionEnvironment.js +5 -12
- package/lib/HTMLDOMPropertyConfig.js +16 -15
- package/lib/LinkedStateMixin.js +5 -12
- package/lib/LinkedValueUtils.js +5 -12
- package/lib/LocalEventTrapMixin.js +8 -14
- package/lib/MobileSafariClickEventPlugin.js +5 -12
- package/lib/Object.assign.js +45 -0
- package/lib/PooledClass.js +5 -12
- package/lib/React.js +87 -54
- package/lib/ReactBrowserComponentMixin.js +5 -12
- package/lib/ReactBrowserEventEmitter.js +7 -14
- package/lib/ReactCSSTransitionGroup.js +15 -17
- package/lib/ReactCSSTransitionGroupChild.js +9 -13
- package/lib/ReactChildren.js +5 -12
- package/lib/ReactComponent.js +61 -68
- package/lib/ReactComponentBrowserEnvironment.js +5 -12
- package/lib/ReactComponentWithPureRenderMixin.js +5 -12
- package/lib/ReactCompositeComponent.js +191 -180
- package/lib/ReactContext.js +8 -15
- package/lib/ReactCurrentOwner.js +5 -12
- package/lib/ReactDOM.js +145 -177
- package/lib/ReactDOMButton.js +8 -14
- package/lib/ReactDOMComponent.js +103 -38
- package/lib/ReactDOMForm.js +9 -15
- package/lib/ReactDOMIDOperations.js +5 -12
- package/lib/ReactDOMImg.js +8 -14
- package/lib/ReactDOMInput.js +30 -38
- package/lib/ReactDOMOption.js +8 -14
- package/lib/ReactDOMSelect.js +25 -24
- package/lib/ReactDOMSelection.js +11 -18
- package/lib/ReactDOMTextarea.js +19 -24
- package/lib/ReactDefaultBatchingStrategy.js +14 -18
- package/lib/ReactDefaultInjection.js +23 -26
- package/lib/ReactDefaultPerf.js +14 -17
- package/lib/ReactDefaultPerfAnalysis.js +18 -17
- package/lib/ReactElement.js +242 -0
- package/lib/{ReactDescriptorValidator.js → ReactElementValidator.js} +51 -56
- package/lib/ReactEmptyComponent.js +8 -13
- package/lib/ReactErrorUtils.js +5 -12
- package/lib/ReactEventEmitterMixin.js +5 -12
- package/lib/ReactEventListener.js +7 -14
- package/lib/ReactInjection.js +7 -14
- package/lib/ReactInputSelection.js +5 -12
- package/lib/ReactInstanceHandles.js +5 -12
- package/lib/ReactLegacyElement.js +243 -0
- package/lib/ReactLink.js +5 -12
- package/lib/ReactMarkupChecksum.js +5 -12
- package/lib/ReactMount.js +45 -32
- package/lib/ReactMultiChild.js +14 -18
- package/lib/ReactMultiChildUpdateTypes.js +5 -12
- package/lib/ReactNativeComponent.js +69 -0
- package/lib/ReactOwner.js +5 -12
- package/lib/ReactPerf.js +8 -13
- package/lib/ReactPropTransferer.js +34 -33
- package/lib/ReactPropTypeLocationNames.js +5 -12
- package/lib/ReactPropTypeLocations.js +5 -12
- package/lib/ReactPropTypes.js +38 -29
- package/lib/ReactPutListenerQueue.js +7 -14
- package/lib/ReactReconcileTransaction.js +7 -15
- package/lib/ReactRootIndex.js +5 -12
- package/lib/ReactServerRendering.js +21 -34
- package/lib/ReactServerRenderingTransaction.js +11 -15
- package/lib/ReactStateSetters.js +5 -12
- package/lib/ReactTestUtils.js +31 -33
- package/lib/ReactTextComponent.js +18 -21
- package/lib/ReactTransitionChildMapping.js +6 -13
- package/lib/ReactTransitionEvents.js +5 -12
- package/lib/ReactTransitionGroup.js +14 -17
- package/lib/ReactUpdates.js +43 -22
- package/lib/ReactWithAddons.js +7 -13
- package/lib/SVGDOMPropertyConfig.js +5 -12
- package/lib/SelectEventPlugin.js +13 -20
- package/lib/ServerReactRootIndex.js +5 -12
- package/lib/SimpleEventPlugin.js +20 -15
- package/lib/SyntheticClipboardEvent.js +5 -12
- package/lib/SyntheticCompositionEvent.js +5 -12
- package/lib/SyntheticDragEvent.js +5 -12
- package/lib/SyntheticEvent.js +9 -17
- package/lib/SyntheticFocusEvent.js +5 -12
- package/lib/SyntheticInputEvent.js +4 -11
- package/lib/SyntheticKeyboardEvent.js +17 -19
- package/lib/SyntheticMouseEvent.js +5 -12
- package/lib/SyntheticTouchEvent.js +5 -12
- package/lib/SyntheticUIEvent.js +5 -12
- package/lib/SyntheticWheelEvent.js +5 -12
- package/lib/Transaction.js +5 -12
- package/lib/ViewportMetrics.js +5 -12
- package/lib/accumulateInto.js +62 -0
- package/lib/adler32.js +6 -13
- package/lib/camelize.js +30 -0
- package/lib/camelizeStyleName.js +40 -0
- package/lib/cloneWithProps.js +9 -15
- package/lib/containsNode.js +5 -12
- package/lib/copyProperties.js +12 -12
- package/lib/createArrayFrom.js +5 -12
- package/lib/createFullPageComponent.js +12 -18
- package/lib/createNodesFromMarkup.js +5 -12
- package/lib/cx.js +5 -12
- package/lib/dangerousStyleValue.js +5 -12
- package/lib/deprecated.js +47 -0
- package/lib/emptyFunction.js +11 -22
- package/lib/emptyObject.js +5 -12
- package/lib/escapeTextForBrowser.js +5 -12
- package/lib/flattenChildren.js +19 -13
- package/lib/focusNode.js +10 -16
- package/lib/forEachAccumulated.js +5 -12
- package/lib/getActiveElement.js +5 -12
- package/lib/getEventCharCode.js +50 -0
- package/lib/getEventKey.js +9 -21
- package/lib/getEventModifierState.js +4 -11
- package/lib/getEventTarget.js +5 -12
- package/lib/getMarkupWrap.js +5 -12
- package/lib/getNodeForCharacterOffset.js +5 -12
- package/lib/getReactRootElementInContainer.js +5 -12
- package/lib/getTextContentAccessor.js +5 -12
- package/lib/getUnboundedScrollPosition.js +5 -12
- package/lib/hyphenate.js +5 -12
- package/lib/hyphenateStyleName.js +8 -15
- package/lib/instantiateReactComponent.js +90 -42
- package/lib/invariant.js +5 -12
- package/lib/isEventSupported.js +5 -12
- package/lib/isNode.js +5 -12
- package/lib/isTextInputElement.js +5 -12
- package/lib/isTextNode.js +5 -12
- package/lib/joinClasses.js +8 -13
- package/lib/keyMirror.js +5 -12
- package/lib/keyOf.js +5 -12
- package/lib/mapObject.js +35 -36
- package/lib/memoizeStringOnly.js +5 -12
- package/lib/merge.js +14 -17
- package/lib/mergeInto.js +13 -35
- package/lib/monitorCodeUse.js +5 -12
- package/lib/onlyChild.js +8 -15
- package/lib/performance.js +5 -12
- package/lib/performanceNow.js +5 -12
- package/lib/setInnerHTML.js +10 -19
- package/lib/shallowEqual.js +6 -13
- package/lib/shouldUpdateReactComponent.js +14 -22
- package/lib/toArray.js +5 -12
- package/lib/traverseAllChildren.js +34 -48
- package/lib/update.js +8 -15
- package/lib/warning.js +6 -13
- package/package.json +3 -8
- package/lib/ReactDescriptor.js +0 -251
- package/lib/accumulate.js +0 -54
- package/lib/mergeHelpers.js +0 -147
- package/lib/mixInto.js +0 -34
package/lib/ReactContext.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule ReactContext
|
|
17
10
|
*/
|
|
18
11
|
|
|
19
12
|
"use strict";
|
|
20
13
|
|
|
21
|
-
var
|
|
14
|
+
var assign = require("./Object.assign");
|
|
22
15
|
|
|
23
16
|
/**
|
|
24
17
|
* Keeps track of the current context.
|
|
@@ -40,7 +33,7 @@ var ReactContext = {
|
|
|
40
33
|
* A typical use case might look like
|
|
41
34
|
*
|
|
42
35
|
* render: function() {
|
|
43
|
-
* var children = ReactContext.withContext({foo: 'foo'} () => (
|
|
36
|
+
* var children = ReactContext.withContext({foo: 'foo'}, () => (
|
|
44
37
|
*
|
|
45
38
|
* ));
|
|
46
39
|
* return <div>{children}</div>;
|
|
@@ -53,7 +46,7 @@ var ReactContext = {
|
|
|
53
46
|
withContext: function(newContext, scopedCallback) {
|
|
54
47
|
var result;
|
|
55
48
|
var previousContext = ReactContext.current;
|
|
56
|
-
ReactContext.current =
|
|
49
|
+
ReactContext.current = assign({}, previousContext, newContext);
|
|
57
50
|
try {
|
|
58
51
|
result = scopedCallback();
|
|
59
52
|
} finally {
|
package/lib/ReactCurrentOwner.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule ReactCurrentOwner
|
|
17
10
|
*/
|
package/lib/ReactDOM.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule ReactDOM
|
|
17
10
|
* @typechecks static-only
|
|
@@ -19,45 +12,27 @@
|
|
|
19
12
|
|
|
20
13
|
"use strict";
|
|
21
14
|
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
15
|
+
var ReactElement = require("./ReactElement");
|
|
16
|
+
var ReactElementValidator = require("./ReactElementValidator");
|
|
17
|
+
var ReactLegacyElement = require("./ReactLegacyElement");
|
|
25
18
|
|
|
26
|
-
var mergeInto = require("./mergeInto");
|
|
27
19
|
var mapObject = require("./mapObject");
|
|
28
20
|
|
|
29
21
|
/**
|
|
30
|
-
*
|
|
31
|
-
* React components. It accepts event listeners and DOM properties that are
|
|
32
|
-
* valid according to `DOMProperty`.
|
|
33
|
-
*
|
|
34
|
-
* - Event listeners: `onClick`, `onMouseDown`, etc.
|
|
35
|
-
* - DOM properties: `className`, `name`, `title`, etc.
|
|
22
|
+
* Create a factory that creates HTML tag elements.
|
|
36
23
|
*
|
|
37
|
-
* The `style` property functions differently from the DOM API. It accepts an
|
|
38
|
-
* object mapping of style properties to values.
|
|
39
|
-
*
|
|
40
|
-
* @param {boolean} omitClose True if the close tag should be omitted.
|
|
41
24
|
* @param {string} tag Tag name (e.g. `div`).
|
|
42
25
|
* @private
|
|
43
26
|
*/
|
|
44
|
-
function
|
|
45
|
-
var Constructor = function(descriptor) {
|
|
46
|
-
this.construct(descriptor);
|
|
47
|
-
};
|
|
48
|
-
Constructor.prototype = new ReactDOMComponent(tag, omitClose);
|
|
49
|
-
Constructor.prototype.constructor = Constructor;
|
|
50
|
-
Constructor.displayName = tag;
|
|
51
|
-
|
|
52
|
-
var ConvenienceConstructor = ReactDescriptor.createFactory(Constructor);
|
|
53
|
-
|
|
27
|
+
function createDOMFactory(tag) {
|
|
54
28
|
if ("production" !== process.env.NODE_ENV) {
|
|
55
|
-
return
|
|
56
|
-
|
|
29
|
+
return ReactLegacyElement.markNonLegacyFactory(
|
|
30
|
+
ReactElementValidator.createFactory(tag)
|
|
57
31
|
);
|
|
58
32
|
}
|
|
59
|
-
|
|
60
|
-
|
|
33
|
+
return ReactLegacyElement.markNonLegacyFactory(
|
|
34
|
+
ReactElement.createFactory(tag)
|
|
35
|
+
);
|
|
61
36
|
}
|
|
62
37
|
|
|
63
38
|
/**
|
|
@@ -67,145 +42,138 @@ function createDOMComponentClass(omitClose, tag) {
|
|
|
67
42
|
* @public
|
|
68
43
|
*/
|
|
69
44
|
var ReactDOM = mapObject({
|
|
70
|
-
a:
|
|
71
|
-
abbr:
|
|
72
|
-
address:
|
|
73
|
-
area:
|
|
74
|
-
article:
|
|
75
|
-
aside:
|
|
76
|
-
audio:
|
|
77
|
-
b:
|
|
78
|
-
base:
|
|
79
|
-
bdi:
|
|
80
|
-
bdo:
|
|
81
|
-
big:
|
|
82
|
-
blockquote:
|
|
83
|
-
body:
|
|
84
|
-
br:
|
|
85
|
-
button:
|
|
86
|
-
canvas:
|
|
87
|
-
caption:
|
|
88
|
-
cite:
|
|
89
|
-
code:
|
|
90
|
-
col:
|
|
91
|
-
colgroup:
|
|
92
|
-
data:
|
|
93
|
-
datalist:
|
|
94
|
-
dd:
|
|
95
|
-
del:
|
|
96
|
-
details:
|
|
97
|
-
dfn:
|
|
98
|
-
dialog:
|
|
99
|
-
div:
|
|
100
|
-
dl:
|
|
101
|
-
dt:
|
|
102
|
-
em:
|
|
103
|
-
embed:
|
|
104
|
-
fieldset:
|
|
105
|
-
figcaption:
|
|
106
|
-
figure:
|
|
107
|
-
footer:
|
|
108
|
-
form:
|
|
109
|
-
h1:
|
|
110
|
-
h2:
|
|
111
|
-
h3:
|
|
112
|
-
h4:
|
|
113
|
-
h5:
|
|
114
|
-
h6:
|
|
115
|
-
head:
|
|
116
|
-
header:
|
|
117
|
-
hr:
|
|
118
|
-
html:
|
|
119
|
-
i:
|
|
120
|
-
iframe:
|
|
121
|
-
img:
|
|
122
|
-
input:
|
|
123
|
-
ins:
|
|
124
|
-
kbd:
|
|
125
|
-
keygen:
|
|
126
|
-
label:
|
|
127
|
-
legend:
|
|
128
|
-
li:
|
|
129
|
-
link:
|
|
130
|
-
main:
|
|
131
|
-
map:
|
|
132
|
-
mark:
|
|
133
|
-
menu:
|
|
134
|
-
menuitem:
|
|
135
|
-
meta:
|
|
136
|
-
meter:
|
|
137
|
-
nav:
|
|
138
|
-
noscript:
|
|
139
|
-
object:
|
|
140
|
-
ol:
|
|
141
|
-
optgroup:
|
|
142
|
-
option:
|
|
143
|
-
output:
|
|
144
|
-
p:
|
|
145
|
-
param:
|
|
146
|
-
picture:
|
|
147
|
-
pre:
|
|
148
|
-
progress:
|
|
149
|
-
q:
|
|
150
|
-
rp:
|
|
151
|
-
rt:
|
|
152
|
-
ruby:
|
|
153
|
-
s:
|
|
154
|
-
samp:
|
|
155
|
-
script:
|
|
156
|
-
section:
|
|
157
|
-
select:
|
|
158
|
-
small:
|
|
159
|
-
source:
|
|
160
|
-
span:
|
|
161
|
-
strong:
|
|
162
|
-
style:
|
|
163
|
-
sub:
|
|
164
|
-
summary:
|
|
165
|
-
sup:
|
|
166
|
-
table:
|
|
167
|
-
tbody:
|
|
168
|
-
td:
|
|
169
|
-
textarea:
|
|
170
|
-
tfoot:
|
|
171
|
-
th:
|
|
172
|
-
thead:
|
|
173
|
-
time:
|
|
174
|
-
title:
|
|
175
|
-
tr:
|
|
176
|
-
track:
|
|
177
|
-
u:
|
|
178
|
-
ul:
|
|
179
|
-
'var':
|
|
180
|
-
video:
|
|
181
|
-
wbr:
|
|
45
|
+
a: 'a',
|
|
46
|
+
abbr: 'abbr',
|
|
47
|
+
address: 'address',
|
|
48
|
+
area: 'area',
|
|
49
|
+
article: 'article',
|
|
50
|
+
aside: 'aside',
|
|
51
|
+
audio: 'audio',
|
|
52
|
+
b: 'b',
|
|
53
|
+
base: 'base',
|
|
54
|
+
bdi: 'bdi',
|
|
55
|
+
bdo: 'bdo',
|
|
56
|
+
big: 'big',
|
|
57
|
+
blockquote: 'blockquote',
|
|
58
|
+
body: 'body',
|
|
59
|
+
br: 'br',
|
|
60
|
+
button: 'button',
|
|
61
|
+
canvas: 'canvas',
|
|
62
|
+
caption: 'caption',
|
|
63
|
+
cite: 'cite',
|
|
64
|
+
code: 'code',
|
|
65
|
+
col: 'col',
|
|
66
|
+
colgroup: 'colgroup',
|
|
67
|
+
data: 'data',
|
|
68
|
+
datalist: 'datalist',
|
|
69
|
+
dd: 'dd',
|
|
70
|
+
del: 'del',
|
|
71
|
+
details: 'details',
|
|
72
|
+
dfn: 'dfn',
|
|
73
|
+
dialog: 'dialog',
|
|
74
|
+
div: 'div',
|
|
75
|
+
dl: 'dl',
|
|
76
|
+
dt: 'dt',
|
|
77
|
+
em: 'em',
|
|
78
|
+
embed: 'embed',
|
|
79
|
+
fieldset: 'fieldset',
|
|
80
|
+
figcaption: 'figcaption',
|
|
81
|
+
figure: 'figure',
|
|
82
|
+
footer: 'footer',
|
|
83
|
+
form: 'form',
|
|
84
|
+
h1: 'h1',
|
|
85
|
+
h2: 'h2',
|
|
86
|
+
h3: 'h3',
|
|
87
|
+
h4: 'h4',
|
|
88
|
+
h5: 'h5',
|
|
89
|
+
h6: 'h6',
|
|
90
|
+
head: 'head',
|
|
91
|
+
header: 'header',
|
|
92
|
+
hr: 'hr',
|
|
93
|
+
html: 'html',
|
|
94
|
+
i: 'i',
|
|
95
|
+
iframe: 'iframe',
|
|
96
|
+
img: 'img',
|
|
97
|
+
input: 'input',
|
|
98
|
+
ins: 'ins',
|
|
99
|
+
kbd: 'kbd',
|
|
100
|
+
keygen: 'keygen',
|
|
101
|
+
label: 'label',
|
|
102
|
+
legend: 'legend',
|
|
103
|
+
li: 'li',
|
|
104
|
+
link: 'link',
|
|
105
|
+
main: 'main',
|
|
106
|
+
map: 'map',
|
|
107
|
+
mark: 'mark',
|
|
108
|
+
menu: 'menu',
|
|
109
|
+
menuitem: 'menuitem',
|
|
110
|
+
meta: 'meta',
|
|
111
|
+
meter: 'meter',
|
|
112
|
+
nav: 'nav',
|
|
113
|
+
noscript: 'noscript',
|
|
114
|
+
object: 'object',
|
|
115
|
+
ol: 'ol',
|
|
116
|
+
optgroup: 'optgroup',
|
|
117
|
+
option: 'option',
|
|
118
|
+
output: 'output',
|
|
119
|
+
p: 'p',
|
|
120
|
+
param: 'param',
|
|
121
|
+
picture: 'picture',
|
|
122
|
+
pre: 'pre',
|
|
123
|
+
progress: 'progress',
|
|
124
|
+
q: 'q',
|
|
125
|
+
rp: 'rp',
|
|
126
|
+
rt: 'rt',
|
|
127
|
+
ruby: 'ruby',
|
|
128
|
+
s: 's',
|
|
129
|
+
samp: 'samp',
|
|
130
|
+
script: 'script',
|
|
131
|
+
section: 'section',
|
|
132
|
+
select: 'select',
|
|
133
|
+
small: 'small',
|
|
134
|
+
source: 'source',
|
|
135
|
+
span: 'span',
|
|
136
|
+
strong: 'strong',
|
|
137
|
+
style: 'style',
|
|
138
|
+
sub: 'sub',
|
|
139
|
+
summary: 'summary',
|
|
140
|
+
sup: 'sup',
|
|
141
|
+
table: 'table',
|
|
142
|
+
tbody: 'tbody',
|
|
143
|
+
td: 'td',
|
|
144
|
+
textarea: 'textarea',
|
|
145
|
+
tfoot: 'tfoot',
|
|
146
|
+
th: 'th',
|
|
147
|
+
thead: 'thead',
|
|
148
|
+
time: 'time',
|
|
149
|
+
title: 'title',
|
|
150
|
+
tr: 'tr',
|
|
151
|
+
track: 'track',
|
|
152
|
+
u: 'u',
|
|
153
|
+
ul: 'ul',
|
|
154
|
+
'var': 'var',
|
|
155
|
+
video: 'video',
|
|
156
|
+
wbr: 'wbr',
|
|
182
157
|
|
|
183
158
|
// SVG
|
|
184
|
-
circle:
|
|
185
|
-
defs:
|
|
186
|
-
ellipse:
|
|
187
|
-
g:
|
|
188
|
-
line:
|
|
189
|
-
linearGradient:
|
|
190
|
-
mask:
|
|
191
|
-
path:
|
|
192
|
-
pattern:
|
|
193
|
-
polygon:
|
|
194
|
-
polyline:
|
|
195
|
-
radialGradient:
|
|
196
|
-
rect:
|
|
197
|
-
stop:
|
|
198
|
-
svg:
|
|
199
|
-
text:
|
|
200
|
-
tspan:
|
|
201
|
-
}, createDOMComponentClass);
|
|
202
|
-
|
|
203
|
-
var injection = {
|
|
204
|
-
injectComponentClasses: function(componentClasses) {
|
|
205
|
-
mergeInto(ReactDOM, componentClasses);
|
|
206
|
-
}
|
|
207
|
-
};
|
|
159
|
+
circle: 'circle',
|
|
160
|
+
defs: 'defs',
|
|
161
|
+
ellipse: 'ellipse',
|
|
162
|
+
g: 'g',
|
|
163
|
+
line: 'line',
|
|
164
|
+
linearGradient: 'linearGradient',
|
|
165
|
+
mask: 'mask',
|
|
166
|
+
path: 'path',
|
|
167
|
+
pattern: 'pattern',
|
|
168
|
+
polygon: 'polygon',
|
|
169
|
+
polyline: 'polyline',
|
|
170
|
+
radialGradient: 'radialGradient',
|
|
171
|
+
rect: 'rect',
|
|
172
|
+
stop: 'stop',
|
|
173
|
+
svg: 'svg',
|
|
174
|
+
text: 'text',
|
|
175
|
+
tspan: 'tspan'
|
|
208
176
|
|
|
209
|
-
|
|
177
|
+
}, createDOMFactory);
|
|
210
178
|
|
|
211
179
|
module.exports = ReactDOM;
|
package/lib/ReactDOMButton.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule ReactDOMButton
|
|
17
10
|
*/
|
|
@@ -21,12 +14,13 @@
|
|
|
21
14
|
var AutoFocusMixin = require("./AutoFocusMixin");
|
|
22
15
|
var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");
|
|
23
16
|
var ReactCompositeComponent = require("./ReactCompositeComponent");
|
|
17
|
+
var ReactElement = require("./ReactElement");
|
|
24
18
|
var ReactDOM = require("./ReactDOM");
|
|
25
19
|
|
|
26
20
|
var keyMirror = require("./keyMirror");
|
|
27
21
|
|
|
28
|
-
// Store a reference to the <button> `ReactDOMComponent`.
|
|
29
|
-
var button = ReactDOM.button;
|
|
22
|
+
// Store a reference to the <button> `ReactDOMComponent`. TODO: use string
|
|
23
|
+
var button = ReactElement.createFactory(ReactDOM.button.type);
|
|
30
24
|
|
|
31
25
|
var mouseListenerNames = keyMirror({
|
|
32
26
|
onClick: true,
|