diff options
Diffstat (limited to 'node_modules/@csstools/postcss-trigonometric-functions')
7 files changed, 32 insertions, 90 deletions
diff --git a/node_modules/@csstools/postcss-trigonometric-functions/CHANGELOG.md b/node_modules/@csstools/postcss-trigonometric-functions/CHANGELOG.md index 9ec73779..b337b22f 100644 --- a/node_modules/@csstools/postcss-trigonometric-functions/CHANGELOG.md +++ b/node_modules/@csstools/postcss-trigonometric-functions/CHANGELOG.md @@ -1,5 +1,14 @@ # Changes to PostCSS Trigonometric Functions +### 3.0.3 + +_December 15, 2023_ + +- Fix type definitions +- 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) +- 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) +- 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) + ### 3.0.2 _September 24, 2023_ @@ -17,55 +26,4 @@ _July 24, 2023_ - 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) - 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) -### 3.0.0 - -_July 3, 2023_ - -- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/)) -- 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) -- 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) - -### 2.1.1 - -_April 10, 2023_ - -- Updated `@csstools/css-tokenizer` to `2.1.1` (patch) -- Updated `@csstools/css-parser-algorithms` to `2.1.1` (patch) -- Updated `@csstools/css-calc` to `1.1.1` (patch) - -### 2.1.0 - -_March 21, 2023_ - -- Added: `@csstools/css-calc` -- Added: unit conversions (`sin(30deg + (.125turn / 3))`) - -### 2.0.1 - -_January 28, 2023_ - -- Improve `types` declaration in `package.json` - -### 2.0.0 - -_January 24, 2023_ - -- Updated: Support for Node v14+ (major). - -### 1.0.2 - -_July 8, 2022_ - -- Fix case insensitive matching. - -### 1.0.1 - -_May 31, 2022_ - -- Ensure that the plugin works in node 14 - -### 1.0.0 - -_May 20, 2022_ - -- Initial version +[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-trigonometric-functions/CHANGELOG.md) diff --git a/node_modules/@csstools/postcss-trigonometric-functions/dist/calc.d.ts b/node_modules/@csstools/postcss-trigonometric-functions/dist/calc.d.ts deleted file mode 100644 index 5a1ee11e..00000000 --- a/node_modules/@csstools/postcss-trigonometric-functions/dist/calc.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function calc(css: string): string; diff --git a/node_modules/@csstools/postcss-trigonometric-functions/dist/checks.d.ts b/node_modules/@csstools/postcss-trigonometric-functions/dist/checks.d.ts deleted file mode 100644 index 6623beb7..00000000 --- a/node_modules/@csstools/postcss-trigonometric-functions/dist/checks.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const FUNCTION_NAME_REGEXP: RegExp; -export declare const FUNCTION_CALL_REGEXP: RegExp; diff --git a/node_modules/@csstools/postcss-trigonometric-functions/dist/index.cjs b/node_modules/@csstools/postcss-trigonometric-functions/dist/index.cjs index 6fe36838..1ba42783 100644 --- a/node_modules/@csstools/postcss-trigonometric-functions/dist/index.cjs +++ b/node_modules/@csstools/postcss-trigonometric-functions/dist/index.cjs @@ -1 +1 @@ -"use strict";var s=require("@csstools/css-calc"),e=require("@csstools/css-parser-algorithms"),o=require("@csstools/css-tokenizer");const t=["asin","acos","atan","atan2","sin","cos","tan"],n=new RegExp(`^(${t.join("|")})$`,"i"),c=new RegExp(`(${t.join("|")})\\(`,"i");function calc(t){const c=o.tokenize({css:t});return c.some((s=>s[0]===o.TokenType.Function&&n.test(s[4].value)))?e.stringify(s.calcFromComponentValues(e.parseCommaSeparatedListOfComponentValues(c),{precision:5,toCanonicalUnits:!0})):t}const creator=s=>{const e=Object.assign({preserve:!1},s);return{postcssPlugin:"postcss-trigonometric-functions",Declaration(s){if(!c.test(s.value))return;const o=calc(s.value);o!==s.value&&(s.cloneBefore({value:o}),e.preserve||s.remove())}}};creator.postcss=!0,module.exports=creator; +"use strict";var s=require("@csstools/css-calc");const e=/(?<![-\w])(?:asin|acos|atan|atan2|sin|cos|tan)\(/i,creator=t=>{const c=Object.assign({preserve:!1},t);return{postcssPlugin:"postcss-trigonometric-functions",Declaration(t){if(!e.test(t.value))return;const o=s.calc(t.value,{precision:5,toCanonicalUnits:!0});o!==t.value&&(t.cloneBefore({value:o}),c.preserve||t.remove())}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/@csstools/postcss-trigonometric-functions/dist/index.d.ts b/node_modules/@csstools/postcss-trigonometric-functions/dist/index.d.ts index 40ac49ea..21e16153 100644 --- a/node_modules/@csstools/postcss-trigonometric-functions/dist/index.d.ts +++ b/node_modules/@csstools/postcss-trigonometric-functions/dist/index.d.ts @@ -1,8 +1,12 @@ import type { PluginCreator } from 'postcss'; + +declare const creator: PluginCreator<pluginOptions>; +export default creator; + /** postcss-trigonometric-functions plugin options */ -export type pluginOptions = { +export declare type pluginOptions = { /** Preserve the original notation. default: false */ preserve?: boolean; }; -declare const creator: PluginCreator<pluginOptions>; -export default creator; + +export { } diff --git a/node_modules/@csstools/postcss-trigonometric-functions/dist/index.mjs b/node_modules/@csstools/postcss-trigonometric-functions/dist/index.mjs index 8fed33de..686ebd56 100644 --- a/node_modules/@csstools/postcss-trigonometric-functions/dist/index.mjs +++ b/node_modules/@csstools/postcss-trigonometric-functions/dist/index.mjs @@ -1 +1 @@ -import{calcFromComponentValues as s}from"@csstools/css-calc";import{stringify as o,parseCommaSeparatedListOfComponentValues as t}from"@csstools/css-parser-algorithms";import{tokenize as e,TokenType as n}from"@csstools/css-tokenizer";const c=["asin","acos","atan","atan2","sin","cos","tan"],r=new RegExp(`^(${c.join("|")})$`,"i"),a=new RegExp(`(${c.join("|")})\\(`,"i");function calc(c){const a=e({css:c});return a.some((s=>s[0]===n.Function&&r.test(s[4].value)))?o(s(t(a),{precision:5,toCanonicalUnits:!0})):c}const creator=s=>{const o=Object.assign({preserve:!1},s);return{postcssPlugin:"postcss-trigonometric-functions",Declaration(s){if(!a.test(s.value))return;const t=calc(s.value);t!==s.value&&(s.cloneBefore({value:t}),o.preserve||s.remove())}}};creator.postcss=!0;export{creator as default}; +import{calc as s}from"@csstools/css-calc";const e=/(?<![-\w])(?:asin|acos|atan|atan2|sin|cos|tan)\(/i,creator=t=>{const o=Object.assign({preserve:!1},t);return{postcssPlugin:"postcss-trigonometric-functions",Declaration(t){if(!e.test(t.value))return;const n=s(t.value,{precision:5,toCanonicalUnits:!0});n!==t.value&&(t.cloneBefore({value:n}),o.preserve||t.remove())}}};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/@csstools/postcss-trigonometric-functions/package.json b/node_modules/@csstools/postcss-trigonometric-functions/package.json index 95a0b08f..24a059dd 100644 --- a/node_modules/@csstools/postcss-trigonometric-functions/package.json +++ b/node_modules/@csstools/postcss-trigonometric-functions/package.json @@ -1,7 +1,7 @@ { "name": "@csstools/postcss-trigonometric-functions", "description": "Use sin(), cos(), tan(), acos(), atan(), and atan2() to compute trigonometric relationships", - "version": "3.0.2", + "version": "3.0.3", "contributors": [ { "name": "Antonio Laguna", @@ -27,15 +27,18 @@ "engines": { "node": "^14 || ^16 || >=18" }, + "type": "module", "main": "dist/index.cjs", "module": "dist/index.mjs", - "types": "dist/index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.cjs", - "default": "./dist/index.mjs" + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.mjs" + }, + "require": { + "default": "./dist/index.cjs" + } } }, "files": [ @@ -45,24 +48,13 @@ "dist" ], "dependencies": { - "@csstools/css-calc": "^1.1.4", - "@csstools/css-parser-algorithms": "^2.3.2", - "@csstools/css-tokenizer": "^2.2.1" + "@csstools/css-calc": "^1.1.5", + "@csstools/css-parser-algorithms": "^2.4.0", + "@csstools/css-tokenizer": "^2.2.2" }, "peerDependencies": { "postcss": "^8.4" }, - "devDependencies": { - "@csstools/postcss-tape": "*" - }, - "scripts": { - "build": "rollup -c ../../rollup/default.mjs", - "docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs", - "lint": "node ../../.github/bin/format-package-json.mjs", - "prepublishOnly": "npm run build && npm run test", - "test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs", - "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs" - }, "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-trigonometric-functions#readme", "repository": { "type": "git", @@ -81,14 +73,5 @@ "sin", "tan", "trigonometric" - ], - "csstools": { - "cssdbId": "trigonometric-functions", - "exportName": "postcssTrigonometricFunctions", - "humanReadableName": "PostCSS Trigonometric Functions", - "specUrl": "https://www.w3.org/TR/css-values-4/#trig-funcs" - }, - "volta": { - "extends": "../../package.json" - } + ] } |
