summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-stepped-value-functions/dist
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
commitf06956efd2dc4bf77244a9fcce2b883a00b925af (patch)
tree0123cb73ce67f1f4b17e1d6cbabff076ee44e31b /node_modules/@csstools/postcss-stepped-value-functions/dist
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/@csstools/postcss-stepped-value-functions/dist')
-rw-r--r--node_modules/@csstools/postcss-stepped-value-functions/dist/calc.d.ts1
-rw-r--r--node_modules/@csstools/postcss-stepped-value-functions/dist/checks.d.ts2
-rw-r--r--node_modules/@csstools/postcss-stepped-value-functions/dist/index.cjs2
-rw-r--r--node_modules/@csstools/postcss-stepped-value-functions/dist/index.d.ts10
-rw-r--r--node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs2
5 files changed, 9 insertions, 8 deletions
diff --git a/node_modules/@csstools/postcss-stepped-value-functions/dist/calc.d.ts b/node_modules/@csstools/postcss-stepped-value-functions/dist/calc.d.ts
deleted file mode 100644
index 5a1ee11e..00000000
--- a/node_modules/@csstools/postcss-stepped-value-functions/dist/calc.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare function calc(css: string): string;
diff --git a/node_modules/@csstools/postcss-stepped-value-functions/dist/checks.d.ts b/node_modules/@csstools/postcss-stepped-value-functions/dist/checks.d.ts
deleted file mode 100644
index 6623beb7..00000000
--- a/node_modules/@csstools/postcss-stepped-value-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-stepped-value-functions/dist/index.cjs b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.cjs
index 0ccad206..396dbe2c 100644
--- a/node_modules/@csstools/postcss-stepped-value-functions/dist/index.cjs
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e=require("@csstools/css-calc"),s=require("@csstools/css-parser-algorithms"),o=require("@csstools/css-tokenizer");const n=["mod","rem","round"],t=new RegExp(`^(${n.join("|")})$`,"i"),r=new RegExp(`(${n.join("|")})\\(`,"i");function calc(n){const r=o.tokenize({css:n});return r.some((e=>e[0]===o.TokenType.Function&&t.test(e[4].value)))?s.stringify(e.calcFromComponentValues(s.parseCommaSeparatedListOfComponentValues(r),{precision:5,toCanonicalUnits:!0})):n}const creator=e=>{const s=Object.assign({preserve:!1,onInvalid:""},e);return{postcssPlugin:"postcss-stepped-value-functions",Declaration(e){if(!r.test(e.value))return;const o=calc(e.value);o!==e.value&&(e.cloneBefore({value:o}),s.preserve||e.remove())}}};creator.postcss=!0,module.exports=creator;
+"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;
diff --git a/node_modules/@csstools/postcss-stepped-value-functions/dist/index.d.ts b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.d.ts
index c7772f76..f5f73bbf 100644
--- a/node_modules/@csstools/postcss-stepped-value-functions/dist/index.d.ts
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.d.ts
@@ -1,8 +1,12 @@
import type { PluginCreator } from 'postcss';
+
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
+
/** postcss-stepped-value-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-stepped-value-functions/dist/index.mjs b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs
index 2e8dbdf0..ac5168e5 100644
--- a/node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs
@@ -1 +1 @@
-import{calcFromComponentValues as s}from"@csstools/css-calc";import{stringify as o,parseCommaSeparatedListOfComponentValues as e}from"@csstools/css-parser-algorithms";import{tokenize as t,TokenType as n}from"@csstools/css-tokenizer";const c=["mod","rem","round"],r=new RegExp(`^(${c.join("|")})$`,"i"),i=new RegExp(`(${c.join("|")})\\(`,"i");function calc(c){const i=t({css:c});return i.some((s=>s[0]===n.Function&&r.test(s[4].value)))?o(s(e(i),{precision:5,toCanonicalUnits:!0})):c}const creator=s=>{const o=Object.assign({preserve:!1,onInvalid:""},s);return{postcssPlugin:"postcss-stepped-value-functions",Declaration(s){if(!i.test(s.value))return;const e=calc(s.value);e!==s.value&&(s.cloneBefore({value:e}),o.preserve||s.remove())}}};creator.postcss=!0;export{creator as default};
+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};