zoriya
7d705519a4
Add build
2025-02-10 23:27:02 +01:00
Mikael Sand
4f3e34e556
refactor: typescript
2019-09-09 05:44:29 +03:00
Mikael Sand
fd897f6b60
fix: font size regexp
2019-08-27 16:25:21 +03:00
Mikael Sand
f76b2217cc
lint: upgrade dev-deps and fix formatting
2019-08-26 23:22:58 +03:00
Mikael Sand
cdb4b1fea6
Simplify hsl and hwb handling
2019-08-05 02:11:31 +03:00
Ryan Huber
952d02709d
fix hwbtorgb missing alpha
2019-08-05 02:11:31 +03:00
Ryan Huber
645b5220d4
hsla is dropping the a when converting to rgb
2019-08-05 02:11:31 +03:00
Ryan Huber
6656cb4959
remove extra *255 in hsl conversion
...
this is currently happening on lines 437-441 when converting to the
int32Color
2019-08-05 02:11:31 +03:00
Mikael Sand
319256bdc8
refactor: cleanup extraction logic
2019-08-02 04:13:01 +03:00
Mikael Sand
44b700eed8
feat: Implement inlineSize support
2019-07-30 19:02:03 +03:00
Mikael Sand
f5bf06afd2
Adopt changes from community guideline for repository setup
...
https://github.com/react-native-community/.github/blob/master/Guidelines/Repository%20Setup.md
2019-07-26 02:51:02 +03:00
Mikael Sand
5be5d37a4a
[js] Add fontVariationSettings font prop/style/attribute support
2019-07-20 23:49:05 +03:00
Mikael Sand
d054af815e
refactor Matrix2D, return early when appending identity
2019-07-19 00:33:48 +03:00
Mikael Sand
0e7acd846f
refactor Matrix2D, remove de-referencing / use of this
2019-07-16 15:21:31 +03:00
Mikael Sand
33b4ab4f18
Update Matrix2D.js
...
fix hasInitialState for edge case
2019-06-09 12:45:10 +03:00
Josh Klag
03f34e8af4
make offset optional in gradient
2019-06-07 15:21:02 -07:00
Mikael Sand
0835b50056
Fix translate shorthand and add array support
...
https://github.com/react-native-community/react-native-svg/issues/998
2019-04-19 04:48:45 +03:00
Mikael Sand
fad190a283
Merge branch 'master' into vector-effect
2019-03-10 03:01:24 +02:00
Mikael Sand
7b83073856
[web] Refactor and cleanup
2019-03-10 02:33:53 +02:00
Mikael Sand
d80ab86c18
Refactor and simplify color processing
2019-02-27 23:06:53 +02:00
Mikael Sand
1b050834d5
[ios] Implement vectorEffect nonScalingStroke / non-scaling-stroke
2019-02-27 22:08:10 +02:00
Mikael Sand
ffb04c8414
[android] Implement vectorEffect nonScalingStroke / non-scaling-stroke
2019-02-27 21:16:20 +02:00
Mikael Sand
aec8015255
Refactor: unroll static loop
2019-02-27 21:11:27 +02:00
Mikael Sand
9b1ccf0e7f
Implement basic support for native animation of font size
2019-02-17 03:29:59 +02:00
Mikael Sand
1be9188eb7
let > const
2019-02-03 04:07:29 +02:00
Mikael Sand
ac2592d03a
Fix validation and use of pre-parsed svg defined colors on android.
...
Allow viewBox given as array of numbers
2019-02-02 17:35:53 +02:00
Mikael Sand
a2d420c7e8
Fix handling of react-native style transform arrays on root Svg element
...
Simplify urlIdPattern
2019-02-02 15:57:11 +02:00
Mikael Sand
1c518c9896
Allow int32ARGBColor and use it to represent colors instead of rgbaArray
...
int32ARGBColor is 0xaarrggbb format to allow no processing
Optimize default fill handling
Improve gradient input validation
Simplify gradient extraction
Use a single array to represent gradient, with two numbers per stop
Reuse transform props in extractProps, short circuit identity transform.
[android] Refactor ImageView, fix mLoading
2019-02-02 02:20:26 +02:00
Mikael Sand
7203228482
Fix brush color array handling
2019-01-31 17:37:28 +02:00
Mikael Sand
f8e329c956
Optimize color extraction for pre-parsed values, update d.ts types.
2019-01-31 17:21:05 +02:00
Mikael Sand
5ba7154086
Optimize transform extraction
2019-01-29 21:58:17 +02:00
Mikael Sand
4458b5122c
Optimize transform extraction, allow passing arrays to avoid parsing
2019-01-29 21:12:29 +02:00
Mikael Sand
ab9633f81a
Optimize color extraction, allow passing color arrays to avoid parsing
2019-01-29 20:05:40 +02:00
Mikael Sand
f1372842a7
Hoist color parsing regular expressions
2019-01-29 06:03:10 +02:00
Mikael Sand
05a6d4fc2f
Simplify color parsing
2019-01-29 05:59:29 +02:00
Mikael Sand
5849c82e5c
Improve color parsing error handling
2019-01-29 05:46:59 +02:00
Mikael Sand
7a42187789
Remove redundant escapes
2019-01-29 04:53:13 +02:00
Mikael Sand
6777211d7e
Use singleQuote
2019-01-29 04:51:56 +02:00
Mikael Sand
1a4958b820
Remove last dependency
2019-01-29 04:42:49 +02:00
Mikael Sand
76bc07fce9
Shrink indent_size / tabWidth
2019-01-29 03:03:05 +02:00
Mikael Sand
546f22587f
Allow style arrays to affect text properties
...
Ensure props and styles are merged only once per render
Configure prettier
2019-01-29 02:54:22 +02:00
Mikael Sand
3a8ae840f6
Allow style arrays to affect font properties
2019-01-29 01:58:49 +02:00
Mikael Sand
7177ae7528
Simplify extractResponder
2019-01-29 01:43:13 +02:00
Mikael Sand
60988cfd06
Fix linting
2019-01-25 16:35:10 +02:00
Mikael Sand
f5cdc31934
Simplify Svg element render method and pickNotNil
2019-01-25 16:14:42 +02:00
Mikael Sand
b3d29c9045
Remove string conversion of svg bounds, allow style arrays more widely
2019-01-24 02:44:28 +02:00
Mikael Sand
eb3e67a257
Implement support for animating gradient stops, fixes #884
...
```jsx
import * as React from 'react';
import { View, StyleSheet, Animated } from 'react-native';
import { Svg, Defs, LinearGradient, Stop, Rect } from 'react-native-svg';
const AnimatedStop = Animated.createAnimatedComponent(Stop);
export default class App extends React.Component {
state = {
anim: new Animated.Value(0),
};
componentDidMount = () => {
Animated.timing(this.state.anim, {
duration: 3000,
toValue: 1,
}).start();
};
render() {
return (
<View style={styles.container}>
<Svg width="100%" height="100%">
<Defs>
<LinearGradient id="grad" x1="0" y1="50" x2="100" y2="50">
<Stop offset="0%" stopColor="#888 " stopOpacity="1" />
<AnimatedStop
offset={this.state.anim}
stopColor="#888 "
stopOpacity="0.1"
/>
<Stop offset="100%" stopColor="#888 " stopOpacity="1" />
</LinearGradient>
</Defs>
<Rect
x="10"
y="20"
rx="16"
ry="16"
width="96"
height="32"
fill="url(#grad)"
/>
</Svg>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#ecf0f1',
},
});
```
2019-01-23 17:09:35 +02:00
Mikael Sand
13552cfc49
Refactor, rewrite iterables and for of to plain access and for loops
2019-01-22 21:54:04 +02:00
Mikael Sand
6567b764ca
Simplify extractGradient
2019-01-22 18:21:08 +02:00
Mikael Sand
88adb2a4d7
Optimize Matrix2d and fix skew spec conformance
2019-01-09 21:02:44 +02:00