Commit Graph

546 Commits

Author SHA1 Message Date
Wojciech Lewicki
98c14b4f45 chore: add CI for JS, iOS and Android formatting (#1782)
Added CI workflow and local pre-commit hook for formatting and linting the newly added JS, iOS and Android code.
2022-08-16 12:00:32 +02:00
Wojciech Lewicki
77267be5fc feat: support Fabric on Android (#1804)
Most of Android changes for Fabric and bump of FabricExample to RN 0.69.2. iOS and JS changes are available in #1821.
The most notable change on Android is adding methods to components that accept String values of each NumberProp instead of Dynamic. Another change is changed structure of RenderableViewManager.java since we needed to abstract methods that belong only to components inheriting from VirtualView in order to be able to properly override them in their children.
2022-08-12 11:42:44 +02:00
Mrinal Maheshwari
39c8332f4d Adding mavenCentral() as jcenter() is shutting (#1570)
Adding mavenCentral() as jcenter() is shutting down
2022-02-25 14:21:56 +01:00
Wojciech Lewicki
b007efe23a fix: PlatformColor crashes on iOS and Android (#1703)
Follow-up PR to https://github.com/react-native-svg/react-native-svg/pull/1561 fixing the problems mentioned there. Also fixing the wrong releasing introduced in 027b8c16aa
2022-02-24 12:53:04 +01:00
Joel Arvidsson
d35878bacc Support PlatformColor (#1561)
Since version 0.63 React Native has supported PlatformColor structs that among other features has dark mode support built in. Using those values with RNSVG today throws a warning "[Object object]" is not a valid color or brush and makes the path have a clear color.

This PR adds support for PlatformColor by utilizing the color parsing code shipped with React Native itself. In order to support the dynamic properties I had to retain the reference as a UIColor and convert it to CGColorRef as it's read. This might have a performance penalty.

The Android implementation doesn't yet have support for dynamic values (EDIT: react-native itself doesn't support it, so we're good there I think). Since it relies on the ColorPropConverter class, I think it means minimum supported version of RN will be raised to 0.63.
2022-02-23 16:28:31 +01:00
陈阳
42babbb6df Fix clipRule in iOS 2021-04-09 16:31:18 +08:00
陈阳
bcbaa45645 Fix clipRule in Android #1409 2021-04-09 15:21:00 +08:00
Mikael Sand
ba4159cbc8 Merge remote-tracking branch 'origin/master' into develop 2020-04-10 02:39:56 +03:00
Mikael Sand
9db6f3d8f7 Merge pull request #1301 from SaeedZhiany/patch-1
bumped AGP to 3.6.1 and removed buildToolsVersion
2020-04-10 01:35:56 +03:00
Mars Lan
7f612c7050 refactor: improve error logging in PathParser 2020-03-15 07:54:35 -07:00
Mikael Sand
e66e87a5b5 feat: implement WithLocalSvg 2020-03-09 17:26:24 +02:00
Mikael Sand
4e9e8b58b2 feat: Support local .svg files, fixes #1306
depends on https://github.com/react-native-community/cli/pull/1042

```jsx
import React from 'react';
import {LocalSvg} from 'react-native-svg';
import test from './test.svg';
export default () => <LocalSvg asset={test} />;
```
2020-03-09 16:45:36 +02:00
Mikael Sand
f1671efc98 chore(android): remove redundant files 2020-03-08 14:35:45 +02:00
Mikael Sand
df4ff9caa7 fix(android): default cap, join and handling of null matrix 2020-03-07 18:15:28 +02:00
Mikael Sand
bd78998a2b fix: #1290 pointerEvents="none" 2020-03-05 15:22:34 +02:00
Mikael Sand
0288d95e7b fix!: #1247 Animated view translation inside Svg tag
Fixes performance regressions on ios
Place elements inside ForeignObject to use v10 / standard behaviour
ForeignObject should behave unchanged from v10 / v11

Possibly fixes #1258 as well

BREAKING CHANGE: Behavior of native elements is reverted to pre v10
2020-03-04 19:35:06 +02:00
SaeedZhiany
b893785014 bumped AGP to 3.6.1 and removed buildToolsVersion 2020-03-02 14:59:22 +03:30
SaeedZhiany
81252b8249 Refactored Gradle setup
- moved safeExtGet to out of `buildscript` block, because it's no longer needed to be there (previously we needed it there for getting AGP version from root project)

- bumped AGP version to 3.5.3

- replace `${safeExtGet('reactnativeVersion', '+')}` with `+`, becase react-native version automatically resolved by npm and it does not need to handle using `safeExtGet`
2020-02-11 15:36:28 +03:30
Mikael Sand
498376678e fix: compatibility with reanimated color, fixes #1241 2020-01-18 02:32:00 +02:00
Mikael Sand
3eb82a91b4 fix(android): NullPointerException when calling getBBox #1215
Also fixes for other native methods
2020-01-15 03:12:45 +02:00
Mikael Sand
c2c524af54 Merge pull request #1249 from HelloCore/fix/animated-stroke-path
fix(android): animated stroked path with useNativeDriver: true
2020-01-15 02:18:47 +02:00
Mikael Sand
db682f87bc fix(android)!: pivot point for RN transform array syntax
BREAKING CHANGE: Makes android specific transform origin adjustments
 unnecessary / broken. Renders exactly the same as web and ios instead.
2020-01-15 02:09:32 +02:00
Core
c5dd62f47b fix(android): support animating stroke color 2020-01-14 12:12:18 +07:00
Core
2d347347a3 fix(android): support setting path null 2020-01-14 12:11:58 +07:00
Mikael Sand
e48538d0ba Merge pull request #1242 from SaeedZhiany/supportForeignObject
Added support for ForeignObject
2020-01-12 03:43:24 +02:00
Mikael Sand
85e7943448 fix: foreignObject clipping and transform 2020-01-11 21:35:44 +02:00
SaeedZhiany
f18c483555 Added support for ForeignObject 2020-01-07 14:20:07 +03:30
Mikael Sand
89f443236e fix(android): improve handling of native ancestors 2020-01-04 16:33:23 +02:00
Mikael Sand
ebc7220f4d fix(android): elements not touchable if below opacity limit
fixes #1200:
  <Rect>, <Ellipse> are not rendered if opacity set to 0 on Android
2020-01-04 07:22:41 +02:00
Mikael Sand
d5bddd5e2d fix(android): fix radial gradient vertical center offset scaling 2020-01-04 06:06:11 +02:00
Mikael Sand
3bf07f8085 fix(android): correct values for measureInWindow, fixes #1231 2020-01-04 00:43:22 +02:00
Mikael Sand
15b4ac63b9 feat(android): support using other native views in e.g. masks 2020-01-03 20:17:21 +02:00
Mikael Sand
3e3ad13b65 feat: Implement display="none"
fixes: Enable display svg prop #1220
2020-01-01 21:34:03 +02:00
Mikael Sand
027b8c16aa fix: Text color doesn't work with inlineSize #1225 2020-01-01 20:28:30 +02:00
SaeedZhiany
97fe7c0833 ignore some more file and folders in android path 2019-12-10 18:32:59 +03:30
Mikael Sand
6035d2df13 fix(android): deprecation warning in TSpanView 2019-12-09 23:51:01 +02:00
Mikael Sand
95a932a985 Merge pull request #1190 from SaeedZhiany/ReducePackageSize
separate npmignore entries into their related folders
2019-12-09 21:17:57 +02:00
Mikael Sand
1a903b79aa Merge pull request #1203 from jayu/fix/path_d_reanimated
fix: initialize PathView with empty path to support reanimated on Android
2019-12-09 21:13:10 +02:00
Kuba
45192bd086 fix: initialize PathView with empty path 2019-11-28 12:39:27 +01:00
SAEED
a4a27e685f separate npmignore entries into their related folders 2019-11-13 11:21:11 +03:30
Mikael Sand
0cc5330d60 [android] Initial work on Bidi and arabic font features 2019-10-29 17:54:47 +02:00
Mikael Sand
5c967b7c69 fix(android): Image onPress #1170 2019-10-25 21:23:55 +03:00
SaeedZhiany
d3b2f27e22 Load Android Gradle Plugin conditionally 2019-10-21 09:11:01 +03:30
Mikael Sand
3aa126e6be fix: improve handling of transform attribute on clipPath, fixes #1152 2019-10-19 22:43:11 +03:00
Mikael Sand
73b21d1560 fix: handle setting transform attribute on clipPath, fixes #1152 2019-10-19 21:59:09 +03:00
Mikael Sand
c63f9e29ff fix: improve native method spec conformance 2019-10-06 17:47:46 +03:00
Mikael Sand
8ce76113e1 fix: Make native methods synchronous 2019-10-05 18:43:00 +03:00
Mikael Sand
e6eda84513 fix(android): defineMarker/getDefinedMarker storage 2019-10-05 12:30:37 +03:00
Mikael Sand
5c5072dbef fix: getScreenCTM calculation 2019-10-05 11:58:48 +03:00
Mikael Sand
f3e0b190a9 fix(android): native method scaling and getScreenCTM offset 2019-10-04 20:49:54 +03:00