merge master

This commit is contained in:
Horcrux
2017-11-07 17:25:57 +08:00
20 changed files with 75 additions and 60 deletions
+2 -3
View File
@@ -2,9 +2,8 @@ sudo: false
language: node_js
node_js:
- '5'
- '4'
- '0.12'
- '8'
- '6'
script:
- npm run lint
+4 -1
View File
@@ -34,7 +34,9 @@
- react-native-svg >= 5.1.8 only supports react-native >= 0.44.0 and react == 16.0.0-alpha.6
- react-native-svg >= 5.2.0 only supports react-native >= 0.45.0 and react == 16.0.0-alpha.12
- react-native-svg >= 5.3.0 only supports react-native >= 0.46.0 and react == 16.0.0-alpha.12
- react-native-svg >= 5.4.1 only supports react-native >= 0.47.0 and react == 16.0.0-alpha.12
- react-native-svg >= 5.5.0 only supports react-native >= 0.50.0 and react == 16.0.0
2. Link native code
```bash
@@ -137,6 +139,7 @@ Name | Default | Description
----------------|------------|--------------
fill | '#000' | The fill prop refers to the color inside the shape.
fillOpacity | 1 | This prop specifies the opacity of the color or the content the current object is filled with.
fillRule | nonzero | The fillRule prop determines what side of a path is inside a shape, which determines how fill will paint the shape, can be `nonzero` or `evenodd`
stroke | 'none' | The stroke prop controls how the outline of a shape appears.
strokeWidth | 1 | The strokeWidth prop specifies the width of the outline on the current object.
strokeOpacity | 1 | The strokeOpacity prop specifies the opacity of the outline on the current object.
+3 -5
View File
@@ -1,5 +1,5 @@
import React from 'react';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import Shape from './Shape';
import {CircleAttributes} from '../lib/attributes';
import {pathProps, numberProp} from '../lib/props';
@@ -37,9 +37,7 @@ export default class extends Shape {
}
}
const RNSVGCircle = createReactNativeComponentClass({
const RNSVGCircle = createReactNativeComponentClass('RNSVGCircle', () => ({
validAttributes: CircleAttributes,
uiViewClassName: 'RNSVGCircle'
});
}));
+3 -3
View File
@@ -1,6 +1,6 @@
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {ClipPathAttributes} from '../lib/attributes';
export default class extends Component{
@@ -14,7 +14,7 @@ export default class extends Component{
}
}
const RNSVGClipPath = createReactNativeComponentClass({
const RNSVGClipPath = createReactNativeComponentClass('RNSVGClipPath', () => ({
validAttributes: ClipPathAttributes,
uiViewClassName: 'RNSVGClipPath'
});
}));
+3 -3
View File
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
export default class extends Component {
static displayName = 'Defs';
@@ -9,7 +9,7 @@ export default class extends Component {
}
}
const RNSVGDefs = createReactNativeComponentClass({
const RNSVGDefs = createReactNativeComponentClass('RNSVGDefs', () => ({
validAttributes: {},
uiViewClassName: 'RNSVGDefs'
});
}));
+3 -3
View File
@@ -1,5 +1,5 @@
import React from 'react';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import Shape from './Shape';
import {pathProps, numberProp} from '../lib/props';
import {EllipseAttributes} from '../lib/attributes';
@@ -41,7 +41,7 @@ export default class extends Shape{
}
}
const RNSVGEllipse = createReactNativeComponentClass({
const RNSVGEllipse = createReactNativeComponentClass('RNSVGEllipse', () => ({
validAttributes: EllipseAttributes,
uiViewClassName: 'RNSVGEllipse'
});
}));
+3 -3
View File
@@ -1,5 +1,5 @@
import React from 'react';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import Shape from './Shape';
import {pathProps, fontProps} from '../lib/props';
import {GroupAttributes} from '../lib/attributes';
@@ -31,7 +31,7 @@ export default class extends Shape{
}
}
const RNSVGGroup = createReactNativeComponentClass({
const RNSVGGroup = createReactNativeComponentClass('RNSVGGroup', () => ({
validAttributes: GroupAttributes,
uiViewClassName: 'RNSVGGroup'
});
}));
+3 -3
View File
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Image } from 'react-native';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {ImageAttributes} from '../lib/attributes';
import {numberProp, touchableProps, responderProps} from '../lib/props';
import Shape from './Shape';
@@ -57,7 +57,7 @@ export default class extends Shape {
}
}
const RNSVGImage = createReactNativeComponentClass({
const RNSVGImage = createReactNativeComponentClass('RNSVGImage', () => ({
validAttributes: ImageAttributes,
uiViewClassName: 'RNSVGImage'
});
}));
+3 -3
View File
@@ -1,5 +1,5 @@
import React from 'react';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {LineAttributes} from '../lib/attributes';
import Shape from './Shape';
import {pathProps, numberProp} from '../lib/props';
@@ -40,7 +40,7 @@ export default class extends Shape {
}
}
const RNSVGLine = createReactNativeComponentClass({
const RNSVGLine = createReactNativeComponentClass('RNSVGLine', () => ({
validAttributes: LineAttributes,
uiViewClassName: 'RNSVGLine'
});
}));
+8 -5
View File
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {numberProp} from '../lib/props';
import extractGradient from '../lib/extract/extractGradient';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {LinearGradientAttributes} from '../lib/attributes';
export default class extends Component{
@@ -36,7 +36,10 @@ export default class extends Component{
}
}
const RNSVGLinearGradient = createReactNativeComponentClass({
validAttributes: LinearGradientAttributes,
uiViewClassName: 'RNSVGLinearGradient'
});
const RNSVGLinearGradient = createReactNativeComponentClass(
'RNSVGLinearGradient',
() => ({
validAttributes: LinearGradientAttributes,
uiViewClassName: 'RNSVGLinearGradient'
})
);
+3 -3
View File
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {PathAttributes} from '../lib/attributes';
import Shape from './Shape';
import {pathProps} from '../lib/props';
@@ -31,7 +31,7 @@ export default class extends Shape {
}
}
const RNSVGPath = createReactNativeComponentClass({
const RNSVGPath = createReactNativeComponentClass('RNSVGPath', () => ({
validAttributes: PathAttributes,
uiViewClassName: 'RNSVGPath'
});
}));
+8 -5
View File
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {numberProp} from '../lib/props';
import extractGradient from '../lib/extract/extractGradient';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {RadialGradientAttributes} from '../lib/attributes';
export default class extends Component{
@@ -42,7 +42,10 @@ export default class extends Component{
}
}
const RNSVGRadialGradient = createReactNativeComponentClass({
validAttributes: RadialGradientAttributes,
uiViewClassName: 'RNSVGRadialGradient'
});
const RNSVGRadialGradient = createReactNativeComponentClass(
'RNSVGRadialGradient',
() => ({
validAttributes: RadialGradientAttributes,
uiViewClassName: 'RNSVGRadialGradient'
})
);
+3 -3
View File
@@ -1,6 +1,6 @@
import React from 'react';
import './Path'; // must import Path first, don`t know why. without this will throw an `Super expression must either be null or a function, not undefined`
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {pathProps, numberProp} from '../lib/props';
import {RectAttributes} from '../lib/attributes';
import extractProps from '../lib/extract/extractProps';
@@ -52,7 +52,7 @@ export default class extends Shape {
}
}
const RNSVGRect = createReactNativeComponentClass({
const RNSVGRect = createReactNativeComponentClass('RNSVGRect', () => ({
validAttributes: RectAttributes,
uiViewClassName: 'RNSVGRect'
});
}));
+3 -3
View File
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import extractViewBox from '../lib/extract/extractViewBox';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import {SymbolAttributes} from '../lib/attributes';
export default class extends Component{
@@ -23,7 +23,7 @@ export default class extends Component{
}
}
const RNSVGSymbol = createReactNativeComponentClass({
const RNSVGSymbol = createReactNativeComponentClass('RNSVGSymbol', () => ({
validAttributes: SymbolAttributes,
uiViewClassName: 'RNSVGSymbol'
});
}));
+3 -3
View File
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import extractText from '../lib/extract/extractText';
import {textProps} from '../lib/props';
import {TSpanAttibutes} from '../lib/attributes';
@@ -50,7 +50,7 @@ export default class extends Shape {
}
}
const RNSVGTSpan = createReactNativeComponentClass({
const RNSVGTSpan = createReactNativeComponentClass('RNSVGTSpan', () => ({
validAttributes: TSpanAttibutes,
uiViewClassName: 'RNSVGTSpan'
});
}));
+3 -3
View File
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import extractText from '../lib/extract/extractText';
import {textProps} from '../lib/props';
import {TextAttributes} from '../lib/attributes';
@@ -50,7 +50,7 @@ export default class extends Shape {
}
}
const RNSVGText = createReactNativeComponentClass({
const RNSVGText = createReactNativeComponentClass('RNSVGText', () => ({
validAttributes: TextAttributes,
uiViewClassName: 'RNSVGText'
});
}));
+2 -2
View File
@@ -42,7 +42,7 @@ export default class extends Shape {
}
const RNSVGTextPath = createReactNativeComponentClass({
const RNSVGTextPath = createReactNativeComponentClass('RNSVGTextPath', () => ({
validAttributes: TextPathAttributes,
uiViewClassName: 'RNSVGTextPath'
});
}));
+3 -4
View File
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js';
import createReactNativeComponentClass from '../lib/createReactNativeComponentClass';
import extractProps from '../lib/extract/extractProps';
import {pathProps, numberProp} from '../lib/props';
import {UseAttributes} from '../lib/attributes';
@@ -45,8 +45,7 @@ export default class extends Shape {
}
}
const RNSVGUse = createReactNativeComponentClass({
const RNSVGUse = createReactNativeComponentClass('RNSVGUse', () => ({
validAttributes: UseAttributes,
uiViewClassName: 'RNSVGUse'
});
}));
+6
View File
@@ -0,0 +1,6 @@
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js'
export default (uiViewClassName, getViewConfig) =>
createReactNativeComponentClass.length >= 2
? createReactNativeComponentClass(uiViewClassName, getViewConfig)
: createReactNativeComponentClass(getViewConfig)
+6 -2
View File
@@ -1,5 +1,9 @@
{
<<<<<<< HEAD
"version": "6.0.0-rc1",
=======
"version": "5.5.0",
>>>>>>> master
"name": "react-native-svg",
"description": "SVG library for react-native",
"repository": {
@@ -22,8 +26,8 @@
"lint": "eslint ./"
},
"peerDependencies": {
"react-native": ">=0.46.0",
"react": "16.0.0-alpha.12",
"react-native": ">=0.50.0",
"react": "*",
"prop-types": "^15.5.8"
},
"dependencies": {