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 4.2.0 to 4.2.1

58

lib/index.js

@@ -13,4 +13,10 @@ import { compose, castArray } from '@react-pdf/fns';

var flexDefaults = [1, 1, 0];
/**
* @type {(number | 'auto')[]}
*/
var flexAuto = [1, 1, 'auto'];
var expandFlex = function expandFlex(key, value) {
/**
* @type {(number | 'auto')[]}
*/
var defaults = flexDefaults;

@@ -38,2 +44,9 @@ var matches = [];

};
/**
* @param {Object} options
* @param {Function} [options.expandsTo]
* @param {number} [options.maxValues]
* @param {boolean} [options.autoSupported]
*/
var expandBoxModel = function expandBoxModel(_temp) {

@@ -318,5 +331,5 @@ var _ref = _temp === void 0 ? {} : _temp,

*
* @param {String} key style key
* @param {String} value style value
* @returns {String | Number} transformed style values
* @param {string} key style key
* @param {string} value style value
* @returns {string | Number} transformed style values
*/

@@ -331,4 +344,4 @@ var expandStyle = function expandStyle(key, value) {

*
* @param { Object } style object
* @returns { Object } expanded style object
* @param {Object} style object
* @returns {Object} expanded style object
*/

@@ -356,4 +369,5 @@ var expand = function expand(style) {

*
* @param {Array} array
* @returns {Array} array without nils
* @template T
* @param {(T | null | undefined)[]} array
* @returns {T[]} array without nils
*/

@@ -367,3 +381,3 @@ var compact = function compact(array) {

*
* @param {Array} style objects array
* @param {Object[]} styles style objects array
* @returns {Object} merged style object

@@ -386,4 +400,4 @@ */

*
* @param {Array} style objects array
* @returns {Object} flatted style object
* @param {Object[]} styles style objects array
* @returns {Object} flattened style object
*/

@@ -395,3 +409,3 @@ var flatten = compose(mergeStyles, compact, castArray);

*
* @param {String} scalar value
* @param {string} value scalar value
* @returns {Object} parsed value

@@ -402,3 +416,3 @@ */

return match ? {
value: parseFloat(match[1], 10),
value: parseFloat(match[1]),
unit: match[2] || 'pt'

@@ -415,3 +429,3 @@ } : {

* @param {Object} container
* @param {String} styles value
* @param {string} value styles value
* @returns {Object} transformed value

@@ -450,3 +464,3 @@ */

*
* @param {String} styles value
* @param {string} value styles value
* @returns {Object} transformed value

@@ -462,3 +476,3 @@ */

*
* @param {String} styles value
* @param {string} value styles value
* @returns {Object} transformed value

@@ -475,3 +489,3 @@ */

*
* @param {String} styles value
* @param {string} value styles value
* @returns {Object} transformed value

@@ -651,3 +665,3 @@ */

if (typeof value !== 'string') return value;
if (matchNumber(value)) return parseFloat(value, 10);
if (matchNumber(value)) return parseFloat(value);
return value;

@@ -693,6 +707,12 @@ };

/**
* @typedef {Function} Transform
* @param {Object} style styles object
* @returns {Object} transformed styles
*/
/**
* Transform styles values
*
* @param {Object} styles object
* @returns {Object} transformed styles
* @param {Object} container
* @returns {Transform} transform function
*/

@@ -699,0 +719,0 @@ var transform = function transform(container) {

{
"name": "@react-pdf/stylesheet",
"version": "4.2.0",
"version": "4.2.1",
"license": "MIT",

@@ -31,3 +31,3 @@ "description": "A styles engine for Node and the browser",

"@react-pdf/fns": "2.1.0",
"@react-pdf/types": "^2.3.5",
"@react-pdf/types": "^2.3.6",
"color-string": "^1.9.1",

@@ -34,0 +34,0 @@ "hsl-to-hex": "^1.0.0",

Sorry, the diff of this file is not supported yet

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