Commit Graph
1899 Commits
Author SHA1 Message Date
Wojciech Lewicki fb28d7809c Release 13.12.0 2023-08-21 16:00:42 +02:00
Wojciech LewickiandGitHub f5503e2c9b feat: remove UIGraphicsBeginImageContextWithOptions from repo (#2117)
Since UIGraphicsBeginImageContextWithOptions will be depracated in iOS 17 (developer.apple.com/documentation/uikit/1623912-uigraphicsbeginimagecontextwitho), I changed the implementation to not use it and use UIGraphicsImageRenderer instead.

Also added Mask examples to be able to test it.
2023-08-21 11:35:50 +02:00
Wojciech Lewicki 9176c4c95a Release 13.11.0 2023-08-07 18:49:17 +02:00
Wojciech LewickiandGitHub 3ee73bd1f5 Update README.md 2023-08-07 18:43:44 +02:00
Wojciech LewickiandGitHub 416ccc8a86 fix: bump packages, eslint, tsconfig, prettier and resolve all conflicts (#2114)
PR bumping packages, eslint, tsconfig, prettier and resolving all conflicts connected to it.
2023-08-07 17:44:58 +02:00
3599c57e31 docs: update README.md (#2110)
Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
2023-08-02 15:20:34 +02:00
LettyandGitHub 9cd828067f docs: update usage.md for react-native 0.72 (#2104)
metro.config.js snippet in USAGE.md was outdated, therefore i updated this according the config from react-native-svg-transformer.
2023-08-01 17:59:44 +02:00
_nderscoreandGitHub 34243a53af fix: make web platform types compatible with native types (#2091)
When react-native-svg is used on a web project where typescript has been configured to resolve .web.ts file exentions before .ts, it causes type errors.

This is because the types in ReactNativeSVG.web.ts don't match the types in ReactNativeSVG.ts

This PR adds the correct types for all exported components on the web platform inside ReactNativeSVG.web.ts. Those changes are:

Added missing prop types for all components
Made style, gradientTransform, and patternTransform optional in BaseProps.
Made styleProp argument of resolve() undefined-able, to support style being an optional prop (this also seems to follow the logic in the body of the function, which has a check for a truthy styleProp)
These changes only impact types - no functionality has been changed.
2023-07-22 16:53:39 +02:00
Wojciech Lewicki 0e931577ac Release 13.10.0 2023-07-07 12:53:47 +02:00
Wojciech LewickiandGitHub 78aaffad10 feat: strokeDasharray with Animated (#2089)
PR adding the proper handling of strokeDasharray prop for when used with Animated and Reanimated. Code based on #1464 by @bardliu, but with the newest state of the repository.
2023-07-07 11:21:04 +02:00
Wojciech LewickiandGitHub 24dba65b7a chore: bump TestsExample to 0.72 (#2088) 2023-07-06 20:39:19 +02:00
Wojciech LewickiandGitHub 54bec6d10c chore: run prettier and lint (#2087) 2023-07-06 14:41:36 +02:00
PiotrWszolekandGitHub e04a159b46 Prevents SvgUri crashes when uri is invalid and adds fallback prop (#2071)
SvgUri component crashes an app when uri with SVG returns html or some other content instead of valid SVG.
This change prevents those crashes and adds fallback property of JSX type which is rendered instead of corrupted SVG.
2023-07-06 14:21:20 +02:00
7983ad2ca6 Add web support for toDataURL() on svg tags (#2072)
Implement web support for Svg.toDataURL()

Continuing the work of @wood1986 from #1361

Co-authored-by: wood1986 <5212215+wood1986@users.noreply.github.com>
2023-07-06 00:19:18 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f6570d31de chore(deps): bump fast-xml-parser from 4.2.4 to 4.2.5 in /TestsExample (#2085)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 23:40:27 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4061203f23 chore(deps): bump vm2 from 3.9.14 to 3.9.19 (#2056)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 23:39:31 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e6724d6b57 chore(deps): bump fast-xml-parser from 4.1.3 to 4.2.4 in /TestsExample (#2063)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 23:39:18 +02:00
Wojciech LewickiandGitHub 91f6bd1fa9 chore: bump Examples to 0.72 (#2084)
Bump Example and FabricExample to RN 0.72
2023-07-05 22:46:42 +02:00
7c1d537c2f Fix #1345: opacity does not work with currentColor on Android (#2080)
I implemented this by multiplying the alpha of the currentColor by the opacity when setting a currentColor brush.

Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
2023-07-05 18:06:23 +02:00
Hampus SjöbergandGitHub 50b555cde4 Fix syntax error in RNSVGImageShadowNode::initialStateData (#2079)
Fix syntax error in RNSVGImageShadowNode::initialStateData
2023-07-05 17:42:13 +02:00
sgabrielandGitHub a1090f25a1 fix: Updating iOS version #2038 (#2041)
Updated iOS version to 12.4 to be able to build on Xcode 14.3
2023-05-24 13:13:32 +02:00
JanandGitHub 98fdeaa516 fix: remove deprecated import from react-native-web (#2027)
fix: remove deprecated import from react-native-web
2023-05-24 13:03:34 +02:00
fauri13andGitHub 98836149db Fix setNativeProps type (#2058)
Setting Object to the props type does not allow passing any object to the method. So in TypeScript when using the method for example with Path, you will get an error when passing the d. Instead ob Object, you should use at least P so it allows the original props of the component you are using.
2023-05-23 12:28:08 +02:00
Christoph PurrerandGitHub dfec171068 Fix compilation errors on Windows (#2045)
Fix compilation errors on Windows
2023-05-23 09:50:23 +02:00
Wojciech Lewicki d31ffdb762 Release 13.9.0 2023-03-30 17:35:20 +02:00
11edfc4a71 fix: read svg file on android (#2016)
PR fixing the behavior for fetching local files in `SvgUri` on `Android`.

Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
2023-03-30 17:00:53 +02:00
Wojciech LewickiandGitHub 29382d927a fix: scale path markers so they match ios (#2018)
PR adding scaling of markers of path in order to make them behave the same as on iOS. Also bumped the versions of agp and spotless.
2023-03-30 14:27:30 +02:00
a7af70c43d fix #1592 : add marker support on Rect, Line, Ellipse, Circle and Group (#1594)
PR adding better Marker support on Android. Markers were only displayed on Path on Android. I have looked at the code and Markers are based on elements attribute which was only filled via PathParser. I have modified getPath method on other shapes in order to fill elements attribute. For groups I only copied data from children.

Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
2023-03-29 15:25:36 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
911151ac3b chore(deps): bump @xmldom/xmldom from 0.7.6 to 0.7.9 (#2004)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 11:00:50 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f3d8c9d7bc chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#1982)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 11:00:21 +02:00
Wojciech LewickiandGitHub a917baf2ec fix: remove unnecessary methods provided by superclasses for accessibility (#2013)
PR removing methods that seem unnecessary for the accessibility props since they are provided by superclasses. It was necessary to update fabric updateProps method though, since we don't call super there. Also added proper type definitions and removed unnecessary casts.
2023-03-27 15:18:59 +02:00
Alex AfanasenkoandGitHub ccda91c8df fix: mask render on android (#1981)
It seems that the bug comes from the fact that on iOS we are making a Rect from those values, which takes its starting positions and than width and height as argument, whereas on Android the arguments are strictly 4 bounds, therefore we need to add the starting points to the right and bottom argument.
2023-03-24 14:25:24 +01:00
baf011fbf1 fix: make image props extend CommonPathProps (#2007)
Since `Image` can use all the props provided by `CommonPathProps` type, we extend it with adding image-specific props.

Co-authored-by: Umesh Dangrecha <umeshdangrecha240@gmail.com>
Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
2023-03-24 12:23:16 +01:00
Kacper KafaraandGitHub 998c3e310e chore: set library namespace in build script (#2005)
Since AGP 8.0 project namespace must be set inside build script.
It is also the recommended way in Android docs.

It is also recommended, that the package name definition is removed from Android manifest file, but I've had some problems in react-native-screens with RN CLI crashing (as it was expecting the package field to exist) & according to this conversation it'll still be legal to leave package name definition in Android manifest file as long as it exactly matches the value in build script.
2023-03-23 20:39:41 +01:00
MichalandGitHub 63bf27006b Fix SVG parsing when the closing tags include whitespace (#2012)
Allows whitespace to be used in the closing tag.
2023-03-23 19:59:07 +01:00
Hampus SjöbergandGitHub 5cfa4dfc6a Don't set self.opaque = false on macOS (#2008)
Don't set `self.opaque = false` on macOS
2023-03-23 17:18:55 +01:00
5b6b555fa2 fix onLayout (#1998)
PR adding proper dispatching of `onLayout` event on both archs by using `eventEmitter`.

Co-authored-by: yonatan.altaraz <yonatan.altaraz@khealth.ai>
Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
2023-03-22 14:38:30 +01:00
d03604797f add accessibility and testId props and virtual nodes to support e2e tests tools (#2001)
PR adding accessibility and testId props and virtual nodes to support e2e tests tools and provide general accessibility support.

Co-authored-by: yonatan.altaraz <yonatan.altaraz@khealth.ai>
Co-authored-by: galkahana <gal.kahana@hotmail.com>
2023-03-22 13:01:09 +01:00
Risto KeravuoriandGitHub eaf79ea3ee Upgrade rn-builder-bob to enable tree-shaking in rn-web (#1993)
Upgrade rn-builder-bob to enable tree-shaking in rn-web
2023-03-21 14:49:28 +01:00
Wojciech LewickiandGitHub d6975ea9f2 chore: update Example to newest react-native version (#1999)
PR bumping the Example app to RN 0.71
2023-03-09 11:31:48 +01:00
Wojciech Lewicki 2c59100e24 Release 13.8.0 2023-02-01 11:42:40 +01:00
Wojciech LewickiandGitHub 175a48f8c9 chore: change fabric flag (#1979)
Changed `RN_FABRIC_ENABLED` to `RCT_NEW_ARCH_ENABLED` since it is the current standard for this flag.
2023-01-31 16:15:59 +01:00
Tommy NguyenandGitHub f2f533a292 chore: ensure consistent use of import type (#1971)
We hit issues when building react-native-svg because of inconsistent use of import type. This change adds ESLint result to ensure consistency. I also ran yarn lint --fix to fix up the code.
2023-01-31 14:12:21 +01:00
Wojciech LewickiandGitHub cb87e7510f feat: update FabricExample to 0.71.0-rc.6 (#1962)
PR bumping examples to RN 0.71. For now web Example seems not to load code properly.
2023-01-13 14:19:17 +01:00
Wojciech Lewicki 678940c506 Release 13.7.0 2023-01-09 16:58:43 +01:00
Marlene CotaandGitHub a118c879c7 feat(windows): add example app (#1937)
Added example app for Windows
2023-01-09 12:48:20 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a21e47d3a1 chore(deps): bump json5 from 2.2.1 to 2.2.3 (#1955)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 16:25:45 +01:00
MantasandGitHub 76b742c24a fix: Call onLoad prop in SvgCssUri (#1927)
SvgCssUri calls onLoad if it's passed, just like in PR #1817 (with SvgUri).
2023-01-04 16:18:14 +01:00
Marlene CotaandGitHub 38da5fb67c feat(windows): add clipPath and touch events (#1933)
Adding support for clipPath and touch events.
2023-01-04 15:51:08 +01:00
Wojciech LewickiandGitHub 60fcb0f28f fix: restore black as a default color for svgs (#1947)
PR fixing setting of fill color to black when none is provided to the svg.
2023-01-03 21:15:09 +01:00