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 --- .../dist/conditions-from-values.d.ts | 3 ++ .../dist/custom/double-position-gradients.d.ts | 2 ++ .../dist/index.cjs | 1 + .../dist/index.d.ts | 3 ++ .../dist/index.mjs | 1 + .../dist/match.d.ts | 11 ++++++++ .../dist/matchers.d.ts | 33 ++++++++++++++++++++++ 7 files changed, 54 insertions(+) create mode 100644 node_modules/@csstools/postcss-progressive-custom-properties/dist/conditions-from-values.d.ts create mode 100644 node_modules/@csstools/postcss-progressive-custom-properties/dist/custom/double-position-gradients.d.ts create mode 100644 node_modules/@csstools/postcss-progressive-custom-properties/dist/index.cjs create mode 100644 node_modules/@csstools/postcss-progressive-custom-properties/dist/index.d.ts create mode 100644 node_modules/@csstools/postcss-progressive-custom-properties/dist/index.mjs create mode 100644 node_modules/@csstools/postcss-progressive-custom-properties/dist/match.d.ts create mode 100644 node_modules/@csstools/postcss-progressive-custom-properties/dist/matchers.d.ts (limited to 'node_modules/@csstools/postcss-progressive-custom-properties/dist') diff --git a/node_modules/@csstools/postcss-progressive-custom-properties/dist/conditions-from-values.d.ts b/node_modules/@csstools/postcss-progressive-custom-properties/dist/conditions-from-values.d.ts new file mode 100644 index 00000000..250b5e91 --- /dev/null +++ b/node_modules/@csstools/postcss-progressive-custom-properties/dist/conditions-from-values.d.ts @@ -0,0 +1,3 @@ +export declare function conditionsFromValue(value: string, mustContainVar?: boolean): { + support: Array; +}; diff --git a/node_modules/@csstools/postcss-progressive-custom-properties/dist/custom/double-position-gradients.d.ts b/node_modules/@csstools/postcss-progressive-custom-properties/dist/custom/double-position-gradients.d.ts new file mode 100644 index 00000000..6ca404c9 --- /dev/null +++ b/node_modules/@csstools/postcss-progressive-custom-properties/dist/custom/double-position-gradients.d.ts @@ -0,0 +1,2 @@ +import type { Node } from 'postcss-value-parser'; +export declare function doublePositionGradients(node: Node): Array; diff --git a/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.cjs b/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.cjs new file mode 100644 index 00000000..35a10519 --- /dev/null +++ b/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.cjs @@ -0,0 +1 @@ +"use strict";var e=require("postcss-value-parser");const a=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"];function doublePositionGradients(e){const r=[],p=e.value.toLowerCase();if("function"===e.type&&("conic-gradient"===p||"linear-gradient"===p||"radial-gradient"===p||"repeating-conic-gradient"===p||"repeating-linear-gradient"===p||"repeating-radial-gradient"===p)){let p=0,t=!1,i=!1;e:for(let o=0;oa.includes(e.sniff)));let s=!1;try{e(a).walk((a=>{"function"===a.type&&p.test(a.value)&&(s=!0);try{const r=e.unit(a.value);!1!==r&&(a.dimension=r)}catch{}for(let e=0;e({postcssPlugin:"postcss-progressive-custom-properties",prepare(){const e=new WeakMap;return{OnceExit:(a,{postcss:r})=>{a.walkDecls((a=>{if(!a.parent)return;const p=e.get(a.parent)||{conditionalRules:[],propNames:new Set,lastConditionParams:{support:void 0},lastConditionalRule:void 0};if(e.set(a.parent,p),a.variable){if(!p.propNames.has(a.prop))return void p.propNames.add(a.prop)}else{const e=a.prop.toLowerCase();if(!p.propNames.has(e))return void p.propNames.add(e)}if(!a.variable&&!t.test(a.value))return;if(i.test(a.value))return;if(o.test(a.value))return;const s=!a.variable,l=conditionsFromValue(a.value,s).support.join(" and ");if(!l)return;if(p.lastConditionParams.support!==l&&(p.lastConditionalRule=void 0),p.lastConditionalRule)return p.lastConditionalRule.append(a.clone()),void a.remove();const y=[];if(l&&y.push(r.atRule({name:"supports",params:l,source:a.parent.source,raws:{before:"\n\n",after:"\n"}})),!y.length)return;for(let e=0;e{const r=e.get(a);r&&0!==r.conditionalRules.length&&r.conditionalRules.reverse().forEach((e=>{a.after(e)}))}))}}}});creator.postcss=!0,module.exports=creator; diff --git a/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.d.ts b/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.d.ts new file mode 100644 index 00000000..5b5a74dd --- /dev/null +++ b/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.d.ts @@ -0,0 +1,3 @@ +import { type PluginCreator } from 'postcss'; +declare const creator: PluginCreator; +export default creator; diff --git a/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.mjs b/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.mjs new file mode 100644 index 00000000..19ceb72e --- /dev/null +++ b/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.mjs @@ -0,0 +1 @@ +import e from"postcss-value-parser";const a=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"];function doublePositionGradients(e){const r=[],p=e.value.toLowerCase();if("function"===e.type&&("conic-gradient"===p||"linear-gradient"===p||"radial-gradient"===p||"repeating-conic-gradient"===p||"repeating-linear-gradient"===p||"repeating-radial-gradient"===p)){let p=0,t=!1,i=!1;e:for(let o=0;oa.includes(e.sniff)));let s=!1;try{e(a).walk((a=>{"function"===a.type&&p.test(a.value)&&(s=!0);try{const r=e.unit(a.value);!1!==r&&(a.dimension=r)}catch{}for(let e=0;e({postcssPlugin:"postcss-progressive-custom-properties",prepare(){const e=new WeakMap;return{OnceExit:(a,{postcss:r})=>{a.walkDecls((a=>{if(!a.parent)return;const p=e.get(a.parent)||{conditionalRules:[],propNames:new Set,lastConditionParams:{support:void 0},lastConditionalRule:void 0};if(e.set(a.parent,p),a.variable){if(!p.propNames.has(a.prop))return void p.propNames.add(a.prop)}else{const e=a.prop.toLowerCase();if(!p.propNames.has(e))return void p.propNames.add(e)}if(!a.variable&&!t.test(a.value))return;if(i.test(a.value))return;if(o.test(a.value))return;const s=!a.variable,l=conditionsFromValue(a.value,s).support.join(" and ");if(!l)return;if(p.lastConditionParams.support!==l&&(p.lastConditionalRule=void 0),p.lastConditionalRule)return p.lastConditionalRule.append(a.clone()),void a.remove();const y=[];if(l&&y.push(r.atRule({name:"supports",params:l,source:a.parent.source,raws:{before:"\n\n",after:"\n"}})),!y.length)return;for(let e=0;e{const r=e.get(a);r&&0!==r.conditionalRules.length&&r.conditionalRules.reverse().forEach((e=>{a.after(e)}))}))}}}});creator.postcss=!0;export{creator as default}; diff --git a/node_modules/@csstools/postcss-progressive-custom-properties/dist/match.d.ts b/node_modules/@csstools/postcss-progressive-custom-properties/dist/match.d.ts new file mode 100644 index 00000000..95a56e03 --- /dev/null +++ b/node_modules/@csstools/postcss-progressive-custom-properties/dist/match.d.ts @@ -0,0 +1,11 @@ +type MatcherNode = { + type: string; + value?: string; + nodes?: Array; + dimension?: { + unit?: string; + }; + isVariable?: boolean; +}; +export declare function matches(a: MatcherNode, b: MatcherNode): boolean; +export {}; diff --git a/node_modules/@csstools/postcss-progressive-custom-properties/dist/matchers.d.ts b/node_modules/@csstools/postcss-progressive-custom-properties/dist/matchers.d.ts new file mode 100644 index 00000000..746c0edb --- /dev/null +++ b/node_modules/@csstools/postcss-progressive-custom-properties/dist/matchers.d.ts @@ -0,0 +1,33 @@ +export declare const matchers: ({ + supports: string; + property: string; + sniff: string; + matchers: { + type: string; + value: string; + nodes: ({ + type: string; + value: string; + isVariable?: undefined; + } | { + type: string; + value?: undefined; + isVariable?: undefined; + } | { + type: string; + isVariable: boolean; + value?: undefined; + })[]; + }[]; +} | { + supports: string; + property: string; + sniff: string; + matchers: { + type: string; + value: string; + dimension: { + unit: string; + }; + }[]; +})[]; -- cgit v1.2.3