react 0.9.0 → 0.11.0

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 (114) hide show
  1. package/README.md +3 -0
  2. package/dist/JSXTransformer.js +13448 -0
  3. package/dist/react-with-addons.js +20235 -0
  4. package/dist/react-with-addons.min.js +22 -0
  5. package/dist/react.js +18443 -0
  6. package/dist/react.min.js +21 -0
  7. package/lib/AutoFocusMixin.js +3 -1
  8. package/lib/BeforeInputEventPlugin.js +222 -0
  9. package/lib/CSSPropertyOperations.js +3 -3
  10. package/lib/{ReactMountReady.js → CallbackQueue.js} +32 -24
  11. package/lib/ChangeEventPlugin.js +1 -1
  12. package/lib/CompositionEventPlugin.js +5 -1
  13. package/lib/DOMChildrenOperations.js +33 -20
  14. package/lib/DOMProperty.js +51 -21
  15. package/lib/DOMPropertyOperations.js +28 -16
  16. package/lib/DefaultEventPluginOrder.js +1 -0
  17. package/lib/EventConstants.js +1 -0
  18. package/lib/EventListener.js +5 -2
  19. package/lib/EventPluginHub.js +2 -5
  20. package/lib/EventPluginRegistry.js +6 -4
  21. package/lib/EventPluginUtils.js +11 -1
  22. package/lib/ExecutionEnvironment.js +8 -2
  23. package/lib/{DefaultDOMPropertyConfig.js → HTMLDOMPropertyConfig.js} +41 -58
  24. package/lib/LinkedValueUtils.js +26 -28
  25. package/lib/LocalEventTrapMixin.js +52 -0
  26. package/lib/React.js +39 -3
  27. package/lib/ReactBrowserComponentMixin.js +46 -0
  28. package/lib/{ReactEventEmitter.js → ReactBrowserEventEmitter.js} +115 -94
  29. package/lib/ReactCSSTransitionGroup.js +12 -10
  30. package/lib/ReactCSSTransitionGroupChild.js +2 -5
  31. package/lib/ReactChildren.js +31 -10
  32. package/lib/ReactComponent.js +119 -223
  33. package/lib/ReactComponentBrowserEnvironment.js +3 -36
  34. package/lib/ReactComponentWithPureRenderMixin.js +54 -0
  35. package/lib/ReactCompositeComponent.js +249 -287
  36. package/lib/ReactDOM.js +25 -23
  37. package/lib/ReactDOMButton.js +2 -1
  38. package/lib/ReactDOMComponent.js +42 -23
  39. package/lib/ReactDOMForm.js +7 -12
  40. package/lib/ReactDOMIDOperations.js +2 -31
  41. package/lib/ReactDOMImg.js +7 -13
  42. package/lib/ReactDOMInput.js +2 -1
  43. package/lib/ReactDOMOption.js +11 -7
  44. package/lib/ReactDOMSelect.js +18 -16
  45. package/lib/ReactDOMSelection.js +35 -10
  46. package/lib/ReactDOMTextarea.js +9 -7
  47. package/lib/ReactDefaultBatchingStrategy.js +3 -3
  48. package/lib/ReactDefaultInjection.js +27 -14
  49. package/lib/ReactDefaultPerf.js +28 -11
  50. package/lib/ReactDefaultPerfAnalysis.js +4 -0
  51. package/lib/ReactDescriptor.js +251 -0
  52. package/lib/ReactDescriptorValidator.js +283 -0
  53. package/lib/ReactEmptyComponent.js +78 -0
  54. package/lib/ReactEventEmitterMixin.js +1 -3
  55. package/lib/ReactEventListener.js +189 -0
  56. package/lib/ReactInjection.js +8 -2
  57. package/lib/ReactInputSelection.js +2 -1
  58. package/lib/ReactLink.js +24 -0
  59. package/lib/ReactMount.js +61 -21
  60. package/lib/ReactMultiChild.js +18 -13
  61. package/lib/ReactOwner.js +6 -1
  62. package/lib/ReactPropTransferer.js +44 -29
  63. package/lib/ReactPropTypes.js +226 -242
  64. package/lib/ReactPutListenerQueue.js +2 -2
  65. package/lib/ReactReconcileTransaction.js +21 -20
  66. package/lib/ReactServerRendering.js +41 -11
  67. package/lib/ReactServerRenderingTransaction.js +115 -0
  68. package/lib/ReactTestUtils.js +39 -21
  69. package/lib/ReactTextComponent.js +21 -13
  70. package/lib/ReactTransitionChildMapping.js +2 -2
  71. package/lib/ReactTransitionEvents.js +19 -0
  72. package/lib/ReactTransitionGroup.js +9 -6
  73. package/lib/ReactUpdates.js +139 -22
  74. package/lib/ReactWithAddons.js +8 -3
  75. package/lib/SVGDOMPropertyConfig.js +97 -0
  76. package/lib/SimpleEventPlugin.js +7 -1
  77. package/lib/SyntheticInputEvent.js +52 -0
  78. package/lib/SyntheticKeyboardEvent.js +33 -4
  79. package/lib/SyntheticMouseEvent.js +3 -0
  80. package/lib/SyntheticTouchEvent.js +4 -1
  81. package/lib/SyntheticUIEvent.js +24 -2
  82. package/lib/Transaction.js +0 -32
  83. package/lib/cloneWithProps.js +10 -8
  84. package/lib/createFullPageComponent.js +1 -1
  85. package/lib/dangerousStyleValue.js +11 -5
  86. package/lib/{ReactComponentEnvironment.js → emptyObject.js} +6 -5
  87. package/lib/escapeTextForBrowser.js +2 -3
  88. package/lib/flattenChildren.js +9 -7
  89. package/lib/focusNode.js +33 -0
  90. package/lib/getEventKey.js +35 -5
  91. package/lib/getEventModifierState.js +52 -0
  92. package/lib/getMarkupWrap.js +2 -0
  93. package/lib/getTextContentAccessor.js +1 -1
  94. package/lib/hyphenate.js +3 -0
  95. package/lib/hyphenateStyleName.js +46 -0
  96. package/lib/instantiateReactComponent.js +62 -0
  97. package/lib/invariant.js +17 -19
  98. package/lib/isNode.js +1 -1
  99. package/lib/{objMap.js → mapObject.js} +8 -3
  100. package/lib/mergeHelpers.js +11 -0
  101. package/lib/mergeInto.js +3 -2
  102. package/lib/monitorCodeUse.js +37 -0
  103. package/lib/onlyChild.js +3 -3
  104. package/lib/performance.js +33 -0
  105. package/lib/performanceNow.js +5 -14
  106. package/lib/setInnerHTML.js +77 -0
  107. package/lib/shouldUpdateReactComponent.js +14 -28
  108. package/lib/toArray.js +1 -1
  109. package/lib/traverseAllChildren.js +9 -5
  110. package/lib/update.js +171 -0
  111. package/package.json +4 -3
  112. package/lib/ReactEventTopLevelCallback.js +0 -149
  113. package/lib/createObjectFrom.js +0 -61
  114. package/lib/objMapKeyVal.js +0 -47
@@ -70,7 +70,7 @@ var ReactTransitionChildMapping = {
70
70
 
71
71
  var pendingKeys = [];
72
72
  for (var prevKey in prev) {
73
- if (next[prevKey]) {
73
+ if (next.hasOwnProperty(prevKey)) {
74
74
  if (pendingKeys.length) {
75
75
  nextKeysPending[prevKey] = pendingKeys;
76
76
  pendingKeys = [];
@@ -83,7 +83,7 @@ var ReactTransitionChildMapping = {
83
83
  var i;
84
84
  var childMapping = {};
85
85
  for (var nextKey in next) {
86
- if (nextKeysPending[nextKey]) {
86
+ if (nextKeysPending.hasOwnProperty(nextKey)) {
87
87
  for (i = 0; i < nextKeysPending[nextKey].length; i++) {
88
88
  var pendingNextKey = nextKeysPending[nextKey][i];
89
89
  childMapping[nextKeysPending[nextKey][i]] = getValueForKey(
@@ -20,6 +20,11 @@
20
20
 
21
21
  var ExecutionEnvironment = require("./ExecutionEnvironment");
22
22
 
23
+ /**
24
+ * EVENT_NAME_MAP is used to determine which event fired when a
25
+ * transition/animation ends, based on the style property used to
26
+ * define that event.
27
+ */
23
28
  var EVENT_NAME_MAP = {
24
29
  transitionend: {
25
30
  'transition': 'transitionend',
@@ -43,6 +48,20 @@ var endEvents = [];
43
48
  function detectEvents() {
44
49
  var testEl = document.createElement('div');
45
50
  var style = testEl.style;
51
+
52
+ // On some platforms, in particular some releases of Android 4.x,
53
+ // the un-prefixed "animation" and "transition" properties are defined on the
54
+ // style object but the events that fire will still be prefixed, so we need
55
+ // to check if the un-prefixed events are useable, and if not remove them
56
+ // from the map
57
+ if (!('AnimationEvent' in window)) {
58
+ delete EVENT_NAME_MAP.animationend.animation;
59
+ }
60
+
61
+ if (!('TransitionEvent' in window)) {
62
+ delete EVENT_NAME_MAP.transitionend.transition;
63
+ }
64
+
46
65
  for (var baseEventName in EVENT_NAME_MAP) {
47
66
  var baseEvents = EVENT_NAME_MAP[baseEventName];
48
67
  for (var styleName in baseEvents) {
@@ -26,6 +26,7 @@ var emptyFunction = require("./emptyFunction");
26
26
  var merge = require("./merge");
27
27
 
28
28
  var ReactTransitionGroup = React.createClass({
29
+ displayName: 'ReactTransitionGroup',
29
30
 
30
31
  propTypes: {
31
32
  component: React.PropTypes.func,
@@ -61,15 +62,17 @@ var ReactTransitionGroup = React.createClass({
61
62
  var key;
62
63
 
63
64
  for (key in nextChildMapping) {
64
- if (!prevChildMapping.hasOwnProperty(key) &&
65
- !this.currentlyTransitioningKeys[key]) {
65
+ var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key);
66
+ if (nextChildMapping[key] && !hasPrev &&
67
+ !this.currentlyTransitioningKeys[key]) {
66
68
  this.keysToEnter.push(key);
67
69
  }
68
70
  }
69
71
 
70
72
  for (key in prevChildMapping) {
71
- if (!nextChildMapping.hasOwnProperty(key) &&
72
- !this.currentlyTransitioningKeys[key]) {
73
+ var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key);
74
+ if (prevChildMapping[key] && !hasNext &&
75
+ !this.currentlyTransitioningKeys[key]) {
73
76
  this.keysToLeave.push(key);
74
77
  }
75
78
  }
@@ -119,7 +122,7 @@ var ReactTransitionGroup = React.createClass({
119
122
  this.props.children
120
123
  );
121
124
 
122
- if (!currentChildMapping.hasOwnProperty(key)) {
125
+ if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
123
126
  // This was removed before it had fully entered. Remove it.
124
127
  this.performLeave(key);
125
128
  }
@@ -152,7 +155,7 @@ var ReactTransitionGroup = React.createClass({
152
155
  this.props.children
153
156
  );
154
157
 
155
- if (currentChildMapping.hasOwnProperty(key)) {
158
+ if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {
156
159
  // This entered again before it fully left. Add it again.
157
160
  this.performEnter(key);
158
161
  } else {
@@ -18,21 +18,99 @@
18
18
 
19
19
  "use strict";
20
20
 
21
+ var CallbackQueue = require("./CallbackQueue");
22
+ var PooledClass = require("./PooledClass");
23
+ var ReactCurrentOwner = require("./ReactCurrentOwner");
21
24
  var ReactPerf = require("./ReactPerf");
25
+ var Transaction = require("./Transaction");
22
26
 
23
27
  var invariant = require("./invariant");
28
+ var mixInto = require("./mixInto");
29
+ var warning = require("./warning");
24
30
 
25
31
  var dirtyComponents = [];
26
32
 
27
33
  var batchingStrategy = null;
28
34
 
29
- function ensureBatchingStrategy() {
30
- ("production" !== process.env.NODE_ENV ? invariant(batchingStrategy, 'ReactUpdates: must inject a batching strategy') : invariant(batchingStrategy));
35
+ function ensureInjected() {
36
+ ("production" !== process.env.NODE_ENV ? invariant(
37
+ ReactUpdates.ReactReconcileTransaction && batchingStrategy,
38
+ 'ReactUpdates: must inject a reconcile transaction class and batching ' +
39
+ 'strategy'
40
+ ) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy));
31
41
  }
32
42
 
33
- function batchedUpdates(callback, param) {
34
- ensureBatchingStrategy();
35
- batchingStrategy.batchedUpdates(callback, param);
43
+ var NESTED_UPDATES = {
44
+ initialize: function() {
45
+ this.dirtyComponentsLength = dirtyComponents.length;
46
+ },
47
+ close: function() {
48
+ if (this.dirtyComponentsLength !== dirtyComponents.length) {
49
+ // Additional updates were enqueued by componentDidUpdate handlers or
50
+ // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
51
+ // these new updates so that if A's componentDidUpdate calls setState on
52
+ // B, B will update before the callback A's updater provided when calling
53
+ // setState.
54
+ dirtyComponents.splice(0, this.dirtyComponentsLength);
55
+ flushBatchedUpdates();
56
+ } else {
57
+ dirtyComponents.length = 0;
58
+ }
59
+ }
60
+ };
61
+
62
+ var UPDATE_QUEUEING = {
63
+ initialize: function() {
64
+ this.callbackQueue.reset();
65
+ },
66
+ close: function() {
67
+ this.callbackQueue.notifyAll();
68
+ }
69
+ };
70
+
71
+ var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
72
+
73
+ function ReactUpdatesFlushTransaction() {
74
+ this.reinitializeTransaction();
75
+ this.dirtyComponentsLength = null;
76
+ this.callbackQueue = CallbackQueue.getPooled(null);
77
+ this.reconcileTransaction =
78
+ ReactUpdates.ReactReconcileTransaction.getPooled();
79
+ }
80
+
81
+ mixInto(ReactUpdatesFlushTransaction, Transaction.Mixin);
82
+ mixInto(ReactUpdatesFlushTransaction, {
83
+ getTransactionWrappers: function() {
84
+ return TRANSACTION_WRAPPERS;
85
+ },
86
+
87
+ destructor: function() {
88
+ this.dirtyComponentsLength = null;
89
+ CallbackQueue.release(this.callbackQueue);
90
+ this.callbackQueue = null;
91
+ ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
92
+ this.reconcileTransaction = null;
93
+ },
94
+
95
+ perform: function(method, scope, a) {
96
+ // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
97
+ // with this transaction's wrappers around it.
98
+ return Transaction.Mixin.perform.call(
99
+ this,
100
+ this.reconcileTransaction.perform,
101
+ this.reconcileTransaction,
102
+ method,
103
+ scope,
104
+ a
105
+ );
106
+ }
107
+ });
108
+
109
+ PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
110
+
111
+ function batchedUpdates(callback, a, b) {
112
+ ensureInjected();
113
+ batchingStrategy.batchedUpdates(callback, a, b);
36
114
  }
37
115
 
38
116
  /**
@@ -46,14 +124,22 @@ function mountDepthComparator(c1, c2) {
46
124
  return c1._mountDepth - c2._mountDepth;
47
125
  }
48
126
 
49
- function runBatchedUpdates() {
127
+ function runBatchedUpdates(transaction) {
128
+ var len = transaction.dirtyComponentsLength;
129
+ ("production" !== process.env.NODE_ENV ? invariant(
130
+ len === dirtyComponents.length,
131
+ 'Expected flush transaction\'s stored dirty-components length (%s) to ' +
132
+ 'match dirty-components array length (%s).',
133
+ len,
134
+ dirtyComponents.length
135
+ ) : invariant(len === dirtyComponents.length));
136
+
50
137
  // Since reconciling a component higher in the owner hierarchy usually (not
51
138
  // always -- see shouldComponentUpdate()) will reconcile children, reconcile
52
139
  // them before their children by sorting the array.
53
-
54
140
  dirtyComponents.sort(mountDepthComparator);
55
141
 
56
- for (var i = 0; i < dirtyComponents.length; i++) {
142
+ for (var i = 0; i < len; i++) {
57
143
  // If a component is unmounted before pending changes apply, ignore them
58
144
  // TODO: Queue unmounts in the same list to avoid this happening at all
59
145
  var component = dirtyComponents[i];
@@ -63,29 +149,32 @@ function runBatchedUpdates() {
63
149
  // stash the callbacks first
64
150
  var callbacks = component._pendingCallbacks;
65
151
  component._pendingCallbacks = null;
66
- component.performUpdateIfNecessary();
152
+ component.performUpdateIfNecessary(transaction.reconcileTransaction);
153
+
67
154
  if (callbacks) {
68
155
  for (var j = 0; j < callbacks.length; j++) {
69
- callbacks[j].call(component);
156
+ transaction.callbackQueue.enqueue(
157
+ callbacks[j],
158
+ component
159
+ );
70
160
  }
71
161
  }
72
162
  }
73
163
  }
74
164
  }
75
165
 
76
- function clearDirtyComponents() {
77
- dirtyComponents.length = 0;
78
- }
79
-
80
166
  var flushBatchedUpdates = ReactPerf.measure(
81
167
  'ReactUpdates',
82
168
  'flushBatchedUpdates',
83
169
  function() {
84
- // Run these in separate functions so the JIT can optimize
85
- try {
86
- runBatchedUpdates();
87
- } finally {
88
- clearDirtyComponents();
170
+ // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
171
+ // array and perform any updates enqueued by mount-ready handlers (i.e.,
172
+ // componentDidUpdate) but we need to check here too in order to catch
173
+ // updates enqueued by setState callbacks.
174
+ while (dirtyComponents.length) {
175
+ var transaction = ReactUpdatesFlushTransaction.getPooled();
176
+ transaction.perform(runBatchedUpdates, null, transaction);
177
+ ReactUpdatesFlushTransaction.release(transaction);
89
178
  }
90
179
  }
91
180
  );
@@ -101,11 +190,23 @@ function enqueueUpdate(component, callback) {
101
190
  '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
102
191
  'isn\'t callable.'
103
192
  ) : invariant(!callback || typeof callback === "function"));
104
- ensureBatchingStrategy();
193
+ ensureInjected();
194
+
195
+ // Various parts of our code (such as ReactCompositeComponent's
196
+ // _renderValidatedComponent) assume that calls to render aren't nested;
197
+ // verify that that's the case. (This is called by each top-level update
198
+ // function, like setProps, setState, forceUpdate, etc.; creation and
199
+ // destruction of top-level components is guarded in ReactMount.)
200
+ ("production" !== process.env.NODE_ENV ? warning(
201
+ ReactCurrentOwner.current == null,
202
+ 'enqueueUpdate(): Render methods should be a pure function of props ' +
203
+ 'and state; triggering nested component updates from render is not ' +
204
+ 'allowed. If necessary, trigger nested updates in ' +
205
+ 'componentDidUpdate.'
206
+ ) : null);
105
207
 
106
208
  if (!batchingStrategy.isBatchingUpdates) {
107
- component.performUpdateIfNecessary();
108
- callback && callback.call(component);
209
+ batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);
109
210
  return;
110
211
  }
111
212
 
@@ -121,6 +222,14 @@ function enqueueUpdate(component, callback) {
121
222
  }
122
223
 
123
224
  var ReactUpdatesInjection = {
225
+ injectReconcileTransaction: function(ReconcileTransaction) {
226
+ ("production" !== process.env.NODE_ENV ? invariant(
227
+ ReconcileTransaction,
228
+ 'ReactUpdates: must provide a reconcile transaction class'
229
+ ) : invariant(ReconcileTransaction));
230
+ ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
231
+ },
232
+
124
233
  injectBatchingStrategy: function(_batchingStrategy) {
125
234
  ("production" !== process.env.NODE_ENV ? invariant(
126
235
  _batchingStrategy,
@@ -139,6 +248,14 @@ var ReactUpdatesInjection = {
139
248
  };
140
249
 
141
250
  var ReactUpdates = {
251
+ /**
252
+ * React references `ReactReconcileTransaction` using this property in order
253
+ * to allow dependency injection.
254
+ *
255
+ * @internal
256
+ */
257
+ ReactReconcileTransaction: null,
258
+
142
259
  batchedUpdates: batchedUpdates,
143
260
  enqueueUpdate: enqueueUpdate,
144
261
  flushBatchedUpdates: flushBatchedUpdates,
@@ -27,23 +27,28 @@
27
27
 
28
28
  var LinkedStateMixin = require("./LinkedStateMixin");
29
29
  var React = require("./React");
30
+ var ReactComponentWithPureRenderMixin =
31
+ require("./ReactComponentWithPureRenderMixin");
30
32
  var ReactCSSTransitionGroup = require("./ReactCSSTransitionGroup");
31
33
  var ReactTransitionGroup = require("./ReactTransitionGroup");
32
- var ReactCSSTransitionGroup = require("./ReactCSSTransitionGroup");
33
34
 
34
35
  var cx = require("./cx");
35
36
  var cloneWithProps = require("./cloneWithProps");
37
+ var update = require("./update");
36
38
 
37
39
  React.addons = {
38
- LinkedStateMixin: LinkedStateMixin,
39
40
  CSSTransitionGroup: ReactCSSTransitionGroup,
41
+ LinkedStateMixin: LinkedStateMixin,
42
+ PureRenderMixin: ReactComponentWithPureRenderMixin,
40
43
  TransitionGroup: ReactTransitionGroup,
41
44
 
42
45
  classSet: cx,
43
- cloneWithProps: cloneWithProps
46
+ cloneWithProps: cloneWithProps,
47
+ update: update
44
48
  };
45
49
 
46
50
  if ("production" !== process.env.NODE_ENV) {
51
+ React.addons.Perf = require("./ReactDefaultPerf");
47
52
  React.addons.TestUtils = require("./ReactTestUtils");
48
53
  }
49
54
 
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Copyright 2013-2014 Facebook, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
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.
15
+ *
16
+ * @providesModule SVGDOMPropertyConfig
17
+ */
18
+
19
+ /*jslint bitwise: true*/
20
+
21
+ "use strict";
22
+
23
+ var DOMProperty = require("./DOMProperty");
24
+
25
+ var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
26
+
27
+ var SVGDOMPropertyConfig = {
28
+ Properties: {
29
+ cx: MUST_USE_ATTRIBUTE,
30
+ cy: MUST_USE_ATTRIBUTE,
31
+ d: MUST_USE_ATTRIBUTE,
32
+ dx: MUST_USE_ATTRIBUTE,
33
+ dy: MUST_USE_ATTRIBUTE,
34
+ fill: MUST_USE_ATTRIBUTE,
35
+ fillOpacity: MUST_USE_ATTRIBUTE,
36
+ fontFamily: MUST_USE_ATTRIBUTE,
37
+ fontSize: MUST_USE_ATTRIBUTE,
38
+ fx: MUST_USE_ATTRIBUTE,
39
+ fy: MUST_USE_ATTRIBUTE,
40
+ gradientTransform: MUST_USE_ATTRIBUTE,
41
+ gradientUnits: MUST_USE_ATTRIBUTE,
42
+ markerEnd: MUST_USE_ATTRIBUTE,
43
+ markerMid: MUST_USE_ATTRIBUTE,
44
+ markerStart: MUST_USE_ATTRIBUTE,
45
+ offset: MUST_USE_ATTRIBUTE,
46
+ opacity: MUST_USE_ATTRIBUTE,
47
+ patternContentUnits: MUST_USE_ATTRIBUTE,
48
+ patternUnits: MUST_USE_ATTRIBUTE,
49
+ points: MUST_USE_ATTRIBUTE,
50
+ preserveAspectRatio: MUST_USE_ATTRIBUTE,
51
+ r: MUST_USE_ATTRIBUTE,
52
+ rx: MUST_USE_ATTRIBUTE,
53
+ ry: MUST_USE_ATTRIBUTE,
54
+ spreadMethod: MUST_USE_ATTRIBUTE,
55
+ stopColor: MUST_USE_ATTRIBUTE,
56
+ stopOpacity: MUST_USE_ATTRIBUTE,
57
+ stroke: MUST_USE_ATTRIBUTE,
58
+ strokeDasharray: MUST_USE_ATTRIBUTE,
59
+ strokeLinecap: MUST_USE_ATTRIBUTE,
60
+ strokeOpacity: MUST_USE_ATTRIBUTE,
61
+ strokeWidth: MUST_USE_ATTRIBUTE,
62
+ textAnchor: MUST_USE_ATTRIBUTE,
63
+ transform: MUST_USE_ATTRIBUTE,
64
+ version: MUST_USE_ATTRIBUTE,
65
+ viewBox: MUST_USE_ATTRIBUTE,
66
+ x1: MUST_USE_ATTRIBUTE,
67
+ x2: MUST_USE_ATTRIBUTE,
68
+ x: MUST_USE_ATTRIBUTE,
69
+ y1: MUST_USE_ATTRIBUTE,
70
+ y2: MUST_USE_ATTRIBUTE,
71
+ y: MUST_USE_ATTRIBUTE
72
+ },
73
+ DOMAttributeNames: {
74
+ fillOpacity: 'fill-opacity',
75
+ fontFamily: 'font-family',
76
+ fontSize: 'font-size',
77
+ gradientTransform: 'gradientTransform',
78
+ gradientUnits: 'gradientUnits',
79
+ markerEnd: 'marker-end',
80
+ markerMid: 'marker-mid',
81
+ markerStart: 'marker-start',
82
+ patternContentUnits: 'patternContentUnits',
83
+ patternUnits: 'patternUnits',
84
+ preserveAspectRatio: 'preserveAspectRatio',
85
+ spreadMethod: 'spreadMethod',
86
+ stopColor: 'stop-color',
87
+ stopOpacity: 'stop-opacity',
88
+ strokeDasharray: 'stroke-dasharray',
89
+ strokeLinecap: 'stroke-linecap',
90
+ strokeOpacity: 'stroke-opacity',
91
+ strokeWidth: 'stroke-width',
92
+ textAnchor: 'text-anchor',
93
+ viewBox: 'viewBox'
94
+ }
95
+ };
96
+
97
+ module.exports = SVGDOMPropertyConfig;