summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-stepped-value-functions/dist
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:05:55 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:05:55 +0800
commitc06f7ee0a40255214c477e13d9b956a7e07c2900 (patch)
treef5982a568ef8fab865d0142e71c7494fea3e4c1b /node_modules/@csstools/postcss-stepped-value-functions/dist
parent3fd9400d4dccc25aa29b5702216732e0b7542073 (diff)
postcss,(plugins): nanocss, postcss-preset-env
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.cjs1
-rw-r--r--node_modules/@csstools/postcss-stepped-value-functions/dist/index.d.ts8
-rw-r--r--node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs1
5 files changed, 13 insertions, 0 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
new file mode 100644
index 00000000..5a1ee11e
--- /dev/null
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/calc.d.ts
@@ -0,0 +1 @@
+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
new file mode 100644
index 00000000..6623beb7
--- /dev/null
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/checks.d.ts
@@ -0,0 +1,2 @@
+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
new file mode 100644
index 00000000..0ccad206
--- /dev/null
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.cjs
@@ -0,0 +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;
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
new file mode 100644
index 00000000..c7772f76
--- /dev/null
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.d.ts
@@ -0,0 +1,8 @@
+import type { PluginCreator } from 'postcss';
+/** postcss-stepped-value-functions plugin options */
+export type pluginOptions = {
+ /** Preserve the original notation. default: false */
+ preserve?: boolean;
+};
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
diff --git a/node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs
new file mode 100644
index 00000000..2e8dbdf0
--- /dev/null
+++ b/node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs
@@ -0,0 +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};