react 0.13.1 → 0.13.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.
@@ -20,7 +20,9 @@ var isUnitlessNumber = {
20
20
  columnCount: true,
21
21
  flex: true,
22
22
  flexGrow: true,
23
+ flexPositive: true,
23
24
  flexShrink: true,
25
+ flexNegative: true,
24
26
  fontWeight: true,
25
27
  lineClamp: true,
26
28
  lineHeight: true,
@@ -33,7 +35,9 @@ var isUnitlessNumber = {
33
35
 
34
36
  // SVG-related properties
35
37
  fillOpacity: true,
36
- strokeOpacity: true
38
+ strokeDashoffset: true,
39
+ strokeOpacity: true,
40
+ strokeWidth: true
37
41
  };
38
42
 
39
43
  /**
@@ -97,6 +97,7 @@ var HTMLDOMPropertyConfig = {
97
97
  headers: null,
98
98
  height: MUST_USE_ATTRIBUTE,
99
99
  hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
100
+ high: null,
100
101
  href: null,
101
102
  hrefLang: null,
102
103
  htmlFor: null,
@@ -107,6 +108,7 @@ var HTMLDOMPropertyConfig = {
107
108
  lang: null,
108
109
  list: MUST_USE_ATTRIBUTE,
109
110
  loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
111
+ low: null,
110
112
  manifest: MUST_USE_ATTRIBUTE,
111
113
  marginHeight: null,
112
114
  marginWidth: null,
@@ -121,6 +123,7 @@ var HTMLDOMPropertyConfig = {
121
123
  name: null,
122
124
  noValidate: HAS_BOOLEAN_VALUE,
123
125
  open: HAS_BOOLEAN_VALUE,
126
+ optimum: null,
124
127
  pattern: null,
125
128
  placeholder: null,
126
129
  poster: null,
@@ -134,6 +137,7 @@ var HTMLDOMPropertyConfig = {
134
137
  rowSpan: null,
135
138
  sandbox: null,
136
139
  scope: null,
140
+ scoped: HAS_BOOLEAN_VALUE,
137
141
  scrolling: null,
138
142
  seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
139
143
  selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
@@ -175,7 +179,9 @@ var HTMLDOMPropertyConfig = {
175
179
  itemID: MUST_USE_ATTRIBUTE,
176
180
  itemRef: MUST_USE_ATTRIBUTE,
177
181
  // property is supported for OpenGraph in meta tags.
178
- property: null
182
+ property: null,
183
+ // IE-only attribute that controls focus behavior
184
+ unselectable: MUST_USE_ATTRIBUTE
179
185
  },
180
186
  DOMAttributeNames: {
181
187
  acceptCharset: 'accept-charset',
package/lib/React.js CHANGED
@@ -143,6 +143,6 @@ if ("production" !== process.env.NODE_ENV) {
143
143
  }
144
144
  }
145
145
 
146
- React.version = '0.13.1';
146
+ React.version = '0.13.2';
147
147
 
148
148
  module.exports = React;
@@ -174,6 +174,14 @@ var ReactCompositeComponentMixin = {
174
174
  'Did you mean to define a state property instead?',
175
175
  this.getName() || 'a component'
176
176
  ) : null);
177
+ ("production" !== process.env.NODE_ENV ? warning(
178
+ !inst.getDefaultProps ||
179
+ inst.getDefaultProps.isReactClassApproved,
180
+ 'getDefaultProps was defined on %s, a plain JavaScript class. ' +
181
+ 'This is only supported for classes created using React.createClass. ' +
182
+ 'Use a static property to define defaultProps instead.',
183
+ this.getName() || 'a component'
184
+ ) : null);
177
185
  ("production" !== process.env.NODE_ENV ? warning(
178
186
  !inst.propTypes,
179
187
  'propTypes was defined as an instance property on %s. Use a static ' +
@@ -743,7 +751,7 @@ var ReactCompositeComponentMixin = {
743
751
  this._renderedComponent,
744
752
  thisID,
745
753
  transaction,
746
- context
754
+ this._processChildContext(context)
747
755
  );
748
756
  this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
749
757
  }
@@ -373,6 +373,8 @@ ReactDOMComponent.Mixin = {
373
373
  if (propKey === STYLE) {
374
374
  if (nextProp) {
375
375
  nextProp = this._previousStyleCopy = assign({}, nextProp);
376
+ } else {
377
+ this._previousStyleCopy = null;
376
378
  }
377
379
  if (lastProp) {
378
380
  // Unset styles on `lastProp` but not on `nextProp`.
@@ -290,9 +290,9 @@ function warnForPropsMutation(propName, element) {
290
290
 
291
291
  ("production" !== process.env.NODE_ENV ? warning(
292
292
  false,
293
- 'Don\'t set .props.%s of the React component%s. ' +
294
- 'Instead, specify the correct value when ' +
295
- 'initially creating the element.%s',
293
+ 'Don\'t set .props.%s of the React component%s. Instead, specify the ' +
294
+ 'correct value when initially creating the element or use ' +
295
+ 'React.cloneElement to make a new element with updated props.%s',
296
296
  propName,
297
297
  elementInfo,
298
298
  ownerInfo
@@ -40,6 +40,7 @@ assign(
40
40
  function isInternalComponentType(type) {
41
41
  return (
42
42
  typeof type === 'function' &&
43
+ typeof type.prototype !== 'undefined' &&
43
44
  typeof type.prototype.mountComponent === 'function' &&
44
45
  typeof type.prototype.receiveComponent === 'function'
45
46
  );
package/lib/update.js CHANGED
@@ -9,11 +9,14 @@
9
9
  * @providesModule update
10
10
  */
11
11
 
12
+ /* global hasOwnProperty:true */
13
+
12
14
  'use strict';
13
15
 
14
16
  var assign = require("./Object.assign");
15
17
  var keyOf = require("./keyOf");
16
18
  var invariant = require("./invariant");
19
+ var hasOwnProperty = {}.hasOwnProperty;
17
20
 
18
21
  function shallowCopy(x) {
19
22
  if (Array.isArray(x)) {
@@ -73,7 +76,7 @@ function update(value, spec) {
73
76
  COMMAND_SET
74
77
  ) : invariant(typeof spec === 'object'));
75
78
 
76
- if (spec.hasOwnProperty(COMMAND_SET)) {
79
+ if (hasOwnProperty.call(spec, COMMAND_SET)) {
77
80
  ("production" !== process.env.NODE_ENV ? invariant(
78
81
  Object.keys(spec).length === 1,
79
82
  'Cannot have more than one key in an object with %s',
@@ -85,7 +88,7 @@ function update(value, spec) {
85
88
 
86
89
  var nextValue = shallowCopy(value);
87
90
 
88
- if (spec.hasOwnProperty(COMMAND_MERGE)) {
91
+ if (hasOwnProperty.call(spec, COMMAND_MERGE)) {
89
92
  var mergeObj = spec[COMMAND_MERGE];
90
93
  ("production" !== process.env.NODE_ENV ? invariant(
91
94
  mergeObj && typeof mergeObj === 'object',
@@ -102,21 +105,21 @@ function update(value, spec) {
102
105
  assign(nextValue, spec[COMMAND_MERGE]);
103
106
  }
104
107
 
105
- if (spec.hasOwnProperty(COMMAND_PUSH)) {
108
+ if (hasOwnProperty.call(spec, COMMAND_PUSH)) {
106
109
  invariantArrayCase(value, spec, COMMAND_PUSH);
107
110
  spec[COMMAND_PUSH].forEach(function(item) {
108
111
  nextValue.push(item);
109
112
  });
110
113
  }
111
114
 
112
- if (spec.hasOwnProperty(COMMAND_UNSHIFT)) {
115
+ if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) {
113
116
  invariantArrayCase(value, spec, COMMAND_UNSHIFT);
114
117
  spec[COMMAND_UNSHIFT].forEach(function(item) {
115
118
  nextValue.unshift(item);
116
119
  });
117
120
  }
118
121
 
119
- if (spec.hasOwnProperty(COMMAND_SPLICE)) {
122
+ if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {
120
123
  ("production" !== process.env.NODE_ENV ? invariant(
121
124
  Array.isArray(value),
122
125
  'Expected %s target to be an array; got %s',
@@ -142,7 +145,7 @@ function update(value, spec) {
142
145
  });
143
146
  }
144
147
 
145
- if (spec.hasOwnProperty(COMMAND_APPLY)) {
148
+ if (hasOwnProperty.call(spec, COMMAND_APPLY)) {
146
149
  ("production" !== process.env.NODE_ENV ? invariant(
147
150
  typeof spec[COMMAND_APPLY] === 'function',
148
151
  'update(): expected spec of %s to be a function; got %s.',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react",
3
3
  "description": "React is a JavaScript library for building user interfaces.",
4
- "version": "0.13.1",
4
+ "version": "0.13.2",
5
5
  "keywords": [
6
6
  "react"
7
7
  ],