From c06f7ee0a40255214c477e13d9b956a7e07c2900 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:05:55 +0800 Subject: postcss,(plugins): nanocss, postcss-preset-env --- .../@csstools/postcss-nested-calc/dist/has-fallback-decl.d.ts | 2 ++ node_modules/@csstools/postcss-nested-calc/dist/index.cjs | 1 + node_modules/@csstools/postcss-nested-calc/dist/index.d.ts | 8 ++++++++ node_modules/@csstools/postcss-nested-calc/dist/index.mjs | 1 + node_modules/@csstools/postcss-nested-calc/dist/occurrences.d.ts | 1 + 5 files changed, 13 insertions(+) create mode 100644 node_modules/@csstools/postcss-nested-calc/dist/has-fallback-decl.d.ts create mode 100644 node_modules/@csstools/postcss-nested-calc/dist/index.cjs create mode 100644 node_modules/@csstools/postcss-nested-calc/dist/index.d.ts create mode 100644 node_modules/@csstools/postcss-nested-calc/dist/index.mjs create mode 100644 node_modules/@csstools/postcss-nested-calc/dist/occurrences.d.ts (limited to 'node_modules/@csstools/postcss-nested-calc/dist') diff --git a/node_modules/@csstools/postcss-nested-calc/dist/has-fallback-decl.d.ts b/node_modules/@csstools/postcss-nested-calc/dist/has-fallback-decl.d.ts new file mode 100644 index 00000000..d7ae8d89 --- /dev/null +++ b/node_modules/@csstools/postcss-nested-calc/dist/has-fallback-decl.d.ts @@ -0,0 +1,2 @@ +import type { Declaration } from 'postcss'; +export declare function hasFallback(node: Declaration): boolean; diff --git a/node_modules/@csstools/postcss-nested-calc/dist/index.cjs b/node_modules/@csstools/postcss-nested-calc/dist/index.cjs new file mode 100644 index 00000000..a52f3cd7 --- /dev/null +++ b/node_modules/@csstools/postcss-nested-calc/dist/index.cjs @@ -0,0 +1 @@ +"use strict";var e=require("postcss-value-parser");const t=/calc\(/gim;function hasFallback(e){const t=e.parent;if(!t)return!1;const r=t.index(e);for(let a=0;a{const a=Object.assign({preserve:!0},r);return{postcssPlugin:"postcss-nested-calc",Declaration(r,{result:n}){if((r.value.match(t)||[]).length<2)return;if(r.variable)return;if(hasFallback(r))return;const o=r.value;let s;try{s=e(o)}catch(e){return void r.warn(n,`Failed to parse value '${o}'. Leaving the original value intact.`)}if(void 0===s)return;e.walk(s.nodes,(t=>{t.type&&"function"===t.type&&"calc"===t.value.toLowerCase()&&e.walk(t.nodes,(e=>{if(e.type&&"function"===e.type)return"calc"===e.value.toLowerCase()&&void(e.value="")}))}),!0);const c=String(s);c!==o&&(r.cloneBefore({value:c}),a.preserve||r.remove())}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/@csstools/postcss-nested-calc/dist/index.d.ts b/node_modules/@csstools/postcss-nested-calc/dist/index.d.ts new file mode 100644 index 00000000..139448be --- /dev/null +++ b/node_modules/@csstools/postcss-nested-calc/dist/index.d.ts @@ -0,0 +1,8 @@ +import type { PluginCreator } from 'postcss'; +/** postcss-nested-calc plugin options */ +export type pluginOptions = { + /** Preserve the original notation. default: true */ + preserve?: boolean; +}; +declare const creator: PluginCreator; +export default creator; diff --git a/node_modules/@csstools/postcss-nested-calc/dist/index.mjs b/node_modules/@csstools/postcss-nested-calc/dist/index.mjs new file mode 100644 index 00000000..41363381 --- /dev/null +++ b/node_modules/@csstools/postcss-nested-calc/dist/index.mjs @@ -0,0 +1 @@ +import e from"postcss-value-parser";const t=/calc\(/gim;function hasFallback(e){const t=e.parent;if(!t)return!1;const r=t.index(e);for(let a=0;a{const a=Object.assign({preserve:!0},r);return{postcssPlugin:"postcss-nested-calc",Declaration(r,{result:o}){if((r.value.match(t)||[]).length<2)return;if(r.variable)return;if(hasFallback(r))return;const n=r.value;let s;try{s=e(n)}catch(e){return void r.warn(o,`Failed to parse value '${n}'. Leaving the original value intact.`)}if(void 0===s)return;e.walk(s.nodes,(t=>{t.type&&"function"===t.type&&"calc"===t.value.toLowerCase()&&e.walk(t.nodes,(e=>{if(e.type&&"function"===e.type)return"calc"===e.value.toLowerCase()&&void(e.value="")}))}),!0);const c=String(s);c!==n&&(r.cloneBefore({value:c}),a.preserve||r.remove())}}};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/@csstools/postcss-nested-calc/dist/occurrences.d.ts b/node_modules/@csstools/postcss-nested-calc/dist/occurrences.d.ts new file mode 100644 index 00000000..61f8b784 --- /dev/null +++ b/node_modules/@csstools/postcss-nested-calc/dist/occurrences.d.ts @@ -0,0 +1 @@ +export declare function numberOfCalcOccurrences(value: string): number; -- cgit v1.2.3