@resvg/resvg-js
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -12,2 +12,25 @@ # Change Log | ||
## [1.0.4] - 2021-10-19 | ||
### Added | ||
- feat: `background` option supports alpha channel, currently only supports [CSS Colors 3](https://www.w3.org/TR/css-color-3/#colorunits). | ||
CSS color parse depends on [svgtypes](https://github.com/RazrFalcon/svgtypes/commit/266ee2caff9bd6a75d9a63b6e9850554f6de87b4). | ||
```js | ||
render(svgString, { | ||
// Support | ||
background: 'rgba(77, 25, 230, .8)', | ||
background: 'rgb(77, 25, 230, .8)', | ||
background: 'rgba(77%, 25%, 230%, .8)', | ||
background: 'hsla(255, 80%, 50%, .8)', | ||
background: 'hsl(255, 80%, 50%, .8)', | ||
// Not support | ||
background: 'rgb(77 25 230 / 80%)', | ||
background: 'rgb(77 25 230 / .8)', | ||
background: 'hsl(255deg 80% 50% / 80%)', | ||
}) | ||
``` | ||
## [1.0.3] - 2021-10-15 | ||
@@ -67,6 +90,7 @@ | ||
[unreleased]: https://github.com/yisibl/resvg-js/compare/v1.0.3...HEAD | ||
[1.0.2]: https://github.com/yisibl/resvg-js/compare/v1.0.2...v1.0.3 | ||
[unreleased]: https://github.com/yisibl/resvg-js/compare/v1.0.4...HEAD | ||
[1.0.4]: https://github.com/yisibl/resvg-js/compare/v1.0.3...v1.0.4 | ||
[1.0.3]: https://github.com/yisibl/resvg-js/compare/v1.0.2...v1.0.3 | ||
[1.0.2]: https://github.com/yisibl/resvg-js/compare/v1.0.1...v1.0.2 | ||
[1.0.1]: https://github.com/yisibl/resvg-js/compare/v1.0.0...v1.0.1 | ||
[1.0.0]: https://github.com/yisibl/resvg-js/releases/tag/v1.0.0 |
@@ -30,7 +30,7 @@ /// <reference types="node" /> | ||
fitTo?: | ||
| { mode: 'original' } | ||
| { mode: 'width'; value: number } | ||
| { mode: 'original' } | ||
| { mode: 'height'; value: number } | ||
| { mode: 'zoom'; value: number } | ||
background?: string | ||
background?: string // Support CSS3 color, e.g. rgba(255, 255, 255, .8) | ||
crop?: { | ||
@@ -37,0 +37,0 @@ left: number |
{ | ||
"name": "@resvg/resvg-js", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A high-performance SVG renderer, powered by Rust based resvg and napi-rs", | ||
@@ -78,6 +78,6 @@ "main": "index.js", | ||
"husky": "^7.0.2", | ||
"jimp": "^0.16.1", | ||
"lint-staged": "^11.2.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.4.1", | ||
"probe-image-size": "^7.2.1", | ||
"typescript": "^4.4.3" | ||
@@ -110,2 +110,3 @@ }, | ||
], | ||
"timeout": "3m", | ||
"environmentVariables": { | ||
@@ -124,14 +125,14 @@ "TS_NODE_PROJECT": "./tsconfig.json" | ||
"optionalDependencies": { | ||
"@resvg/resvg-js-win32-x64-msvc": "1.0.3", | ||
"@resvg/resvg-js-darwin-x64": "1.0.3", | ||
"@resvg/resvg-js-linux-x64-gnu": "1.0.3", | ||
"@resvg/resvg-js-linux-x64-musl": "1.0.3", | ||
"@resvg/resvg-js-linux-arm64-gnu": "1.0.3", | ||
"@resvg/resvg-js-win32-ia32-msvc": "1.0.3", | ||
"@resvg/resvg-js-linux-arm-gnueabihf": "1.0.3", | ||
"@resvg/resvg-js-darwin-arm64": "1.0.3", | ||
"@resvg/resvg-js-android-arm64": "1.0.3", | ||
"@resvg/resvg-js-linux-arm64-musl": "1.0.3", | ||
"@resvg/resvg-js-win32-arm64-msvc": "1.0.3" | ||
"@resvg/resvg-js-win32-x64-msvc": "1.0.4", | ||
"@resvg/resvg-js-darwin-x64": "1.0.4", | ||
"@resvg/resvg-js-linux-x64-gnu": "1.0.4", | ||
"@resvg/resvg-js-linux-x64-musl": "1.0.4", | ||
"@resvg/resvg-js-linux-arm64-gnu": "1.0.4", | ||
"@resvg/resvg-js-win32-ia32-msvc": "1.0.4", | ||
"@resvg/resvg-js-linux-arm-gnueabihf": "1.0.4", | ||
"@resvg/resvg-js-darwin-arm64": "1.0.4", | ||
"@resvg/resvg-js-android-arm64": "1.0.4", | ||
"@resvg/resvg-js-linux-arm64-musl": "1.0.4", | ||
"@resvg/resvg-js-win32-arm64-msvc": "1.0.4" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30390