@csstools/postcss-stepped-value-functions 3.0.2 → 3.0.4
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/CHANGELOG.md +17 -55
- package/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.mjs +1 -1
- package/package.json +13 -30
- package/dist/calc.d.ts +0 -1
- package/dist/checks.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,66 +1,28 @@
|
|
|
1
1
|
# Changes to PostCSS Stepped Value Functions
|
|
2
2
|
|
|
3
|
-
### 3.0.
|
|
4
|
-
|
|
5
|
-
_September 24, 2023_
|
|
6
|
-
|
|
7
|
-
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#221) (patch)
|
|
8
|
-
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#232) (patch)
|
|
9
|
-
- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.4`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#114) (patch)
|
|
10
|
-
|
|
11
|
-
### 3.0.1
|
|
12
|
-
|
|
13
|
-
_July 24, 2023_
|
|
14
|
-
|
|
15
|
-
- Use the latest utilities from `@csstools/css-tokenizer` to reduce the bundle size.
|
|
16
|
-
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#220) (minor)
|
|
17
|
-
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#231) (patch)
|
|
18
|
-
- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#113) (patch)
|
|
19
|
-
|
|
20
|
-
### 3.0.0
|
|
21
|
-
|
|
22
|
-
_July 3, 2023_
|
|
23
|
-
|
|
24
|
-
- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/))
|
|
25
|
-
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#230) (minor)
|
|
26
|
-
- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#112) (patch)
|
|
27
|
-
|
|
28
|
-
### 2.1.1
|
|
3
|
+
### 3.0.4
|
|
29
4
|
|
|
30
|
-
|
|
5
|
+
_December 31, 2023_
|
|
31
6
|
|
|
32
|
-
- Updated `@csstools/css-tokenizer` to `2.
|
|
33
|
-
- Updated `@csstools/css-parser-algorithms` to `2.
|
|
34
|
-
- Updated `@csstools/css-calc` to `1.1.
|
|
7
|
+
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#223) (patch)
|
|
8
|
+
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.5.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#250) (minor)
|
|
9
|
+
- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.6`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#116) (patch)
|
|
35
10
|
|
|
36
|
-
###
|
|
11
|
+
### 3.0.3
|
|
37
12
|
|
|
38
|
-
|
|
13
|
+
_December 15, 2023_
|
|
39
14
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
15
|
+
- Fix type definitions
|
|
16
|
+
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#222) (patch)
|
|
17
|
+
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.4.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#240) (minor)
|
|
18
|
+
- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.5`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#115) (patch)
|
|
43
19
|
|
|
44
|
-
###
|
|
45
|
-
|
|
46
|
-
_January 28, 2023_
|
|
47
|
-
|
|
48
|
-
- Improve `types` declaration in `package.json`
|
|
49
|
-
|
|
50
|
-
### 2.0.0
|
|
51
|
-
|
|
52
|
-
_January 24, 2023_
|
|
53
|
-
|
|
54
|
-
- Updated: Support for Node v14+ (major).
|
|
55
|
-
|
|
56
|
-
### 1.0.1
|
|
57
|
-
|
|
58
|
-
_July 8, 2022_
|
|
59
|
-
|
|
60
|
-
- Fix case insensitive matching.
|
|
20
|
+
### 3.0.2
|
|
61
21
|
|
|
62
|
-
|
|
22
|
+
_September 24, 2023_
|
|
63
23
|
|
|
64
|
-
|
|
24
|
+
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#221) (patch)
|
|
25
|
+
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#232) (patch)
|
|
26
|
+
- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.4`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#114) (patch)
|
|
65
27
|
|
|
66
|
-
-
|
|
28
|
+
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions/CHANGELOG.md)
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PostCSS Stepped Value Functions [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS]
|
|
2
2
|
|
|
3
|
-
[<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/postcss-stepped-value-functions.svg" height="20">][npm-url] [<img alt="
|
|
3
|
+
[<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/postcss-stepped-value-functions.svg" height="20">][npm-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]<br><br>[<img alt="Baseline Status" src="https://cssdb.org/images/badges-baseline/stepped-value-functions.svg" height="20">][css-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/stepped-value-functions.svg" height="20">][css-url]
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install @csstools/postcss-stepped-value-functions --save-dev
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@csstools/css-calc")
|
|
1
|
+
"use strict";var e=require("@csstools/css-calc");const s=/(?<![-\w])(?:mod|rem|round)\(/i,creator=o=>{const t=Object.assign({preserve:!1},o);return{postcssPlugin:"postcss-stepped-value-functions",Declaration(o){if(!s.test(o.value))return;const c=e.calc(o.value,{precision:5,toCanonicalUnits:!0});c!==o.value&&(o.cloneBefore({value:c}),t.preserve||o.remove())}}};creator.postcss=!0,module.exports=creator;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { PluginCreator } from 'postcss';
|
|
2
|
+
|
|
3
|
+
declare const creator: PluginCreator<pluginOptions>;
|
|
4
|
+
export default creator;
|
|
5
|
+
|
|
2
6
|
/** postcss-stepped-value-functions plugin options */
|
|
3
|
-
export type pluginOptions = {
|
|
7
|
+
export declare type pluginOptions = {
|
|
4
8
|
/** Preserve the original notation. default: false */
|
|
5
9
|
preserve?: boolean;
|
|
6
10
|
};
|
|
7
|
-
|
|
8
|
-
export
|
|
11
|
+
|
|
12
|
+
export { }
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{calc as e}from"@csstools/css-calc";const s=/(?<![-\w])(?:mod|rem|round)\(/i,creator=o=>{const t=Object.assign({preserve:!1},o);return{postcssPlugin:"postcss-stepped-value-functions",Declaration(o){if(!s.test(o.value))return;const r=e(o.value,{precision:5,toCanonicalUnits:!0});r!==o.value&&(o.cloneBefore({value:r}),t.preserve||o.remove())}}};creator.postcss=!0;export{creator as default};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csstools/postcss-stepped-value-functions",
|
|
3
3
|
"description": "Use round, rem and mod functions in CSS",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.4",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Antonio Laguna",
|
|
@@ -27,15 +27,18 @@
|
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": "^14 || ^16 || >=18"
|
|
29
29
|
},
|
|
30
|
+
"type": "module",
|
|
30
31
|
"main": "dist/index.cjs",
|
|
31
32
|
"module": "dist/index.mjs",
|
|
32
|
-
"types": "dist/index.d.ts",
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
"import": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"default": "./dist/index.mjs"
|
|
38
|
+
},
|
|
39
|
+
"require": {
|
|
40
|
+
"default": "./dist/index.cjs"
|
|
41
|
+
}
|
|
39
42
|
}
|
|
40
43
|
},
|
|
41
44
|
"files": [
|
|
@@ -45,24 +48,13 @@
|
|
|
45
48
|
"dist"
|
|
46
49
|
],
|
|
47
50
|
"dependencies": {
|
|
48
|
-
"@csstools/css-calc": "^1.1.
|
|
49
|
-
"@csstools/css-parser-algorithms": "^2.
|
|
50
|
-
"@csstools/css-tokenizer": "^2.2.
|
|
51
|
+
"@csstools/css-calc": "^1.1.6",
|
|
52
|
+
"@csstools/css-parser-algorithms": "^2.5.0",
|
|
53
|
+
"@csstools/css-tokenizer": "^2.2.3"
|
|
51
54
|
},
|
|
52
55
|
"peerDependencies": {
|
|
53
56
|
"postcss": "^8.4"
|
|
54
57
|
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@csstools/postcss-tape": "*"
|
|
57
|
-
},
|
|
58
|
-
"scripts": {
|
|
59
|
-
"build": "rollup -c ../../rollup/default.mjs",
|
|
60
|
-
"docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs",
|
|
61
|
-
"lint": "node ../../.github/bin/format-package-json.mjs",
|
|
62
|
-
"prepublishOnly": "npm run build && npm run test",
|
|
63
|
-
"test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs",
|
|
64
|
-
"test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
|
|
65
|
-
},
|
|
66
58
|
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions#readme",
|
|
67
59
|
"repository": {
|
|
68
60
|
"type": "git",
|
|
@@ -77,14 +69,5 @@
|
|
|
77
69
|
"remainder",
|
|
78
70
|
"round",
|
|
79
71
|
"stepped"
|
|
80
|
-
]
|
|
81
|
-
"csstools": {
|
|
82
|
-
"cssdbId": "stepped-value-functions",
|
|
83
|
-
"exportName": "postcssSteppedValueFunctions",
|
|
84
|
-
"humanReadableName": "PostCSS Stepped Value Functions",
|
|
85
|
-
"specUrl": "https://www.w3.org/TR/css-values-4/#round-func"
|
|
86
|
-
},
|
|
87
|
-
"volta": {
|
|
88
|
-
"extends": "../../package.json"
|
|
89
|
-
}
|
|
72
|
+
]
|
|
90
73
|
}
|
package/dist/calc.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function calc(css: string): string;
|
package/dist/checks.d.ts
DELETED