Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-pdf/stylesheet

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf/stylesheet - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

6

CHANGELOG.md
# @react-pdf/stylesheet
## 3.2.0
### Minor Changes
- [#1892](https://github.com/diegomura/react-pdf/pull/1892) [`035d3f8`](https://github.com/diegomura/react-pdf/commit/035d3f8d24fa4f4af9f350950d81b51547858367) Thanks [@diegomura](https://github.com/diegomura)! - feat: add skew transformation support
## 3.1.0

@@ -4,0 +10,0 @@

44

lib/transform/transform.js

@@ -37,2 +37,13 @@ "use strict";

var parseAngle = function parseAngle(value) {
var unitsRegexp = /(-?\d*\.?\d*)(\w*)?/i;
var _unitsRegexp$exec = unitsRegexp.exec(value),
angle = _unitsRegexp$exec[1],
unit = _unitsRegexp$exec[2];
var number = Number.parseFloat(angle);
return unit === 'rad' ? number * 180 / Math.PI : number;
};
var normalizeTransformOperation = function normalizeTransformOperation(_ref) {

@@ -76,12 +87,5 @@ var operation = _ref.operation,

{
var unitsRegexp = /(-?\d*\.?\d*)(\w*)?/i;
var _unitsRegexp$exec = unitsRegexp.exec(value),
angle = _unitsRegexp$exec[1],
unit = _unitsRegexp$exec[2];
var number = Number.parseFloat(angle);
return {
operation: 'rotate',
value: [unit === 'rad' ? number * 180 / Math.PI : number]
value: [parseAngle(value)]
};

@@ -116,2 +120,26 @@ }

case 'skew':
{
return {
operation: 'skew',
value: value.map(parseAngle)
};
}
case 'skewX':
{
return {
operation: 'skew',
value: [parseAngle(value), 0]
};
}
case 'skewY':
{
return {
operation: 'skew',
value: [0, parseAngle(value)]
};
}
default:

@@ -118,0 +146,0 @@ {

2

package.json
{
"name": "@react-pdf/stylesheet",
"version": "3.1.0",
"version": "3.2.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A styles engine for Node and the browser",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc