diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/postcss-preset-env/dist | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/postcss-preset-env/dist')
| -rw-r--r-- | node_modules/postcss-preset-env/dist/index.cjs | 1 | ||||
| -rw-r--r-- | node_modules/postcss-preset-env/dist/index.d.ts | 304 | ||||
| -rw-r--r-- | node_modules/postcss-preset-env/dist/index.mjs | 1 |
3 files changed, 0 insertions, 306 deletions
diff --git a/node_modules/postcss-preset-env/dist/index.cjs b/node_modules/postcss-preset-env/dist/index.cjs deleted file mode 100644 index b362eaea..00000000 --- a/node_modules/postcss-preset-env/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var s=require("autoprefixer"),e=require("cssdb"),o=require("browserslist"),t=require("@csstools/postcss-initial"),i=require("postcss-pseudo-class-any-link"),r=require("css-blank-pseudo"),a=require("postcss-page-break"),c=require("@csstools/postcss-cascade-layers"),n=require("postcss-attribute-case-insensitive"),p=require("postcss-clamp"),l=require("@csstools/postcss-color-function"),u=require("postcss-color-functional-notation"),m=require("@csstools/postcss-color-mix-function"),d=require("@csstools/postcss-content-alt-text"),g=require("postcss-custom-media"),f=require("postcss-custom-properties"),b=require("postcss-custom-selectors"),h=require("postcss-dir-pseudo-class"),v=require("@csstools/postcss-normalize-display-values"),N=require("postcss-double-position-gradients"),k=require("@csstools/postcss-exponential-functions"),y=require("@csstools/postcss-logical-float-and-clear"),w=require("postcss-focus-visible"),q=require("postcss-focus-within"),x=require("@csstools/postcss-font-format-keywords"),F=require("postcss-font-variant"),$=require("@csstools/postcss-gamut-mapping"),O=require("postcss-gap-properties"),S=require("@csstools/postcss-gradients-interpolation-method"),P=require("css-has-pseudo"),C=require("postcss-color-hex-alpha"),I=require("@csstools/postcss-hwb-function"),B=require("@csstools/postcss-ic-unit"),E=require("postcss-image-set-function"),A=require("@csstools/postcss-is-pseudo-class"),L=require("postcss-lab-function"),U=require("@csstools/postcss-light-dark-function"),_=require("@csstools/postcss-logical-overflow"),j=require("@csstools/postcss-logical-overscroll-behavior"),M=require("postcss-logical"),z=require("@csstools/postcss-logical-resize"),D=require("@csstools/postcss-logical-viewport-units"),R=require("@csstools/postcss-media-queries-aspect-ratio-number-values"),T=require("@csstools/postcss-media-minmax"),V=require("@csstools/postcss-nested-calc"),H=require("postcss-nesting"),W=require("postcss-selector-not"),G=require("@csstools/postcss-oklab-function"),K=require("postcss-opacity-percentage"),Z=require("postcss-overflow-shorthand"),Q=require("postcss-replace-overflow-wrap"),J=require("postcss-place"),X=require("css-prefers-color-scheme"),Y=require("@csstools/postcss-progressive-custom-properties"),ss=require("postcss-color-rebeccapurple"),es=require("@csstools/postcss-relative-color-syntax"),os=require("@csstools/postcss-scope-pseudo-class"),ts=require("@csstools/postcss-stepped-value-functions"),is=require("@csstools/postcss-text-decoration-shorthand"),rs=require("@csstools/postcss-trigonometric-functions"),as=require("@csstools/postcss-unset-value");const cs={"blank-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-blank-pseudo/README.md#browser","focus-visible-pseudo-class":"https://github.com/WICG/focus-visible","focus-within-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-focus-within/README.md#browser","has-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-has-pseudo/README.md#browser","prefers-color-scheme-query":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-prefers-color-scheme/README.md#browser"},ns=["blank-pseudo-class","focus-visible-pseudo-class","focus-within-pseudo-class","has-pseudo-class","prefers-color-scheme-query"];function logFeaturesList(s,e,o){if(e.debug){o.log("Enabling the following feature(s):");const t=[],i=[];!1!==e.autoprefixer&&i.push(" autoprefixer"),s.forEach((s=>{s.id.startsWith("before")||s.id.startsWith("after")?i.push(` ${s.id} (injected via options)`):i.push(` ${s.id}`),void 0!==cs[s.id]&&t.push(s.id)})),i.sort(((s,e)=>s.localeCompare(e))),t.sort(((s,e)=>s.localeCompare(e))),i.forEach((s=>o.log(s))),t.length&&(o.log("These feature(s) need a browser library to work:"),t.forEach((s=>o.log(` ${s}: ${cs[s]}`))))}}function initializeSharedOptions(s){if("preserve"in s){const e={};return e.preserve=s.preserve,e}return!1}function clamp(s,e,o){return Math.max(s,Math.min(e,o))}const ps=2,ls=5;function stageFromOptions(s,e){let o=ps;if(void 0===s.stage)return e.log(`Using features from Stage ${ps} (default).`),o;if(!1===s.stage)o=ls;else{let e=parseInt(s.stage,10);Number.isNaN(e)&&(e=0),o=clamp(0,e,ls)}return o===ls?e.log('Stage has been disabled, features will be handled via the "features" option.'):e.log(`Using features from Stage ${o}.`),o}const us=Symbol("insertBefore"),ms=Symbol("insertAfter"),ds=Symbol("insertOrder"),gs=Symbol("plugin");function getTransformedInsertions(s,e,o){if("insertBefore"!==o&&"insertAfter"!==o)return[];const t="insertBefore"===o?us:ms,i=[];for(const o in e){if(!Object.hasOwnProperty.call(e,o))continue;if(!s.find((s=>s.id===o)))continue;let r=e[o];Array.isArray(r)||(r=[r]);for(let s=0;s<r.length;s++)i.push({id:o,[gs]:r[s],[ds]:s,[t]:!0})}return i}var fs=["custom-media-queries","environment-variables","image-set-function","media-query-ranges","media-queries-aspect-ratio-number-values","prefers-color-scheme-query","nesting-rules","custom-selectors","any-link-pseudo-class","case-insensitive-attributes","focus-visible-pseudo-class","focus-within-pseudo-class","not-pseudo-class","logical-properties-and-values","float-clear-logical-values","logical-overflow","logical-overscroll-behavior","logical-resize","logical-viewport-units","dir-pseudo-class","all-property","gradients-interpolation-method","color-mix","relative-color-syntax","lab-function","oklab-function","color-function","hwb-function","color-functional-notation","rebeccapurple-color","hexadecimal-alpha-notation","light-dark-function","double-position-gradients","blank-pseudo-class","break-properties","font-variant-property","is-pseudo-class","scope-pseudo-class","has-pseudo-class","gap-properties","overflow-property","overflow-wrap-property","place-properties","system-ui-font-family","font-format-keywords","display-two-values","content-alt-text","ic-unit","opacity-percentage","text-decoration-shorthand","unset-value","stepped-value-functions","trigonometric-functions","exponential-functions","clamp","nested-calc","custom-properties","cascade-layers","progressive-custom-properties","gamut-mapping"];function featureIsLess(s,e){return s.id===e.id?s[us]&&e[us]||s[ms]&&e[ms]?clamp(-1,s[ds]-e[ds],1):s[us]||e[ms]?-1:s[ms]||e[us]?1:0:clamp(-1,fs.indexOf(s.id)-fs.indexOf(e.id),1)}function postcssSystemUiFont(){return{postcssPlugin:"postcss-system-ui-font",Declaration(s){bs.test(s.prop)&&(s.value.includes(Ns)||(s.value=s.value.replace(ks,ys)))}}}postcssSystemUiFont.postcss=!0;const bs=/(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i,hs="[\\f\\n\\r\\x09\\x20]",vs=["system-ui","-apple-system","Segoe UI","Roboto","Ubuntu","Cantarell","Noto Sans","sans-serif"],Ns=vs.join(", "),ks=new RegExp(`(^|,|${hs}+)(?:system-ui${hs}*)(?:,${hs}*(?:${vs.join("|")})${hs}*)?(,|$)`,"i"),ys=`$1${Ns}$2`,ws=new Map([["all-property",t],["any-link-pseudo-class",i],["blank-pseudo-class",r],["break-properties",a],["cascade-layers",c],["case-insensitive-attributes",n],["clamp",p],["color-function",l],["color-functional-notation",u],["color-mix",m],["content-alt-text",d],["custom-media-queries",g],["custom-properties",f],["custom-selectors",b],["dir-pseudo-class",h],["display-two-values",v],["double-position-gradients",N],["exponential-functions",k],["float-clear-logical-values",y],["focus-visible-pseudo-class",w],["focus-within-pseudo-class",q],["font-format-keywords",x],["font-variant-property",F],["gamut-mapping",$],["gap-properties",O],["gradients-interpolation-method",S],["has-pseudo-class",P],["hexadecimal-alpha-notation",C],["hwb-function",I],["ic-unit",B],["image-set-function",E],["is-pseudo-class",A],["lab-function",L],["light-dark-function",U],["logical-overflow",_],["logical-overscroll-behavior",j],["logical-properties-and-values",M],["logical-resize",z],["logical-viewport-units",D],["media-queries-aspect-ratio-number-values",R],["media-query-ranges",T],["nested-calc",V],["nesting-rules",H],["not-pseudo-class",W],["oklab-function",G],["opacity-percentage",K],["overflow-property",Z],["overflow-wrap-property",Q],["place-properties",J],["prefers-color-scheme-query",X],["progressive-custom-properties",Y],["rebeccapurple-color",ss],["relative-color-syntax",es],["scope-pseudo-class",os],["stepped-value-functions",ts],["system-ui-font-family",postcssSystemUiFont],["text-decoration-shorthand",is],["trigonometric-functions",rs],["unset-value",as]]);function featureIsInsertedOrHasAPlugin(s){return!!s[us]||(!!s[ms]||!!ws.has(s.id))}function prepareFeaturesList(s,e,o){return s.concat(getTransformedInsertions(s,e,"insertBefore"),getTransformedInsertions(s,o,"insertAfter")).filter((s=>featureIsInsertedOrHasAPlugin(s))).sort(((s,e)=>featureIsLess(s,e)))}const qs=["and_chr","and_ff","android","chrome","edge","firefox","ie","ios_saf","op_mini","op_mob","opera","safari","samsung"];function getUnsupportedBrowsersByFeature(s){if(!s)return[];if(!("browser_support"in s))return["> 0%"];const e=[];return qs.forEach((o=>{if("op_mini"===o&&void 0===s.browser_support[o])return void e.push("op_mini all");const t=s.browser_support[o];"string"==typeof t&&xs.test(t)?e.push(`${o} < ${s.browser_support[o]}`):e.push(`${o} >= 1`)})),e}const xs=/^[0-9|.]+$/;function getOptionsForBrowsersByFeature(s,e,o,t,i){switch(e.id){case"is-pseudo-class":return{onComplexSelector:"warning"};case"nesting-rules":if(needsOptionFor(o.find((s=>"is-pseudo-class"===s.id)),s))return i.log("- 'nesting-rules' setting 'noIsPseudoSelector: true' due to lack of browser support for ':is()'."),{noIsPseudoSelector:!0};return{};case"any-link-pseudo-class":if(s.find((s=>s.startsWith("ie ")||"edge 12"===s||"edge 13"===s||"edge 14"===s||"edge 15"===s||"edge 16"===s||"edge 17"===s||"edge 18"===s)))return i.log("- 'any-link-pseudo-class' setting 'subFeatures: { areaHrefNeedsFixing: true }' due to lack of browser support for area[href] in Edge and IE."),{subFeatures:{areaHrefNeedsFixing:!0}};return{};case"logical-properties-and-values":case"float-clear-logical-values":case"logical-resize":case"logical-viewport-units":case"logical-overflow":case"logical-overscroll-behavior":return"logical"in t?t.logical:{};default:return{}}}function needsOptionFor(s,e){const t=getUnsupportedBrowsersByFeature(s),i=o(t,{ignoreUnknownVersions:!0});return!!e.some((s=>i.some((e=>e===s))))}function formatPolyfillableFeature(s){const e=getUnsupportedBrowsersByFeature(s);if(s[us]||s[ms]){let o=s.id;return o=s.insertBefore?`before-${o}`:`after-${o}`,{browsers:e,vendors_implementations:s.vendors_implementations,plugin:s[gs],id:o,stage:ls+1}}return{browsers:e,vendors_implementations:s.vendors_implementations,plugin:ws.get(s.id),id:s.id,stage:s.stage}}function formatStagedFeature(s,e,o,t,i,r,a){let c,n;return c=getOptionsForBrowsersByFeature(e,t,s,r,a),c=i?Object.assign({},c,i,featureOptions(o,t.id)):Object.assign({},c,featureOptions(o,t.id)),"progressive-custom-properties"!==t.id&&(c.enableProgressiveCustomProperties=!1),"overflow-wrap-property"===t.id&&"preserve"in c&&(c.method=c.preserve?"copy":"replace"),n=t.plugin.postcss&&"function"==typeof t.plugin?t.plugin(c):t.plugin&&t.plugin.default&&"function"==typeof t.plugin.default&&t.plugin.default.postcss?t.plugin.default(c):t.plugin,{browsers:t.browsers,vendors_implementations:t.vendors_implementations,plugin:n,pluginOptions:c,id:t.id}}function featureOptions(s,e){if(!(e in s))return;const o=s[e];return Array.isArray(o)?o[1]:o}function intOrZero(s){const e=parseInt(s,10);return Number.isNaN(e)?0:e}const Fs=new Set(["progressive-custom-properties"]);function listFeatures(s,e,t,i){const r=Object(e.features),a="enableClientSidePolyfills"in e&&e.enableClientSidePolyfills,c=Object(e.insertBefore),n=Object(e.insertAfter),p=e.browsers?void 0:e.env,l=e.browsers,u=clamp(0,intOrZero(e.minimumVendorImplementations),3);u>0&&i.log(`Using features with ${u} or more vendor implementations.`);const m=stageFromOptions(e,i),d=prepareFeaturesList([...s,{id:"progressive-custom-properties"}],c,n).map((s=>formatPolyfillableFeature(s))).filter((s=>!!Fs.has(s.id)||(0===u||(!(!s[us]&&!s[ms])||(u<=s.vendors_implementations||(!0===featureEnabledByOptions(r,s.id)?(i.log(`- '${s.id}' enabled manually even when it lacks the required interop (${s.vendors_implementations} out of ${u}).`),!0):(i.log(`- '${s.id}' disabled because it lacks the required interop (${s.vendors_implementations} out of ${u}).`),!1))))))),g=o(l,{env:p,ignoreUnknownVersions:!0}).filter((s=>qs.includes(s.split(" ")[0])));return d.filter((s=>{if(Fs.has(s.id))return!0;const e=s.stage>=m,o=a||!ns.includes(s.id),t=featureEnabledByOptions(r,s.id),c=!1===t,n=!0===t||e&&o;return c?i.log(`- '${s.id}' disabled manually`):e?o||i.log(`- '${s.id}' disabled because 'enableClientSidePolyfills' is 'false'.`):n?i.log(`- '${s.id}' enabled manually even when it lacks the required stage (${s.stage} out of ${m}).`):i.log(`- '${s.id}' disabled because it lacks the required stage (${s.stage} out of ${m}).`),!c&&n})).map((o=>formatStagedFeature(s,g,r,o,t,e,i))).filter((s=>{if(Fs.has(s.id))return!0;const e=featureEnabledByOptions(r,s.id);if(!0===e||!1===e)return e;const t=o(s.browsers,{ignoreUnknownVersions:!0}),a=g.filter((s=>t.some((e=>e===s))));return a.length>0?i.log(`- '${s.id}' enabled for:\n ${a.join("\n ")}`):i.log(`- '${s.id}' disabled because all targeted browsers support it.`),a.length>0}))}function featureEnabledByOptions(s,e){if(!(e in s))return"auto";const o=s[e];return Array.isArray(o)?!0===o[0]||!1!==o[0]&&"auto":Boolean(o)}class Logger{constructor(){this.logs=[]}log(s){this.logs.push(s)}resetLogger(){this.logs.length=0}emitLogs(s){s&&s.warn(this.logs.join("\n")),this.resetLogger()}}var $s=[{packageName:"css-blank-pseudo",id:"blank-pseudo-class",importName:"postcssBlankPseudo"},{packageName:"css-has-pseudo",id:"has-pseudo-class",importName:"postcssHasPseudo"},{packageName:"css-prefers-color-scheme",id:"prefers-color-scheme-query",importName:"postcssPrefersColorScheme"},{packageName:"postcss-attribute-case-insensitive",id:"case-insensitive-attributes",importName:"postcssAttributeCaseInsensitive"},{packageName:"postcss-clamp",id:"clamp",importName:"postcssClamp"},{packageName:"@csstools/postcss-color-mix-function",id:"color-mix",importName:"postcssColorMixFunction"},{packageName:"@csstools/postcss-color-function",id:"color-function",importName:"postcssColorFunction"},{packageName:"postcss-color-functional-notation",id:"color-functional-notation",importName:"postcssColorFunctionalNotation"},{packageName:"postcss-color-hex-alpha",id:"hexadecimal-alpha-notation",importName:"postcssColorHexAlpha"},{packageName:"@csstools/postcss-content-alt-text",id:"content-alt-text",importName:"postcssContentAltText"},{packageName:"postcss-color-rebeccapurple",id:"rebeccapurple-color",importName:"postcssColorRebeccapurple"},{packageName:"postcss-custom-media",id:"custom-media-queries",importName:"postcssCustomMedia"},{packageName:"postcss-custom-properties",id:"custom-properties",importName:"postcssCustomProperties"},{packageName:"postcss-custom-selectors",id:"custom-selectors",importName:"postcssCustomSelectors"},{packageName:"postcss-dir-pseudo-class",id:"dir-pseudo-class",importName:"postcssDirPseudoClass"},{packageName:"postcss-double-position-gradients",id:"double-position-gradients",importName:"postcssDoublePositionGradients"},{packageName:"@csstools/postcss-exponential-functions",id:"exponential-functions",importName:"postcssExponentialFunctions"},{packageName:"postcss-focus-visible",id:"focus-visible-pseudo-class",importName:"postcssFocusVisible"},{packageName:"postcss-focus-within",id:"focus-within-pseudo-class",importName:"postcssFocusWithin"},{packageName:"@csstools/postcss-font-format-keywords",id:"font-format-keywords",importName:"postcssFontFormatKeywords"},{packageName:"postcss-font-variant",id:"font-variant-property",importName:"postcssFontVariant"},{packageName:"@csstools/postcss-gamut-mapping",id:"gamut-mapping",importName:"postcssGamutMapping"},{packageName:"postcss-gap-properties",id:"gap-properties",importName:"postcssGapProperties"},{packageName:"@csstools/postcss-gradients-interpolation-method",id:"gradients-interpolation-method",importName:"postcssGradientsInterpolationMethod"},{packageName:"@csstools/postcss-hwb-function",id:"hwb-function",importName:"postcssHWBFunction"},{packageName:"@csstools/postcss-ic-unit",id:"ic-unit",importName:"postcssICUnit"},{packageName:"postcss-image-set-function",id:"image-set-function",importName:"postcssImageSetFunction"},{packageName:"@csstools/postcss-initial",id:"all-property",importName:"postcssInitial"},{packageName:"@csstools/postcss-is-pseudo-class",id:"is-pseudo-class",importName:"postcssIsPseudoClass"},{packageName:"@csstools/postcss-scope-pseudo-class",id:"scope-pseudo-class",importName:"postcssScopePseudoClass"},{packageName:"postcss-lab-function",id:"lab-function",importName:"postcssLabFunction"},{packageName:"@csstools/postcss-light-dark-function",id:"light-dark-function",importName:"postcssLightDarkFunction"},{packageName:"postcss-logical",id:"logical-properties-and-values",importName:"postcssLogical"},{packageName:"@csstools/postcss-logical-float-and-clear",id:"float-clear-logical-values",importName:"postcssLogicalFloatAndClear"},{packageName:"@csstools/postcss-logical-overflow",id:"logical-overflow",importName:"postcssLogicalOverflow"},{packageName:"@csstools/postcss-logical-overscroll-behavior",id:"logical-overscroll-behavior",importName:"postcssLogicalOverscrollBehavor"},{packageName:"@csstools/postcss-logical-resize",id:"logical-resize",importName:"postcssLogicalResize"},{packageName:"@csstools/postcss-logical-viewport-units",id:"logical-viewport-units",importName:"postcssLogicalViewportUnits"},{packageName:"@csstools/postcss-media-minmax",id:"media-query-ranges",importName:"postcssMediaMinmax"},{packageName:"@csstools/postcss-media-queries-aspect-ratio-number-values",id:"media-queries-aspect-ratio-number-values",importName:"postcssMediaQueriesAspectRatioNumberValues"},{packageName:"postcss-nesting",id:"nesting-rules",importName:"postcssNesting"},{packageName:"@csstools/postcss-normalize-display-values",id:"display-two-values",importName:"postcssNormalizeDisplayValues"},{packageName:"@csstools/postcss-oklab-function",id:"oklab-function",importName:"postcssOKLabFunction"},{packageName:"@csstools/postcss-relative-color-syntax",id:"relative-color-syntax",importName:"postcssRelativeColorSyntax"},{packageName:"postcss-opacity-percentage",id:"opacity-percentage",importName:"postcssOpacityPercentage"},{packageName:"postcss-overflow-shorthand",id:"overflow-property",importName:"postcssOverflowShorthand"},{packageName:"postcss-page-break",id:"break-properties",importName:"postcssPageBreak"},{packageName:"postcss-place",id:"place-properties",importName:"postcssPlace"},{packageName:"postcss-pseudo-class-any-link",id:"any-link-pseudo-class",importName:"postcssPseudoClassAnyLink"},{packageName:"postcss-replace-overflow-wrap",id:"overflow-wrap-property",importName:"postcssReplaceOverflowWrap"},{packageName:"postcss-selector-not",id:"not-pseudo-class",importName:"postcssSelectorNot"},{packageName:"@csstools/postcss-stepped-value-functions",id:"stepped-value-functions",importName:"postcssSteppedValueFunctions"},{packageName:"postcss-system-ui-font-family",importedPackage:"../patch/postcss-system-ui-font-family.mjs",id:"system-ui-font-family",importName:"postcssFontFamilySystemUI"},{packageName:"@csstools/postcss-unset-value",id:"unset-value",importName:"postcssUnsetValue"},{packageName:"@csstools/postcss-cascade-layers",id:"cascade-layers",importName:"postcssCascadeLayers"},{packageName:"@csstools/postcss-trigonometric-functions",id:"trigonometric-functions",importName:"postcssTrigonometricFunctions"},{packageName:"@csstools/postcss-nested-calc",id:"nested-calc",importName:"postcssNestedCalc"},{packageName:"@csstools/postcss-text-decoration-shorthand",id:"text-decoration-shorthand",importName:"postcssTextDecorationShorthand"},{packageName:"@csstools/postcss-progressive-custom-properties",id:"progressive-custom-properties",importName:"postcssProgressiveCustomProperties",omitTypedOptions:!0,omitDocs:!0}];function getPackageNamesToIds(){const s={};return $s.forEach((e=>{s[e.packageName]=e.id})),s}function pluginIdHelp(s,e,o){const t=$s.map((s=>s.id)),i=$s.map((s=>s.packageName)),r=getPackageNamesToIds();s.forEach((s=>{if(t.includes(s))return;const a=[...t.map((e=>[e,levenshteinDistance(s,e)])),...i.map((e=>[r[e],levenshteinDistance(s,e)]))].sort(((s,e)=>s[1]-e[1])).filter((s=>s[1]<10)),c=new Set;for(let s=0;s<a.length&&(c.add(a[s][0]),!(c.size>=3));s++);if(!c.size)return void e.warn(o,`Unknown feature: "${s}", see the list of features https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/FEATURES.md`);let n='"';n+=Array.from(c).join('", "'),n+='"',e.warn(o,`Unknown feature: "${s}", did you mean one of: ${n}`)}))}function levenshteinDistance(s,e){if(!s.length)return e.length;if(!e.length)return s.length;const o=[];for(let t=0;t<=e.length;t++){o[t]=[t];for(let i=1;i<=s.length;i++)o[t][i]=0===t?i:Math.min(o[t-1][i]+1,o[t][i-1]+1,o[t-1][i-1]+(s[i-1]===e[t-1]?0:1))}return o[e.length][s.length]}const creator=o=>{const t=new Logger,i=Object(o),r=Object.keys(Object(i.features)),a=i.browsers?void 0:i.env,c=i.browsers,n=initializeSharedOptions(i),p=listFeatures(e,i,n,t),l=p.map((s=>s.plugin));!1!==i.autoprefixer&&l.push(s(Object.assign({env:a,overrideBrowserslist:c},i.autoprefixer))),logFeaturesList(p,i,t);const internalPlugin=()=>({postcssPlugin:"postcss-preset-env",OnceExit(s,{result:e}){pluginIdHelp(r,s,e),i.debug&&t.emitLogs(e),t.resetLogger()}});return internalPlugin.postcss=!0,{postcssPlugin:"postcss-preset-env",plugins:[...l,internalPlugin()]}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/postcss-preset-env/dist/index.d.ts b/node_modules/postcss-preset-env/dist/index.d.ts deleted file mode 100644 index 35f55bfb..00000000 --- a/node_modules/postcss-preset-env/dist/index.d.ts +++ /dev/null @@ -1,304 +0,0 @@ -import type autoprefixer from 'autoprefixer'; -import type { PluginCreator } from 'postcss'; -import type { pluginOptions as pluginOptions_10 } from '@csstools/postcss-content-alt-text'; -import type { pluginOptions as pluginOptions_11 } from 'postcss-custom-media'; -import type { pluginOptions as pluginOptions_12 } from 'postcss-custom-properties'; -import type { pluginOptions as pluginOptions_13 } from 'postcss-custom-selectors'; -import type { pluginOptions as pluginOptions_14 } from 'postcss-dir-pseudo-class'; -import type { pluginOptions as pluginOptions_15 } from '@csstools/postcss-normalize-display-values'; -import type { pluginOptions as pluginOptions_16 } from 'postcss-double-position-gradients'; -import type { pluginOptions as pluginOptions_17 } from '@csstools/postcss-exponential-functions'; -import type { pluginOptions as pluginOptions_18 } from '@csstools/postcss-logical-float-and-clear'; -import type { pluginOptions as pluginOptions_19 } from 'postcss-focus-visible'; -import type { pluginOptions as pluginOptions_2 } from '@csstools/postcss-initial'; -import type { pluginOptions as pluginOptions_20 } from 'postcss-focus-within'; -import type { pluginOptions as pluginOptions_21 } from '@csstools/postcss-font-format-keywords'; -import type { pluginOptions as pluginOptions_22 } from '@csstools/postcss-gamut-mapping'; -import type { pluginOptions as pluginOptions_23 } from 'postcss-gap-properties'; -import type { pluginOptions as pluginOptions_24 } from '@csstools/postcss-gradients-interpolation-method'; -import type { pluginOptions as pluginOptions_25 } from 'css-has-pseudo'; -import type { pluginOptions as pluginOptions_26 } from 'postcss-color-hex-alpha'; -import type { pluginOptions as pluginOptions_27 } from '@csstools/postcss-hwb-function'; -import type { pluginOptions as pluginOptions_28 } from '@csstools/postcss-ic-unit'; -import type { pluginOptions as pluginOptions_29 } from 'postcss-image-set-function'; -import type { pluginOptions as pluginOptions_3 } from 'postcss-pseudo-class-any-link'; -import type { pluginOptions as pluginOptions_30 } from '@csstools/postcss-is-pseudo-class'; -import type { pluginOptions as pluginOptions_31 } from 'postcss-lab-function'; -import type { pluginOptions as pluginOptions_32 } from '@csstools/postcss-light-dark-function'; -import type { pluginOptions as pluginOptions_33 } from '@csstools/postcss-logical-overflow'; -import type { pluginOptions as pluginOptions_34 } from '@csstools/postcss-logical-overscroll-behavior'; -import type { pluginOptions as pluginOptions_35 } from 'postcss-logical'; -import type { pluginOptions as pluginOptions_36 } from '@csstools/postcss-logical-resize'; -import type { pluginOptions as pluginOptions_37 } from '@csstools/postcss-logical-viewport-units'; -import type { pluginOptions as pluginOptions_38 } from '@csstools/postcss-media-queries-aspect-ratio-number-values'; -import type { pluginOptions as pluginOptions_39 } from '@csstools/postcss-media-minmax'; -import type { pluginOptions as pluginOptions_4 } from 'css-blank-pseudo'; -import type { pluginOptions as pluginOptions_40 } from '@csstools/postcss-nested-calc'; -import type { pluginOptions as pluginOptions_41 } from 'postcss-nesting'; -import type { pluginOptions as pluginOptions_42 } from 'postcss-selector-not'; -import type { pluginOptions as pluginOptions_43 } from '@csstools/postcss-oklab-function'; -import type { pluginOptions as pluginOptions_44 } from 'postcss-overflow-shorthand'; -import type { pluginOptions as pluginOptions_45 } from 'postcss-place'; -import type { pluginOptions as pluginOptions_46 } from 'css-prefers-color-scheme'; -import type { pluginOptions as pluginOptions_47 } from 'postcss-color-rebeccapurple'; -import type { pluginOptions as pluginOptions_48 } from '@csstools/postcss-relative-color-syntax'; -import type { pluginOptions as pluginOptions_49 } from '@csstools/postcss-scope-pseudo-class'; -import type { pluginOptions as pluginOptions_5 } from '@csstools/postcss-cascade-layers'; -import type { pluginOptions as pluginOptions_50 } from '@csstools/postcss-stepped-value-functions'; -import type { pluginOptions as pluginOptions_51 } from '@csstools/postcss-text-decoration-shorthand'; -import type { pluginOptions as pluginOptions_52 } from '@csstools/postcss-trigonometric-functions'; -import type { pluginOptions as pluginOptions_53 } from '@csstools/postcss-unset-value'; -import type { pluginOptions as pluginOptions_6 } from 'postcss-attribute-case-insensitive'; -import type { pluginOptions as pluginOptions_7 } from '@csstools/postcss-color-function'; -import type { pluginOptions as pluginOptions_8 } from 'postcss-color-functional-notation'; -import type { pluginOptions as pluginOptions_9 } from '@csstools/postcss-color-mix-function'; - -declare const creator: PluginCreator<pluginOptions>; -export default creator; - -export declare enum DirectionFlow { - TopToBottom = "top-to-bottom", - BottomToTop = "bottom-to-top", - RightToLeft = "right-to-left", - LeftToRight = "left-to-right" -} - -export declare type pluginOptions = { - /** - * Determine which CSS features to polyfill, - * based upon their process in becoming web standards. - * default: 2 - */ - stage?: number | false; - /** - * Determine which CSS features to polyfill, - * based their implementation status. - * default: 0 - */ - minimumVendorImplementations?: number; - /** - * Enable any feature that would need an extra browser library to be loaded into the page for it to work. - * default: false - */ - enableClientSidePolyfills?: boolean; - /** - * PostCSS Preset Env supports any standard browserslist configuration, - * which can be a `.browserslistrc` file, - * a `browserslist` key in `package.json`, - * or `browserslist` environment variables. - * - * The `env` option is used to select a specific browserslist environment in the event that you have more than one. - */ - env?: string; - /** - * PostCSS Preset Env supports any standard browserslist configuration, - * which can be a `.browserslistrc` file, - * a `browserslist` key in `package.json`, - * or `browserslist` environment variables. - * - * The `browsers` option should only be used when a standard browserslist configuration is not available. - * When the `browsers` option is used the `env` option is ignored. - */ - browsers?: string | Array<string> | null; - /** - * Determine whether all plugins should receive a `preserve` option, - * which may preserve or remove the original and now polyfilled CSS. - * Each plugin has it's own default, some true, others false. - * default: _not set_ - */ - preserve?: boolean; - /** - * [Configure autoprefixer](https://github.com/postcss/autoprefixer#options) - */ - autoprefixer?: autoprefixer.Options; - /** - * Enable or disable specific polyfills by ID. - * Passing `true` to a specific [feature ID](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/FEATURES.md) will enable its polyfill, - * while passing `false` will disable it. - * - * Passing an object to a specific feature ID will both enable and configure it. - */ - features?: pluginsOptions; - /** - * The `insertBefore` key allows you to insert other PostCSS plugins into the chain. - * This is only useful if you are also using sugary PostCSS plugins that must execute before certain polyfills. - * `insertBefore` supports chaining one or multiple plugins. - */ - insertBefore?: Record<string, unknown>; - /** - * The `insertAfter` key allows you to insert other PostCSS plugins into the chain. - * This is only useful if you are also using sugary PostCSS plugins that must execute after certain polyfills. - * `insertAfter` supports chaining one or multiple plugins. - */ - insertAfter?: Record<string, unknown>; - /** - * Enable debugging messages to stdout giving insights into which features have been enabled/disabled and why. - * default: false - */ - debug?: boolean; - /** - * The `logical` object allows to configure all plugins related to logical document flow at once. - * It accepts the same options as each plugin: `inlineDirection` and `blockDirection`. - */ - logical?: { - /** Set the inline flow direction. default: left-to-right */ - inlineDirection?: DirectionFlow; - /** Set the block flow direction. default: top-to-bottom */ - blockDirection?: DirectionFlow; - }; -}; - -export declare type pluginsOptions = { - /** plugin options for "@csstools/postcss-initial" */ - 'all-property'?: subPluginOptions<pluginOptions_2>; - /** plugin options for "postcss-pseudo-class-any-link" */ - 'any-link-pseudo-class'?: subPluginOptions<pluginOptions_3>; - /** plugin options for "css-blank-pseudo" */ - 'blank-pseudo-class'?: subPluginOptions<pluginOptions_4>; - /** plugin options for "postcss-page-break" */ - 'break-properties'?: subPluginOptions<postcssPageBreakOptions>; - /** plugin options for "@csstools/postcss-cascade-layers" */ - 'cascade-layers'?: subPluginOptions<pluginOptions_5>; - /** plugin options for "postcss-attribute-case-insensitive" */ - 'case-insensitive-attributes'?: subPluginOptions<pluginOptions_6>; - /** plugin options for "postcss-clamp" */ - 'clamp'?: subPluginOptions<postcssClampOptions>; - /** plugin options for "@csstools/postcss-color-function" */ - 'color-function'?: subPluginOptions<pluginOptions_7>; - /** plugin options for "postcss-color-functional-notation" */ - 'color-functional-notation'?: subPluginOptions<pluginOptions_8>; - /** plugin options for "@csstools/postcss-color-mix-function" */ - 'color-mix'?: subPluginOptions<pluginOptions_9>; - /** plugin options for "@csstools/postcss-content-alt-text" */ - 'content-alt-text'?: subPluginOptions<pluginOptions_10>; - /** plugin options for "postcss-custom-media" */ - 'custom-media-queries'?: subPluginOptions<pluginOptions_11>; - /** plugin options for "postcss-custom-properties" */ - 'custom-properties'?: subPluginOptions<pluginOptions_12>; - /** plugin options for "postcss-custom-selectors" */ - 'custom-selectors'?: subPluginOptions<pluginOptions_13>; - /** plugin options for "postcss-dir-pseudo-class" */ - 'dir-pseudo-class'?: subPluginOptions<pluginOptions_14>; - /** plugin options for "@csstools/postcss-normalize-display-values" */ - 'display-two-values'?: subPluginOptions<pluginOptions_15>; - /** plugin options for "postcss-double-position-gradients" */ - 'double-position-gradients'?: subPluginOptions<pluginOptions_16>; - /** plugin options for "@csstools/postcss-exponential-functions" */ - 'exponential-functions'?: subPluginOptions<pluginOptions_17>; - /** plugin options for "@csstools/postcss-logical-float-and-clear" */ - 'float-clear-logical-values'?: subPluginOptions<pluginOptions_18>; - /** plugin options for "postcss-focus-visible" */ - 'focus-visible-pseudo-class'?: subPluginOptions<pluginOptions_19>; - /** plugin options for "postcss-focus-within" */ - 'focus-within-pseudo-class'?: subPluginOptions<pluginOptions_20>; - /** plugin options for "@csstools/postcss-font-format-keywords" */ - 'font-format-keywords'?: subPluginOptions<pluginOptions_21>; - /** plugin options for "postcss-font-variant" */ - 'font-variant-property'?: subPluginOptions<postcssFontVariantOptions>; - /** plugin options for "@csstools/postcss-gamut-mapping" */ - 'gamut-mapping'?: subPluginOptions<pluginOptions_22>; - /** plugin options for "postcss-gap-properties" */ - 'gap-properties'?: subPluginOptions<pluginOptions_23>; - /** plugin options for "@csstools/postcss-gradients-interpolation-method" */ - 'gradients-interpolation-method'?: subPluginOptions<pluginOptions_24>; - /** plugin options for "css-has-pseudo" */ - 'has-pseudo-class'?: subPluginOptions<pluginOptions_25>; - /** plugin options for "postcss-color-hex-alpha" */ - 'hexadecimal-alpha-notation'?: subPluginOptions<pluginOptions_26>; - /** plugin options for "@csstools/postcss-hwb-function" */ - 'hwb-function'?: subPluginOptions<pluginOptions_27>; - /** plugin options for "@csstools/postcss-ic-unit" */ - 'ic-unit'?: subPluginOptions<pluginOptions_28>; - /** plugin options for "postcss-image-set-function" */ - 'image-set-function'?: subPluginOptions<pluginOptions_29>; - /** plugin options for "@csstools/postcss-is-pseudo-class" */ - 'is-pseudo-class'?: subPluginOptions<pluginOptions_30>; - /** plugin options for "postcss-lab-function" */ - 'lab-function'?: subPluginOptions<pluginOptions_31>; - /** plugin options for "@csstools/postcss-light-dark-function" */ - 'light-dark-function'?: subPluginOptions<pluginOptions_32>; - /** plugin options for "@csstools/postcss-logical-overflow" */ - 'logical-overflow'?: subPluginOptions<pluginOptions_33>; - /** plugin options for "@csstools/postcss-logical-overscroll-behavior" */ - 'logical-overscroll-behavior'?: subPluginOptions<pluginOptions_34>; - /** plugin options for "postcss-logical" */ - 'logical-properties-and-values'?: subPluginOptions<pluginOptions_35>; - /** plugin options for "@csstools/postcss-logical-resize" */ - 'logical-resize'?: subPluginOptions<pluginOptions_36>; - /** plugin options for "@csstools/postcss-logical-viewport-units" */ - 'logical-viewport-units'?: subPluginOptions<pluginOptions_37>; - /** plugin options for "@csstools/postcss-media-queries-aspect-ratio-number-values" */ - 'media-queries-aspect-ratio-number-values'?: subPluginOptions<pluginOptions_38>; - /** plugin options for "@csstools/postcss-media-minmax" */ - 'media-query-ranges'?: subPluginOptions<pluginOptions_39>; - /** plugin options for "@csstools/postcss-nested-calc" */ - 'nested-calc'?: subPluginOptions<pluginOptions_40>; - /** plugin options for "postcss-nesting" */ - 'nesting-rules'?: subPluginOptions<pluginOptions_41>; - /** plugin options for "postcss-selector-not" */ - 'not-pseudo-class'?: subPluginOptions<pluginOptions_42>; - /** plugin options for "@csstools/postcss-oklab-function" */ - 'oklab-function'?: subPluginOptions<pluginOptions_43>; - /** plugin options for "postcss-opacity-percentage" */ - 'opacity-percentage'?: subPluginOptions<postcssOpacityPercentageOptions>; - /** plugin options for "postcss-overflow-shorthand" */ - 'overflow-property'?: subPluginOptions<pluginOptions_44>; - /** plugin options for "postcss-replace-overflow-wrap" */ - 'overflow-wrap-property'?: subPluginOptions<postcssReplaceOverflowWrapOptions>; - /** plugin options for "postcss-place" */ - 'place-properties'?: subPluginOptions<pluginOptions_45>; - /** plugin options for "css-prefers-color-scheme" */ - 'prefers-color-scheme-query'?: subPluginOptions<pluginOptions_46>; - /** plugin options for "postcss-color-rebeccapurple" */ - 'rebeccapurple-color'?: subPluginOptions<pluginOptions_47>; - /** plugin options for "@csstools/postcss-relative-color-syntax" */ - 'relative-color-syntax'?: subPluginOptions<pluginOptions_48>; - /** plugin options for "@csstools/postcss-scope-pseudo-class" */ - 'scope-pseudo-class'?: subPluginOptions<pluginOptions_49>; - /** plugin options for "@csstools/postcss-stepped-value-functions" */ - 'stepped-value-functions'?: subPluginOptions<pluginOptions_50>; - /** plugin options for "postcss-system-ui-font-family" */ - 'system-ui-font-family'?: subPluginOptions<postcssFontFamilySystemUIOptions>; - /** plugin options for "@csstools/postcss-text-decoration-shorthand" */ - 'text-decoration-shorthand'?: subPluginOptions<pluginOptions_51>; - /** plugin options for "@csstools/postcss-trigonometric-functions" */ - 'trigonometric-functions'?: subPluginOptions<pluginOptions_52>; - /** plugin options for "@csstools/postcss-unset-value" */ - 'unset-value'?: subPluginOptions<pluginOptions_53>; -}; - -/** postcss-clamp plugin options */ -export declare type postcssClampOptions = { - /** Preserve the original notation. default: false */ - preserve?: boolean; - /** - * The precalculate option determines whether values with the same unit should be precalculated. - * default: false - */ - precalculate?: boolean; -}; - -/** postcss-system-ui-font-family plugin options */ -export declare type postcssFontFamilySystemUIOptions = Record<string, never>; - -/** postcss-font-variant plugin options */ -export declare type postcssFontVariantOptions = Record<string, never>; - -/** postcss-opacity-percentage plugin options */ -export declare type postcssOpacityPercentageOptions = { - /** Preserve the original notation. default: false */ - preserve?: boolean; -}; - -/** postcss-page-break plugin options */ -export declare type postcssPageBreakOptions = Record<string, never>; - -/** postcss-replace-overflow-wrap plugin options */ -export declare type postcssReplaceOverflowWrapOptions = { - /** Preserve the original notation. default: false */ - preserve?: boolean; -}; - -export declare type subPluginOptions<T> = ['auto' | boolean, T] | T | boolean; - -export { } diff --git a/node_modules/postcss-preset-env/dist/index.mjs b/node_modules/postcss-preset-env/dist/index.mjs deleted file mode 100644 index 9f93f121..00000000 --- a/node_modules/postcss-preset-env/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import s from"autoprefixer";import o from"cssdb";import e from"browserslist";import t from"@csstools/postcss-initial";import i from"postcss-pseudo-class-any-link";import r from"css-blank-pseudo";import a from"postcss-page-break";import c from"@csstools/postcss-cascade-layers";import p from"postcss-attribute-case-insensitive";import n from"postcss-clamp";import l from"@csstools/postcss-color-function";import m from"postcss-color-functional-notation";import u from"@csstools/postcss-color-mix-function";import d from"@csstools/postcss-content-alt-text";import f from"postcss-custom-media";import g from"postcss-custom-properties";import b from"postcss-custom-selectors";import h from"postcss-dir-pseudo-class";import v from"@csstools/postcss-normalize-display-values";import N from"postcss-double-position-gradients";import k from"@csstools/postcss-exponential-functions";import y from"@csstools/postcss-logical-float-and-clear";import w from"postcss-focus-visible";import x from"postcss-focus-within";import F from"@csstools/postcss-font-format-keywords";import $ from"postcss-font-variant";import O from"@csstools/postcss-gamut-mapping";import S from"postcss-gap-properties";import P from"@csstools/postcss-gradients-interpolation-method";import C from"css-has-pseudo";import I from"postcss-color-hex-alpha";import B from"@csstools/postcss-hwb-function";import E from"@csstools/postcss-ic-unit";import A from"postcss-image-set-function";import L from"@csstools/postcss-is-pseudo-class";import U from"postcss-lab-function";import q from"@csstools/postcss-light-dark-function";import _ from"@csstools/postcss-logical-overflow";import j from"@csstools/postcss-logical-overscroll-behavior";import M from"postcss-logical";import z from"@csstools/postcss-logical-resize";import D from"@csstools/postcss-logical-viewport-units";import R from"@csstools/postcss-media-queries-aspect-ratio-number-values";import T from"@csstools/postcss-media-minmax";import V from"@csstools/postcss-nested-calc";import H from"postcss-nesting";import W from"postcss-selector-not";import G from"@csstools/postcss-oklab-function";import K from"postcss-opacity-percentage";import Z from"postcss-overflow-shorthand";import Q from"postcss-replace-overflow-wrap";import J from"postcss-place";import X from"css-prefers-color-scheme";import Y from"@csstools/postcss-progressive-custom-properties";import ss from"postcss-color-rebeccapurple";import os from"@csstools/postcss-relative-color-syntax";import es from"@csstools/postcss-scope-pseudo-class";import ts from"@csstools/postcss-stepped-value-functions";import is from"@csstools/postcss-text-decoration-shorthand";import rs from"@csstools/postcss-trigonometric-functions";import as from"@csstools/postcss-unset-value";const cs={"blank-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-blank-pseudo/README.md#browser","focus-visible-pseudo-class":"https://github.com/WICG/focus-visible","focus-within-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-focus-within/README.md#browser","has-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-has-pseudo/README.md#browser","prefers-color-scheme-query":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-prefers-color-scheme/README.md#browser"},ps=["blank-pseudo-class","focus-visible-pseudo-class","focus-within-pseudo-class","has-pseudo-class","prefers-color-scheme-query"];function logFeaturesList(s,o,e){if(o.debug){e.log("Enabling the following feature(s):");const t=[],i=[];!1!==o.autoprefixer&&i.push(" autoprefixer"),s.forEach((s=>{s.id.startsWith("before")||s.id.startsWith("after")?i.push(` ${s.id} (injected via options)`):i.push(` ${s.id}`),void 0!==cs[s.id]&&t.push(s.id)})),i.sort(((s,o)=>s.localeCompare(o))),t.sort(((s,o)=>s.localeCompare(o))),i.forEach((s=>e.log(s))),t.length&&(e.log("These feature(s) need a browser library to work:"),t.forEach((s=>e.log(` ${s}: ${cs[s]}`))))}}function initializeSharedOptions(s){if("preserve"in s){const o={};return o.preserve=s.preserve,o}return!1}function clamp(s,o,e){return Math.max(s,Math.min(o,e))}const ns=2,ls=5;function stageFromOptions(s,o){let e=ns;if(void 0===s.stage)return o.log(`Using features from Stage ${ns} (default).`),e;if(!1===s.stage)e=ls;else{let o=parseInt(s.stage,10);Number.isNaN(o)&&(o=0),e=clamp(0,o,ls)}return e===ls?o.log('Stage has been disabled, features will be handled via the "features" option.'):o.log(`Using features from Stage ${e}.`),e}const ms=Symbol("insertBefore"),us=Symbol("insertAfter"),ds=Symbol("insertOrder"),fs=Symbol("plugin");function getTransformedInsertions(s,o,e){if("insertBefore"!==e&&"insertAfter"!==e)return[];const t="insertBefore"===e?ms:us,i=[];for(const e in o){if(!Object.hasOwnProperty.call(o,e))continue;if(!s.find((s=>s.id===e)))continue;let r=o[e];Array.isArray(r)||(r=[r]);for(let s=0;s<r.length;s++)i.push({id:e,[fs]:r[s],[ds]:s,[t]:!0})}return i}var gs=["custom-media-queries","environment-variables","image-set-function","media-query-ranges","media-queries-aspect-ratio-number-values","prefers-color-scheme-query","nesting-rules","custom-selectors","any-link-pseudo-class","case-insensitive-attributes","focus-visible-pseudo-class","focus-within-pseudo-class","not-pseudo-class","logical-properties-and-values","float-clear-logical-values","logical-overflow","logical-overscroll-behavior","logical-resize","logical-viewport-units","dir-pseudo-class","all-property","gradients-interpolation-method","color-mix","relative-color-syntax","lab-function","oklab-function","color-function","hwb-function","color-functional-notation","rebeccapurple-color","hexadecimal-alpha-notation","light-dark-function","double-position-gradients","blank-pseudo-class","break-properties","font-variant-property","is-pseudo-class","scope-pseudo-class","has-pseudo-class","gap-properties","overflow-property","overflow-wrap-property","place-properties","system-ui-font-family","font-format-keywords","display-two-values","content-alt-text","ic-unit","opacity-percentage","text-decoration-shorthand","unset-value","stepped-value-functions","trigonometric-functions","exponential-functions","clamp","nested-calc","custom-properties","cascade-layers","progressive-custom-properties","gamut-mapping"];function featureIsLess(s,o){return s.id===o.id?s[ms]&&o[ms]||s[us]&&o[us]?clamp(-1,s[ds]-o[ds],1):s[ms]||o[us]?-1:s[us]||o[ms]?1:0:clamp(-1,gs.indexOf(s.id)-gs.indexOf(o.id),1)}function postcssSystemUiFont(){return{postcssPlugin:"postcss-system-ui-font",Declaration(s){bs.test(s.prop)&&(s.value.includes(Ns)||(s.value=s.value.replace(ks,ys)))}}}postcssSystemUiFont.postcss=!0;const bs=/(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i,hs="[\\f\\n\\r\\x09\\x20]",vs=["system-ui","-apple-system","Segoe UI","Roboto","Ubuntu","Cantarell","Noto Sans","sans-serif"],Ns=vs.join(", "),ks=new RegExp(`(^|,|${hs}+)(?:system-ui${hs}*)(?:,${hs}*(?:${vs.join("|")})${hs}*)?(,|$)`,"i"),ys=`$1${Ns}$2`,ws=new Map([["all-property",t],["any-link-pseudo-class",i],["blank-pseudo-class",r],["break-properties",a],["cascade-layers",c],["case-insensitive-attributes",p],["clamp",n],["color-function",l],["color-functional-notation",m],["color-mix",u],["content-alt-text",d],["custom-media-queries",f],["custom-properties",g],["custom-selectors",b],["dir-pseudo-class",h],["display-two-values",v],["double-position-gradients",N],["exponential-functions",k],["float-clear-logical-values",y],["focus-visible-pseudo-class",w],["focus-within-pseudo-class",x],["font-format-keywords",F],["font-variant-property",$],["gamut-mapping",O],["gap-properties",S],["gradients-interpolation-method",P],["has-pseudo-class",C],["hexadecimal-alpha-notation",I],["hwb-function",B],["ic-unit",E],["image-set-function",A],["is-pseudo-class",L],["lab-function",U],["light-dark-function",q],["logical-overflow",_],["logical-overscroll-behavior",j],["logical-properties-and-values",M],["logical-resize",z],["logical-viewport-units",D],["media-queries-aspect-ratio-number-values",R],["media-query-ranges",T],["nested-calc",V],["nesting-rules",H],["not-pseudo-class",W],["oklab-function",G],["opacity-percentage",K],["overflow-property",Z],["overflow-wrap-property",Q],["place-properties",J],["prefers-color-scheme-query",X],["progressive-custom-properties",Y],["rebeccapurple-color",ss],["relative-color-syntax",os],["scope-pseudo-class",es],["stepped-value-functions",ts],["system-ui-font-family",postcssSystemUiFont],["text-decoration-shorthand",is],["trigonometric-functions",rs],["unset-value",as]]);function featureIsInsertedOrHasAPlugin(s){return!!s[ms]||(!!s[us]||!!ws.has(s.id))}function prepareFeaturesList(s,o,e){return s.concat(getTransformedInsertions(s,o,"insertBefore"),getTransformedInsertions(s,e,"insertAfter")).filter((s=>featureIsInsertedOrHasAPlugin(s))).sort(((s,o)=>featureIsLess(s,o)))}const xs=["and_chr","and_ff","android","chrome","edge","firefox","ie","ios_saf","op_mini","op_mob","opera","safari","samsung"];function getUnsupportedBrowsersByFeature(s){if(!s)return[];if(!("browser_support"in s))return["> 0%"];const o=[];return xs.forEach((e=>{if("op_mini"===e&&void 0===s.browser_support[e])return void o.push("op_mini all");const t=s.browser_support[e];"string"==typeof t&&Fs.test(t)?o.push(`${e} < ${s.browser_support[e]}`):o.push(`${e} >= 1`)})),o}const Fs=/^[0-9|.]+$/;function getOptionsForBrowsersByFeature(s,o,e,t,i){switch(o.id){case"is-pseudo-class":return{onComplexSelector:"warning"};case"nesting-rules":if(needsOptionFor(e.find((s=>"is-pseudo-class"===s.id)),s))return i.log("- 'nesting-rules' setting 'noIsPseudoSelector: true' due to lack of browser support for ':is()'."),{noIsPseudoSelector:!0};return{};case"any-link-pseudo-class":if(s.find((s=>s.startsWith("ie ")||"edge 12"===s||"edge 13"===s||"edge 14"===s||"edge 15"===s||"edge 16"===s||"edge 17"===s||"edge 18"===s)))return i.log("- 'any-link-pseudo-class' setting 'subFeatures: { areaHrefNeedsFixing: true }' due to lack of browser support for area[href] in Edge and IE."),{subFeatures:{areaHrefNeedsFixing:!0}};return{};case"logical-properties-and-values":case"float-clear-logical-values":case"logical-resize":case"logical-viewport-units":case"logical-overflow":case"logical-overscroll-behavior":return"logical"in t?t.logical:{};default:return{}}}function needsOptionFor(s,o){const t=getUnsupportedBrowsersByFeature(s),i=e(t,{ignoreUnknownVersions:!0});return!!o.some((s=>i.some((o=>o===s))))}function formatPolyfillableFeature(s){const o=getUnsupportedBrowsersByFeature(s);if(s[ms]||s[us]){let e=s.id;return e=s.insertBefore?`before-${e}`:`after-${e}`,{browsers:o,vendors_implementations:s.vendors_implementations,plugin:s[fs],id:e,stage:ls+1}}return{browsers:o,vendors_implementations:s.vendors_implementations,plugin:ws.get(s.id),id:s.id,stage:s.stage}}function formatStagedFeature(s,o,e,t,i,r,a){let c,p;return c=getOptionsForBrowsersByFeature(o,t,s,r,a),c=i?Object.assign({},c,i,featureOptions(e,t.id)):Object.assign({},c,featureOptions(e,t.id)),"progressive-custom-properties"!==t.id&&(c.enableProgressiveCustomProperties=!1),"overflow-wrap-property"===t.id&&"preserve"in c&&(c.method=c.preserve?"copy":"replace"),p=t.plugin.postcss&&"function"==typeof t.plugin?t.plugin(c):t.plugin&&t.plugin.default&&"function"==typeof t.plugin.default&&t.plugin.default.postcss?t.plugin.default(c):t.plugin,{browsers:t.browsers,vendors_implementations:t.vendors_implementations,plugin:p,pluginOptions:c,id:t.id}}function featureOptions(s,o){if(!(o in s))return;const e=s[o];return Array.isArray(e)?e[1]:e}function intOrZero(s){const o=parseInt(s,10);return Number.isNaN(o)?0:o}const $s=new Set(["progressive-custom-properties"]);function listFeatures(s,o,t,i){const r=Object(o.features),a="enableClientSidePolyfills"in o&&o.enableClientSidePolyfills,c=Object(o.insertBefore),p=Object(o.insertAfter),n=o.browsers?void 0:o.env,l=o.browsers,m=clamp(0,intOrZero(o.minimumVendorImplementations),3);m>0&&i.log(`Using features with ${m} or more vendor implementations.`);const u=stageFromOptions(o,i),d=prepareFeaturesList([...s,{id:"progressive-custom-properties"}],c,p).map((s=>formatPolyfillableFeature(s))).filter((s=>!!$s.has(s.id)||(0===m||(!(!s[ms]&&!s[us])||(m<=s.vendors_implementations||(!0===featureEnabledByOptions(r,s.id)?(i.log(`- '${s.id}' enabled manually even when it lacks the required interop (${s.vendors_implementations} out of ${m}).`),!0):(i.log(`- '${s.id}' disabled because it lacks the required interop (${s.vendors_implementations} out of ${m}).`),!1))))))),f=e(l,{env:n,ignoreUnknownVersions:!0}).filter((s=>xs.includes(s.split(" ")[0])));return d.filter((s=>{if($s.has(s.id))return!0;const o=s.stage>=u,e=a||!ps.includes(s.id),t=featureEnabledByOptions(r,s.id),c=!1===t,p=!0===t||o&&e;return c?i.log(`- '${s.id}' disabled manually`):o?e||i.log(`- '${s.id}' disabled because 'enableClientSidePolyfills' is 'false'.`):p?i.log(`- '${s.id}' enabled manually even when it lacks the required stage (${s.stage} out of ${u}).`):i.log(`- '${s.id}' disabled because it lacks the required stage (${s.stage} out of ${u}).`),!c&&p})).map((e=>formatStagedFeature(s,f,r,e,t,o,i))).filter((s=>{if($s.has(s.id))return!0;const o=featureEnabledByOptions(r,s.id);if(!0===o||!1===o)return o;const t=e(s.browsers,{ignoreUnknownVersions:!0}),a=f.filter((s=>t.some((o=>o===s))));return a.length>0?i.log(`- '${s.id}' enabled for:\n ${a.join("\n ")}`):i.log(`- '${s.id}' disabled because all targeted browsers support it.`),a.length>0}))}function featureEnabledByOptions(s,o){if(!(o in s))return"auto";const e=s[o];return Array.isArray(e)?!0===e[0]||!1!==e[0]&&"auto":Boolean(e)}class Logger{constructor(){this.logs=[]}log(s){this.logs.push(s)}resetLogger(){this.logs.length=0}emitLogs(s){s&&s.warn(this.logs.join("\n")),this.resetLogger()}}var Os=[{packageName:"css-blank-pseudo",id:"blank-pseudo-class",importName:"postcssBlankPseudo"},{packageName:"css-has-pseudo",id:"has-pseudo-class",importName:"postcssHasPseudo"},{packageName:"css-prefers-color-scheme",id:"prefers-color-scheme-query",importName:"postcssPrefersColorScheme"},{packageName:"postcss-attribute-case-insensitive",id:"case-insensitive-attributes",importName:"postcssAttributeCaseInsensitive"},{packageName:"postcss-clamp",id:"clamp",importName:"postcssClamp"},{packageName:"@csstools/postcss-color-mix-function",id:"color-mix",importName:"postcssColorMixFunction"},{packageName:"@csstools/postcss-color-function",id:"color-function",importName:"postcssColorFunction"},{packageName:"postcss-color-functional-notation",id:"color-functional-notation",importName:"postcssColorFunctionalNotation"},{packageName:"postcss-color-hex-alpha",id:"hexadecimal-alpha-notation",importName:"postcssColorHexAlpha"},{packageName:"@csstools/postcss-content-alt-text",id:"content-alt-text",importName:"postcssContentAltText"},{packageName:"postcss-color-rebeccapurple",id:"rebeccapurple-color",importName:"postcssColorRebeccapurple"},{packageName:"postcss-custom-media",id:"custom-media-queries",importName:"postcssCustomMedia"},{packageName:"postcss-custom-properties",id:"custom-properties",importName:"postcssCustomProperties"},{packageName:"postcss-custom-selectors",id:"custom-selectors",importName:"postcssCustomSelectors"},{packageName:"postcss-dir-pseudo-class",id:"dir-pseudo-class",importName:"postcssDirPseudoClass"},{packageName:"postcss-double-position-gradients",id:"double-position-gradients",importName:"postcssDoublePositionGradients"},{packageName:"@csstools/postcss-exponential-functions",id:"exponential-functions",importName:"postcssExponentialFunctions"},{packageName:"postcss-focus-visible",id:"focus-visible-pseudo-class",importName:"postcssFocusVisible"},{packageName:"postcss-focus-within",id:"focus-within-pseudo-class",importName:"postcssFocusWithin"},{packageName:"@csstools/postcss-font-format-keywords",id:"font-format-keywords",importName:"postcssFontFormatKeywords"},{packageName:"postcss-font-variant",id:"font-variant-property",importName:"postcssFontVariant"},{packageName:"@csstools/postcss-gamut-mapping",id:"gamut-mapping",importName:"postcssGamutMapping"},{packageName:"postcss-gap-properties",id:"gap-properties",importName:"postcssGapProperties"},{packageName:"@csstools/postcss-gradients-interpolation-method",id:"gradients-interpolation-method",importName:"postcssGradientsInterpolationMethod"},{packageName:"@csstools/postcss-hwb-function",id:"hwb-function",importName:"postcssHWBFunction"},{packageName:"@csstools/postcss-ic-unit",id:"ic-unit",importName:"postcssICUnit"},{packageName:"postcss-image-set-function",id:"image-set-function",importName:"postcssImageSetFunction"},{packageName:"@csstools/postcss-initial",id:"all-property",importName:"postcssInitial"},{packageName:"@csstools/postcss-is-pseudo-class",id:"is-pseudo-class",importName:"postcssIsPseudoClass"},{packageName:"@csstools/postcss-scope-pseudo-class",id:"scope-pseudo-class",importName:"postcssScopePseudoClass"},{packageName:"postcss-lab-function",id:"lab-function",importName:"postcssLabFunction"},{packageName:"@csstools/postcss-light-dark-function",id:"light-dark-function",importName:"postcssLightDarkFunction"},{packageName:"postcss-logical",id:"logical-properties-and-values",importName:"postcssLogical"},{packageName:"@csstools/postcss-logical-float-and-clear",id:"float-clear-logical-values",importName:"postcssLogicalFloatAndClear"},{packageName:"@csstools/postcss-logical-overflow",id:"logical-overflow",importName:"postcssLogicalOverflow"},{packageName:"@csstools/postcss-logical-overscroll-behavior",id:"logical-overscroll-behavior",importName:"postcssLogicalOverscrollBehavor"},{packageName:"@csstools/postcss-logical-resize",id:"logical-resize",importName:"postcssLogicalResize"},{packageName:"@csstools/postcss-logical-viewport-units",id:"logical-viewport-units",importName:"postcssLogicalViewportUnits"},{packageName:"@csstools/postcss-media-minmax",id:"media-query-ranges",importName:"postcssMediaMinmax"},{packageName:"@csstools/postcss-media-queries-aspect-ratio-number-values",id:"media-queries-aspect-ratio-number-values",importName:"postcssMediaQueriesAspectRatioNumberValues"},{packageName:"postcss-nesting",id:"nesting-rules",importName:"postcssNesting"},{packageName:"@csstools/postcss-normalize-display-values",id:"display-two-values",importName:"postcssNormalizeDisplayValues"},{packageName:"@csstools/postcss-oklab-function",id:"oklab-function",importName:"postcssOKLabFunction"},{packageName:"@csstools/postcss-relative-color-syntax",id:"relative-color-syntax",importName:"postcssRelativeColorSyntax"},{packageName:"postcss-opacity-percentage",id:"opacity-percentage",importName:"postcssOpacityPercentage"},{packageName:"postcss-overflow-shorthand",id:"overflow-property",importName:"postcssOverflowShorthand"},{packageName:"postcss-page-break",id:"break-properties",importName:"postcssPageBreak"},{packageName:"postcss-place",id:"place-properties",importName:"postcssPlace"},{packageName:"postcss-pseudo-class-any-link",id:"any-link-pseudo-class",importName:"postcssPseudoClassAnyLink"},{packageName:"postcss-replace-overflow-wrap",id:"overflow-wrap-property",importName:"postcssReplaceOverflowWrap"},{packageName:"postcss-selector-not",id:"not-pseudo-class",importName:"postcssSelectorNot"},{packageName:"@csstools/postcss-stepped-value-functions",id:"stepped-value-functions",importName:"postcssSteppedValueFunctions"},{packageName:"postcss-system-ui-font-family",importedPackage:"../patch/postcss-system-ui-font-family.mjs",id:"system-ui-font-family",importName:"postcssFontFamilySystemUI"},{packageName:"@csstools/postcss-unset-value",id:"unset-value",importName:"postcssUnsetValue"},{packageName:"@csstools/postcss-cascade-layers",id:"cascade-layers",importName:"postcssCascadeLayers"},{packageName:"@csstools/postcss-trigonometric-functions",id:"trigonometric-functions",importName:"postcssTrigonometricFunctions"},{packageName:"@csstools/postcss-nested-calc",id:"nested-calc",importName:"postcssNestedCalc"},{packageName:"@csstools/postcss-text-decoration-shorthand",id:"text-decoration-shorthand",importName:"postcssTextDecorationShorthand"},{packageName:"@csstools/postcss-progressive-custom-properties",id:"progressive-custom-properties",importName:"postcssProgressiveCustomProperties",omitTypedOptions:!0,omitDocs:!0}];function getPackageNamesToIds(){const s={};return Os.forEach((o=>{s[o.packageName]=o.id})),s}function pluginIdHelp(s,o,e){const t=Os.map((s=>s.id)),i=Os.map((s=>s.packageName)),r=getPackageNamesToIds();s.forEach((s=>{if(t.includes(s))return;const a=[...t.map((o=>[o,levenshteinDistance(s,o)])),...i.map((o=>[r[o],levenshteinDistance(s,o)]))].sort(((s,o)=>s[1]-o[1])).filter((s=>s[1]<10)),c=new Set;for(let s=0;s<a.length&&(c.add(a[s][0]),!(c.size>=3));s++);if(!c.size)return void o.warn(e,`Unknown feature: "${s}", see the list of features https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/FEATURES.md`);let p='"';p+=Array.from(c).join('", "'),p+='"',o.warn(e,`Unknown feature: "${s}", did you mean one of: ${p}`)}))}function levenshteinDistance(s,o){if(!s.length)return o.length;if(!o.length)return s.length;const e=[];for(let t=0;t<=o.length;t++){e[t]=[t];for(let i=1;i<=s.length;i++)e[t][i]=0===t?i:Math.min(e[t-1][i]+1,e[t][i-1]+1,e[t-1][i-1]+(s[i-1]===o[t-1]?0:1))}return e[o.length][s.length]}const creator=e=>{const t=new Logger,i=Object(e),r=Object.keys(Object(i.features)),a=i.browsers?void 0:i.env,c=i.browsers,p=initializeSharedOptions(i),n=listFeatures(o,i,p,t),l=n.map((s=>s.plugin));!1!==i.autoprefixer&&l.push(s(Object.assign({env:a,overrideBrowserslist:c},i.autoprefixer))),logFeaturesList(n,i,t);const internalPlugin=()=>({postcssPlugin:"postcss-preset-env",OnceExit(s,{result:o}){pluginIdHelp(r,s,o),i.debug&&t.emitLogs(o),t.resetLogger()}});return internalPlugin.postcss=!0,{postcssPlugin:"postcss-preset-env",plugins:[...l,internalPlugin()]}};creator.postcss=!0;export{creator as default}; |
