postcss-convert-values 9.0.9 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,8 +34,8 @@ h1 {
34
34
  }
35
35
  ```
36
36
 
37
- Note that this plugin only covers conversions for duration and absolute length
38
- values. For color conversions, use [postcss-colormin][colormin].
37
+ Note that this plugin only covers conversions for duration, frequency, angle
38
+ and absolute length values. For color conversions, use [postcss-colormin][colormin].
39
39
 
40
40
  ## API
41
41
 
@@ -48,8 +48,9 @@ values. For color conversions, use [postcss-colormin][colormin].
48
48
  Type: `boolean`
49
49
  Default: `true`
50
50
 
51
- Pass `false` to disable conversion from `px` to other absolute length units,
52
- such as `pc` & `pt` & vice versa.
51
+ Pass `false` to disable conversion among `px`, `pt`, `pc` & `in`.
52
+ `cm` & `mm` always convert, and `q` is converted from but never to,
53
+ because it has lower browser support than `cm` and `mm`.
53
54
 
54
55
  ##### time
55
56
 
@@ -65,18 +66,35 @@ Default: `true`
65
66
 
66
67
  Pass `false` to disable conversion from `deg` to `turn` & vice versa.
67
68
 
69
+ ##### frequency
70
+
71
+ Type: `boolean`
72
+ Default: `true`
73
+
74
+ Pass `false` to disable conversion from `Hz` to `kHz` & vice versa.
75
+
68
76
  ##### precision
69
77
 
70
- Type: `boolean|number`
78
+ Type: `false|number`
71
79
  Default: `false`
72
80
 
73
- Specify any numeric value here to round `px` values to that many decimal places;
81
+ Specify any numeric value here to round dimensions (such as `px`, `em` or `s`
82
+ values) to that many decimal places;
74
83
  for example, using `{precision: 2}` will round `6.66667px` to `6.67px`, and
75
84
  `{precision: 0}` will round it to `7px`. Passing `false` (the default) will
76
85
  leave these values as is.
77
86
 
78
87
  It is recommended for most use cases to set this option to `2`.
79
88
 
89
+ ##### transformCustomProperties
90
+
91
+ Type: `boolean`
92
+ Default: `false`
93
+
94
+ Pass `true` to also convert values in custom properties (`--*`). They are left
95
+ as written by default, because their value is only interpreted where it is
96
+ substituted.
97
+
80
98
 
81
99
  ## Usage
82
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-convert-values",
3
- "version": "9.0.9",
3
+ "version": "9.1.0",
4
4
  "description": "Convert values with PostCSS (e.g. ms -> s)",
5
5
  "exports": {
6
6
  ".": {
@@ -1,33 +1,95 @@
1
- const lengthConv = new Map([
2
- ['in', 288],
3
- ['px', 3],
4
- ['pt', 4],
5
- ['pc', 48],
6
- ]);
7
-
8
- const metricConv = new Map([
9
- ['cm', 40],
10
- ['mm', 4],
11
- ['q', 1],
12
- ]);
13
-
14
- export const timeConv = new Map([
15
- ['s', 1000],
16
- ['ms', 1],
17
- ]);
1
+ /**
2
+ * @typedef {'length' | 'time' | 'angle' | 'frequency'} ConvertOption
3
+ * @typedef {{time?: boolean, length?: boolean, angle?: boolean, frequency?: boolean}} ConvertOptions
4
+ * @typedef {{
5
+ * option?: ConvertOption,
6
+ * factors: Map<string, number>,
7
+ * sourceOnly?: Set<string>,
8
+ * zeroOnly?: Map<string, string>,
9
+ * requiresZeroUnit?: boolean
10
+ * }} UnitGroup
11
+ */
18
12
 
19
- export const angleConv = new Map([
20
- ['deg', 10],
21
- ['turn', 3600],
22
- ['grad', 9],
23
- ]);
13
+ /**
14
+ * Each group converts only among its own units. `option` is the ConvertOptions
15
+ * key that disables the group; a group without one always converts. Metric
16
+ * units relate by exact decimal factors, so `length: false` leaves them
17
+ * converting. `q` is newer than the CSS 1 lengths and is never a target.
18
+ * `requiresZeroUnit` marks types where a unitless 0 is invalid.
19
+ *
20
+ * @type {UnitGroup[]}
21
+ */
22
+ const unitGroups = [
23
+ {
24
+ option: 'length',
25
+ factors: new Map([
26
+ ['in', 288],
27
+ ['px', 3],
28
+ ['pt', 4],
29
+ ['pc', 48],
30
+ ]),
31
+ },
32
+ {
33
+ factors: new Map([
34
+ ['cm', 40],
35
+ ['mm', 4],
36
+ ['q', 1],
37
+ ]),
38
+ sourceOnly: new Set(['q']),
39
+ },
40
+ {
41
+ option: 'time',
42
+ factors: new Map([
43
+ ['s', 1000],
44
+ ['ms', 1],
45
+ ]),
46
+ requiresZeroUnit: true,
47
+ },
48
+ {
49
+ option: 'angle',
50
+ factors: new Map([
51
+ ['deg', 10],
52
+ ['turn', 3600],
53
+ ['grad', 9],
54
+ ]),
55
+ // `rad` converts only at zero, since no exact decimal factor exists.
56
+ zeroOnly: new Map([['rad', '0deg']]),
57
+ requiresZeroUnit: true,
58
+ },
59
+ {
60
+ option: 'frequency',
61
+ factors: new Map([
62
+ ['khz', 1000],
63
+ ['hz', 1],
64
+ ]),
65
+ requiresZeroUnit: true,
66
+ },
67
+ ];
24
68
 
25
- export const freqConv = new Map([
26
- ['khz', 1000],
27
- ['hz', 1],
28
- ]);
69
+ // A unit in two groups would have two conversion tables, so building the map throws instead.
70
+ /** @type {Map<string, UnitGroup>} */
71
+ const unitGroupByUnit = new Map();
72
+ for (const group of unitGroups) {
73
+ for (const unit of [
74
+ ...group.factors.keys(),
75
+ ...(group.zeroOnly?.keys() ?? []),
76
+ ]) {
77
+ if (unitGroupByUnit.has(unit)) {
78
+ throw new Error(
79
+ `Unit "${unit}" belongs to more than one conversion group`
80
+ );
81
+ }
82
+ unitGroupByUnit.set(unit, group);
83
+ }
84
+ }
29
85
 
30
- /** @typedef {{time?: boolean, length?: boolean, angle?: boolean, frequency?: boolean}} ConvertOptions */
86
+ /**
87
+ * @param {string} lowerCaseUnit
88
+ * @return {boolean}
89
+ */
90
+ export function requiresZeroUnit(lowerCaseUnit) {
91
+ return unitGroupByUnit.get(lowerCaseUnit)?.requiresZeroUnit === true;
92
+ }
31
93
 
32
94
  /**
33
95
  * Accurately round a number to a fixed decimal precision without IEEE-754 binary
@@ -145,25 +207,19 @@ export function formatNumber(number, allowExponent = true) {
145
207
  /**
146
208
  * @param {number} number
147
209
  * @param {string} originalUnit
148
- * @param {typeof lengthConv | typeof timeConv | typeof angleConv | typeof freqConv | typeof metricConv} conversions
149
- * @param {boolean} [allowExponent=true]
210
+ * @param {UnitGroup} group
150
211
  * @return {string}
151
212
  */
152
- function findShortestConversion(
153
- number,
154
- originalUnit,
155
- conversions,
156
- allowExponent = true
157
- ) {
158
- const base = number * /** @type {number} */ (conversions.get(originalUnit));
213
+ function findShortestConversion(number, originalUnit, group) {
214
+ const base = number * /** @type {number} */ (group.factors.get(originalUnit));
159
215
 
160
216
  let shortest = '';
161
- for (const [u, factor] of conversions) {
162
- if (u === originalUnit) {
217
+ for (const [u, factor] of group.factors) {
218
+ if (u === originalUnit || group.sourceOnly?.has(u)) {
163
219
  continue;
164
220
  }
165
221
  const convertedNumber = Number((base / factor).toPrecision(15));
166
- const value = formatNumber(convertedNumber, allowExponent) + u;
222
+ const value = formatNumber(convertedNumber) + u;
167
223
 
168
224
  if (!shortest || value.length < shortest.length) {
169
225
  shortest = value;
@@ -174,92 +230,22 @@ function findShortestConversion(
174
230
  }
175
231
 
176
232
  /**
177
- * @param {number} number
178
- * @param {string} unit
179
- * @return {string | undefined}
180
- */
181
- function convertAngle(number, unit) {
182
- if (unit === 'rad') {
183
- return number === 0 ? '0deg' : undefined;
184
- }
185
- if (angleConv.has(unit)) {
186
- return findShortestConversion(number, unit, angleConv);
187
- }
188
- return undefined;
189
- }
190
-
191
- /**
192
- * @param {string} unit
193
- * @param {ConvertOptions} options
194
- * @return {boolean}
195
- */
196
- function isConversionDisabled(unit, options) {
197
- const { time, length, angle, frequency } = options;
198
- if (length === false && (lengthConv.has(unit) || metricConv.has(unit))) {
199
- return true;
200
- }
201
- if (time === false && timeConv.has(unit)) {
202
- return true;
203
- }
204
- if (angle === false && (angleConv.has(unit) || unit === 'rad')) {
205
- return true;
206
- }
207
- if (frequency === false && freqConv.has(unit)) {
208
- return true;
209
- }
210
- return false;
211
- }
212
-
213
- /**
233
+ * Called only for units whose conversion is enabled by the options.
234
+ *
214
235
  * @param {number} number
215
236
  * @param {string} lowerCaseUnit
216
- * @param {ConvertOptions} options
217
- * @param {boolean} allowExponent
237
+ * @param {UnitGroup | undefined} group
218
238
  * @return {string | undefined}
219
239
  */
220
- function findConverted(number, lowerCaseUnit, options, allowExponent) {
221
- const { time, length, angle, frequency } = options;
222
- if (length !== false) {
223
- if (lengthConv.has(lowerCaseUnit)) {
224
- return findShortestConversion(
225
- number,
226
- lowerCaseUnit,
227
- lengthConv,
228
- allowExponent
229
- );
230
- }
231
- if (metricConv.has(lowerCaseUnit)) {
232
- return findShortestConversion(
233
- number,
234
- lowerCaseUnit,
235
- metricConv,
236
- allowExponent
237
- );
238
- }
239
- }
240
- if (time !== false && timeConv.has(lowerCaseUnit)) {
241
- return findShortestConversion(
242
- number,
243
- lowerCaseUnit,
244
- timeConv,
245
- allowExponent
246
- );
247
- }
248
- if (angle !== false) {
249
- const convertedAngle = convertAngle(number, lowerCaseUnit);
250
- if (convertedAngle) {
251
- return convertedAngle;
252
- }
240
+ function findConverted(number, lowerCaseUnit, group) {
241
+ if (!group) {
242
+ return undefined;
253
243
  }
254
- if (frequency !== false && freqConv.has(lowerCaseUnit)) {
255
- return findShortestConversion(
256
- number,
257
- lowerCaseUnit,
258
- freqConv,
259
- allowExponent
260
- );
244
+ const zeroText = group.zeroOnly?.get(lowerCaseUnit);
245
+ if (zeroText !== undefined) {
246
+ return number === 0 ? zeroText : undefined;
261
247
  }
262
- return undefined;
248
+ return findShortestConversion(number, lowerCaseUnit, group);
263
249
  }
264
250
 
265
251
  /**
@@ -288,31 +274,19 @@ function shouldUseConverted(converted, value, decimalValue, lowerCaseUnit) {
288
274
  * @param {number} number
289
275
  * @param {string} unit
290
276
  * @param {ConvertOptions} [options]
291
- * @param {boolean} [allowExponent=true] false where only an `<integer>` is valid
292
277
  * @return {string}
293
278
  */
294
- const convert = function (number, unit, options = {}, allowExponent = true) {
279
+ const convert = function (number, unit, options = {}) {
295
280
  const lowerCaseUnit = unit.toLowerCase();
296
- if (isConversionDisabled(lowerCaseUnit, options)) {
297
- // Disabling unit conversion must not disable number formatting of
298
- // <length> dimensions such as 1e-6px.
299
- const isLength =
300
- lengthConv.has(lowerCaseUnit) || metricConv.has(lowerCaseUnit);
301
- return (
302
- (isLength
303
- ? formatNumber(number, allowExponent)
304
- : dropLeadingZero(number)) + (unit ? unit : '')
305
- );
281
+ const group = unitGroupByUnit.get(lowerCaseUnit);
282
+ if (group?.option !== undefined && options[group.option] === false) {
283
+ // Disabling conversion must not disable exponent formatting, so 1e-6s stays short.
284
+ return formatNumber(number) + (unit ? unit : '');
306
285
  }
307
286
 
308
- const converted = findConverted(
309
- number,
310
- lowerCaseUnit,
311
- options,
312
- allowExponent
313
- );
287
+ const converted = findConverted(number, lowerCaseUnit, group);
314
288
  const decimalValue = dropLeadingZero(number) + (unit ? unit : '');
315
- const value = formatNumber(number, allowExponent) + (unit ? unit : '');
289
+ const value = formatNumber(number) + (unit ? unit : '');
316
290
 
317
291
  if (
318
292
  converted &&
@@ -1,10 +1,8 @@
1
1
  import cssnanoUtils from 'cssnano-utils';
2
2
  import convert, {
3
3
  formatNumber,
4
+ requiresZeroUnit,
4
5
  roundToPrecision,
5
- timeConv,
6
- angleConv,
7
- freqConv,
8
6
  } from './convert.js';
9
7
  import { numericSource } from './numericSource.js';
10
8
 
@@ -48,13 +46,6 @@ const functionsPreservingZeroUnits = new Set([
48
46
  'palette-mix',
49
47
  ]);
50
48
 
51
- const convertibleUnits = new Set([
52
- ...timeConv.keys(),
53
- ...angleConv.keys(),
54
- ...freqConv.keys(),
55
- 'rad',
56
- ]);
57
-
58
49
  /** @typedef {Parameters<typeof convert>[2]} ConvertOptions */
59
50
  /** @typedef {{precision?: false | number, transformCustomProperties?: boolean} & ConvertOptions & { overrideBrowserslist?: string | string[] } & import('browserslist').Options} Options */
60
51
  /** @typedef {{keepZeroPercent: boolean, keepZeroLength: boolean, clampAlpha: boolean, isAlpha: boolean, isFont: boolean}} ReplacementFlags */
@@ -74,7 +65,7 @@ function formatZero(
74
65
  keepZeroPercent,
75
66
  keepZeroLength
76
67
  ) {
77
- if (convertibleUnits.has(lowerCasedUnit)) {
68
+ if (requiresZeroUnit(lowerCasedUnit)) {
78
69
  return convert(0, unit, opts);
79
70
  }
80
71
  if (unit === '%') {
@@ -102,7 +93,7 @@ function parseNumber(
102
93
  unit !== '' &&
103
94
  unit !== '%' &&
104
95
  !lengthUnits.has(lowerCasedUnit) &&
105
- !convertibleUnits.has(lowerCasedUnit)
96
+ !requiresZeroUnit(lowerCasedUnit)
106
97
  )
107
98
  return raw;
108
99
  let num = number;
@@ -125,9 +116,12 @@ function parseNumber(
125
116
  // An exponent is never a valid <integer>, so a bare number written as an
126
117
  // integer may sit where only <integer> is allowed. Dimensions and numbers
127
118
  // already written as non-integers cannot.
128
- const writtenAsInteger =
129
- unit === '' && !raw.includes('.') && !raw.toLowerCase().includes('e');
130
- return convert(num, unit, opts, !writtenAsInteger);
119
+ if (unit === '') {
120
+ const writtenAsInteger =
121
+ !raw.includes('.') && !raw.toLowerCase().includes('e');
122
+ return formatNumber(num, !writtenAsInteger);
123
+ }
124
+ return convert(num, unit, opts);
131
125
  }
132
126
 
133
127
  /** @param {string} value @param {number} number @param {string} unit @param {Options} opts @param {boolean} [clamp] @return {string} */
@@ -289,7 +283,7 @@ function processNumericToken(source, isLineHeight, frames, opts, flags) {
289
283
  )
290
284
  : converted;
291
285
  const isConvertibleZero =
292
- source.number === 0 && convertibleUnits.has(source.unit.toLowerCase());
286
+ source.number === 0 && requiresZeroUnit(source.unit.toLowerCase());
293
287
 
294
288
  if (shouldReplace(replacement, source.raw, isAlpha, isConvertibleZero)) {
295
289
  return {
@@ -1,13 +1,33 @@
1
- export declare const timeConv: Map<string, number>;
2
- export declare const angleConv: Map<string, number>;
3
- export declare const freqConv: Map<string, number>;
1
+ /**
2
+ * @typedef {'length' | 'time' | 'angle' | 'frequency'} ConvertOption
3
+ * @typedef {{time?: boolean, length?: boolean, angle?: boolean, frequency?: boolean}} ConvertOptions
4
+ * @typedef {{
5
+ * option?: ConvertOption,
6
+ * factors: Map<string, number>,
7
+ * sourceOnly?: Set<string>,
8
+ * zeroOnly?: Map<string, string>,
9
+ * requiresZeroUnit?: boolean
10
+ * }} UnitGroup
11
+ */
12
+ export type ConvertOption = 'length' | 'time' | 'angle' | 'frequency';
4
13
  export type ConvertOptions = {
5
14
  time?: boolean;
6
15
  length?: boolean;
7
16
  angle?: boolean;
8
17
  frequency?: boolean;
9
18
  };
10
- /** @typedef {{time?: boolean, length?: boolean, angle?: boolean, frequency?: boolean}} ConvertOptions */
19
+ export type UnitGroup = {
20
+ option?: ConvertOption;
21
+ factors: Map<string, number>;
22
+ sourceOnly?: Set<string>;
23
+ zeroOnly?: Map<string, string>;
24
+ requiresZeroUnit?: boolean;
25
+ };
26
+ /**
27
+ * @param {string} lowerCaseUnit
28
+ * @return {boolean}
29
+ */
30
+ export declare function requiresZeroUnit(lowerCaseUnit: string): boolean;
11
31
  /**
12
32
  * Accurately round a number to a fixed decimal precision without IEEE-754 binary
13
33
  * floating point multiplication errors.
@@ -41,9 +61,8 @@ export declare function formatNumber(number: number, allowExponent?: boolean): s
41
61
  * @param {number} number
42
62
  * @param {string} unit
43
63
  * @param {ConvertOptions} [options]
44
- * @param {boolean} [allowExponent=true] false where only an `<integer>` is valid
45
64
  * @return {string}
46
65
  */
47
- declare const convert: (number: number, unit: string, options?: ConvertOptions, allowExponent?: boolean) => string;
66
+ declare const convert: (number: number, unit: string, options?: ConvertOptions) => string;
48
67
  export default convert;
49
68
  //# sourceMappingURL=convert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/lib/convert.js"],"names":[],"mappings":"AAaA,eAAO,MAAM,QAAQ,qBAGnB,CAAC;AAEH,eAAO,MAAM,SAAS,qBAIpB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAGnB,CAAC;AAEC,YAAoF,cAAc,GAAxF;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAA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