@react-pdf/stylesheet
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
43568
1434
0
Updated@react-pdf/types@^2.3.6