summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-ic-unit/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-ic-unit/dist
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/@csstools/postcss-ic-unit/dist')
-rw-r--r--node_modules/@csstools/postcss-ic-unit/dist/has-fallback-decl.d.ts2
-rw-r--r--node_modules/@csstools/postcss-ic-unit/dist/has-supports-at-rule-ancestor.d.ts2
-rw-r--r--node_modules/@csstools/postcss-ic-unit/dist/index.cjs2
-rw-r--r--node_modules/@csstools/postcss-ic-unit/dist/index.d.ts6
-rw-r--r--node_modules/@csstools/postcss-ic-unit/dist/index.mjs2
5 files changed, 7 insertions, 7 deletions
diff --git a/node_modules/@csstools/postcss-ic-unit/dist/has-fallback-decl.d.ts b/node_modules/@csstools/postcss-ic-unit/dist/has-fallback-decl.d.ts
deleted file mode 100644
index d7ae8d89..00000000
--- a/node_modules/@csstools/postcss-ic-unit/dist/has-fallback-decl.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { Declaration } from 'postcss';
-export declare function hasFallback(node: Declaration): boolean;
diff --git a/node_modules/@csstools/postcss-ic-unit/dist/has-supports-at-rule-ancestor.d.ts b/node_modules/@csstools/postcss-ic-unit/dist/has-supports-at-rule-ancestor.d.ts
deleted file mode 100644
index a46009ec..00000000
--- a/node_modules/@csstools/postcss-ic-unit/dist/has-supports-at-rule-ancestor.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { Node } from 'postcss';
-export declare function hasSupportsAtRuleAncestor(node: Node): boolean;
diff --git a/node_modules/@csstools/postcss-ic-unit/dist/index.cjs b/node_modules/@csstools/postcss-ic-unit/dist/index.cjs
index d85ab48a..5d207a0c 100644
--- a/node_modules/@csstools/postcss-ic-unit/dist/index.cjs
+++ b/node_modules/@csstools/postcss-ic-unit/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e=require("@csstools/postcss-progressive-custom-properties"),s=require("postcss-value-parser");function hasFallback(e){const s=e.parent;if(!s)return!1;const t=e.prop.toLowerCase(),r=s.index(e);for(let e=0;e<r;e++){const r=s.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===t)return!0}return!1}function hasSupportsAtRuleAncestor(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name.toLowerCase()&&/\(font-size: \d+ic\)/i.test(s.params))return!0;s=s.parent}else s=s.parent;return!1}const t=/ic\b/i,basePlugin=e=>({postcssPlugin:"postcss-ic-unit",Declaration(r){if(!t.test(r.value))return;if(hasFallback(r))return;if(hasSupportsAtRuleAncestor(r))return;const o=s(r.value);o.walk((e=>{if(!e.type||"word"!==e.type)return;const t=s.unit(e.value);t&&"ic"===t.unit.toLowerCase()&&(e.value=`${t.number}em`)}));const n=String(o);n!==r.value&&(r.cloneBefore({value:n}),null!=e&&e.preserve||r.remove())}});basePlugin.postcss=!0;const postcssPlugin=s=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},s);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[e(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0,module.exports=postcssPlugin;
+"use strict";var e=require("@csstools/postcss-progressive-custom-properties"),s=require("postcss-value-parser");function hasFallback(e){const s=e.parent;if(!s)return!1;const t=e.prop.toLowerCase(),r=s.index(e);for(let e=0;e<r;e++){const r=s.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===t)return!0}return!1}function hasSupportsAtRuleAncestor(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name.toLowerCase()&&/\(font-size: \d+ic\)/i.test(s.params))return!0;s=s.parent}else s=s.parent;return!1}const t=/ic\b/i,basePlugin=e=>({postcssPlugin:"postcss-ic-unit",Declaration(r){if(!t.test(r.value))return;if(hasFallback(r))return;if(hasSupportsAtRuleAncestor(r))return;const o=s(r.value);o.walk((e=>{if(!e.type||"word"!==e.type)return;const t=s.unit(e.value);t&&"ic"===t.unit.toLowerCase()&&(e.value=`${t.number}em`)}));const n=String(o);n!==r.value&&(r.cloneBefore({value:n}),e?.preserve||r.remove())}});basePlugin.postcss=!0;const postcssPlugin=s=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},s);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[e(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0,module.exports=postcssPlugin;
diff --git a/node_modules/@csstools/postcss-ic-unit/dist/index.d.ts b/node_modules/@csstools/postcss-ic-unit/dist/index.d.ts
index 6900fd7d..d894fc82 100644
--- a/node_modules/@csstools/postcss-ic-unit/dist/index.d.ts
+++ b/node_modules/@csstools/postcss-ic-unit/dist/index.d.ts
@@ -1,10 +1,14 @@
import type { PluginCreator } from 'postcss';
+
/** postcss-ic-unit plugin options */
-export type pluginOptions = {
+export declare type pluginOptions = {
/** Preserve the original notation. default: false */
preserve?: boolean;
/** Enable "@csstools/postcss-progressive-custom-properties". default: true */
enableProgressiveCustomProperties?: boolean;
};
+
declare const postcssPlugin: PluginCreator<pluginOptions>;
export default postcssPlugin;
+
+export { }
diff --git a/node_modules/@csstools/postcss-ic-unit/dist/index.mjs b/node_modules/@csstools/postcss-ic-unit/dist/index.mjs
index ef0b7a83..def48e6e 100644
--- a/node_modules/@csstools/postcss-ic-unit/dist/index.mjs
+++ b/node_modules/@csstools/postcss-ic-unit/dist/index.mjs
@@ -1 +1 @@
-import e from"@csstools/postcss-progressive-custom-properties";import s from"postcss-value-parser";function hasFallback(e){const s=e.parent;if(!s)return!1;const t=e.prop.toLowerCase(),r=s.index(e);for(let e=0;e<r;e++){const r=s.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===t)return!0}return!1}function hasSupportsAtRuleAncestor(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name.toLowerCase()&&/\(font-size: \d+ic\)/i.test(s.params))return!0;s=s.parent}else s=s.parent;return!1}const t=/ic\b/i,basePlugin=e=>({postcssPlugin:"postcss-ic-unit",Declaration(r){if(!t.test(r.value))return;if(hasFallback(r))return;if(hasSupportsAtRuleAncestor(r))return;const o=s(r.value);o.walk((e=>{if(!e.type||"word"!==e.type)return;const t=s.unit(e.value);t&&"ic"===t.unit.toLowerCase()&&(e.value=`${t.number}em`)}));const n=String(o);n!==r.value&&(r.cloneBefore({value:n}),null!=e&&e.preserve||r.remove())}});basePlugin.postcss=!0;const postcssPlugin=s=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},s);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[e(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default};
+import e from"@csstools/postcss-progressive-custom-properties";import s from"postcss-value-parser";function hasFallback(e){const s=e.parent;if(!s)return!1;const t=e.prop.toLowerCase(),r=s.index(e);for(let e=0;e<r;e++){const r=s.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===t)return!0}return!1}function hasSupportsAtRuleAncestor(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name.toLowerCase()&&/\(font-size: \d+ic\)/i.test(s.params))return!0;s=s.parent}else s=s.parent;return!1}const t=/ic\b/i,basePlugin=e=>({postcssPlugin:"postcss-ic-unit",Declaration(r){if(!t.test(r.value))return;if(hasFallback(r))return;if(hasSupportsAtRuleAncestor(r))return;const o=s(r.value);o.walk((e=>{if(!e.type||"word"!==e.type)return;const t=s.unit(e.value);t&&"ic"===t.unit.toLowerCase()&&(e.value=`${t.number}em`)}));const n=String(o);n!==r.value&&(r.cloneBefore({value:n}),e?.preserve||r.remove())}});basePlugin.postcss=!0;const postcssPlugin=s=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},s);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[e(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default};