summaryrefslogtreecommitdiff
path: root/node_modules/postcss-image-set-function
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/postcss-image-set-function')
-rw-r--r--node_modules/postcss-image-set-function/CHANGELOG.md103
-rw-r--r--node_modules/postcss-image-set-function/dist/has-fallback-decl.d.ts2
-rw-r--r--node_modules/postcss-image-set-function/dist/index.cjs2
-rw-r--r--node_modules/postcss-image-set-function/dist/index.d.ts10
-rw-r--r--node_modules/postcss-image-set-function/dist/index.mjs2
-rw-r--r--node_modules/postcss-image-set-function/dist/lib/get-comma.d.ts2
-rw-r--r--node_modules/postcss-image-set-function/dist/lib/get-image.d.ts2
-rw-r--r--node_modules/postcss-image-set-function/dist/lib/get-media.d.ts4
-rw-r--r--node_modules/postcss-image-set-function/dist/lib/handle-invalidation.d.ts6
-rw-r--r--node_modules/postcss-image-set-function/dist/lib/process-image-set.d.ts14
-rw-r--r--node_modules/postcss-image-set-function/package.json35
11 files changed, 26 insertions, 156 deletions
diff --git a/node_modules/postcss-image-set-function/CHANGELOG.md b/node_modules/postcss-image-set-function/CHANGELOG.md
index fb2a5dae..7c124a52 100644
--- a/node_modules/postcss-image-set-function/CHANGELOG.md
+++ b/node_modules/postcss-image-set-function/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changes to PostCSS image-set() Function
+### 6.0.2
+
+_December 15, 2023_
+
+- Fix type definitions
+
### 6.0.1
_September 18, 2023_
@@ -12,99 +18,4 @@ _July 3, 2023_
- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/))
-### 5.0.2
-
-_February 8, 2023_
-
-- Reduce the amount of duplicate fallback CSS.
-
-### 5.0.1
-
-_January 28, 2023_
-
-- Improve `types` declaration in `package.json`
-
-### 5.0.0
-
-_January 24, 2023_
-
-- Updated: Support for Node v14+ (major).
-- Changed: `oninvalid` plugin option to `onInvalid` to match other plugins with similar options (breaking).
-
-### 4.0.7
-
-_July 8, 2022_
-
-- Fix case insensitive matching.
-
-### 4.0.6
-
-_February 5, 2022_
-
-- Improved `es module` and `commonjs` compatibility
-
-### 4.0.5
-
-_January 31, 2022_
-
-- Fix sourcemaps for `image-set()` function
-
-### 4.0.4
-
-_January 2, 2022_
-
-- Removed Sourcemaps from package tarball.
-- Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121).
-
-### 4.0.3
-
-_December 13, 2021_
-
-- Changed: now uses `postcss-value-parser` for parsing.
-- Updated: documentation
-- Added: support for lists of `image-set` functions.
-- Fixed: `url` function is now always added around string values in `image-set` functions.
-
-### 4.0.2
-
-_November 19, 2021_
-
-- Updated: `postcss-value-parser` to 6.0.1 (patch)
-
-### 4.0.1
-
-_November 18, 2021_
-
-- Added: Safeguards against postcss-values-parser potentially throwing an error.
-
-### 4.0.0
-
-_September 17, 2021_
-
-- Updated: Support for PostCS 8+ (major).
-- Updated: Support for Node 12+ (major).
-
-### 3.0.1
-
-_September 18, 2018_
-
-- Updated: PostCSS Values Parser 2
-
-### 3.0.0
-
-_September 17, 2018_
-
-- Updated: Support for PostCSS 7+
-- Updated: Support for Node 6+
-
-### 2.0.0
-
-_May 7, 2018_
-
-- Sort images by DPR and use the lowest as the default
-
-### 1.0.0
-
-_May 2, 2018_
-
-- Initial version
+[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-set-function/CHANGELOG.md)
diff --git a/node_modules/postcss-image-set-function/dist/has-fallback-decl.d.ts b/node_modules/postcss-image-set-function/dist/has-fallback-decl.d.ts
deleted file mode 100644
index d7ae8d89..00000000
--- a/node_modules/postcss-image-set-function/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/postcss-image-set-function/dist/index.cjs b/node_modules/postcss-image-set-function/dist/index.cjs
index 1d922e9b..7849651e 100644
--- a/node_modules/postcss-image-set-function/dist/index.cjs
+++ b/node_modules/postcss-image-set-function/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e=require("postcss-value-parser");const t=/^(cross-fade|image|(repeating-)?(conic|linear|radial)-gradient|url|var)$/i;function getImage(n){return!(!n||!n.type)&&("string"===n.type?"url("+e.stringify(n)+")":!("function"!==n.type||!t.test(n.value.toLowerCase()))&&e.stringify(n))}const n=new Map([["dpcm",2.54],["dpi",1],["dppx",96],["x",96]]);function getMedia(e,t,n){if("boolean"==typeof e)return!1;const r=Math.floor(e/96*100)/100;return t.atRule({name:"media",params:`(-webkit-min-device-pixel-ratio: ${r}), (min-resolution: ${e}dpi)`,source:n.source})}function getMediaDPI(t){if(!t)return!1;if("word"!==t.type)return!1;if(!isNumericNode(t))return!1;const r=e.unit(t.value);if(!r)return!1;const i=n.get(r.unit.toLowerCase());return!!i&&Number(r.number)*i}function isNumericNode(t){if(!t||!t.value)return!1;try{return!1!==e.unit(t.value)}catch(e){return!1}}const handleInvalidation=(e,t,n)=>{if("warn"===e.oninvalid)e.decl.warn(e.result,t,{word:String(n)});else if("throw"===e.oninvalid)throw e.decl.error(t,{word:String(n)})},processImageSet=(t,n,r)=>{const i=n.parent;if(!i)return;const o=new Map,s=n.value;for(let i=0;i<t.length;i++){const{imageSetFunction:l,imageSetOptionNodes:u}=t[i],c=new Map,d=u.length;let p=-1;for(;p<d;){const t=p<0||(a=u[p],"div"===Object(a).type&&","===Object(a).value),i=getImage(u[p+1]),d=getMediaDPI(u[p+2]),f=getMedia(d,r.postcss,n);if(!t)return void handleInvalidation(r,"expected a comma",e.stringify(u));if(!i)return void handleInvalidation(r,"unexpected image",e.stringify(u));if(!f||!d||c.has(d))return void handleInvalidation(r,"unexpected resolution",e.stringify(u));if(c.set(d,f),o.has(d)){const t=o.get(d);t.value=t.value.replace(e.stringify(l),i.trim()),o.set(d,t)}else o.set(d,{atRule:f,value:s.replace(e.stringify(l),i.trim())});p+=3}}var a;for(const{atRule:e,value:t}of o.values()){const r=i.clone().removeAll(),o=n.clone({value:t});r.append(o),e.append(r)}const l=Array.from(o.keys()).sort(((e,t)=>e-t)).map((e=>{var t;return null==(t=o.get(e))?void 0:t.atRule})).filter((e=>!!e));if(!l.length)return;const u=l[0],c=l.slice(1);c.length&&i.after(c);const d=u.nodes[0].nodes[0];n.cloneBefore({value:d.value.trim()}),r.preserve||(n.remove(),i.nodes.length||i.remove())};function hasFallback(e){const t=e.parent;if(!t)return!1;const n=e.prop.toLowerCase(),r=t.index(e);for(let e=0;e<r;e++){const r=t.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===n)return!0}return!1}const r=/(^|[^\w-])(-webkit-)?image-set\(/i,i=/^(-webkit-)?image-set$/i,creator=t=>{const n=!("preserve"in Object(t))||Boolean(null==t?void 0:t.preserve),o="onInvalid"in Object(t)?null==t?void 0:t.onInvalid:"ignore";if("oninvalid"in Object(t))throw new Error('"oninvalid" was changed to "onInvalid" to match other plugins with similar options');return{postcssPlugin:"postcss-image-set-function",Declaration(t,{result:s,postcss:a}){const l=t.value;if(!r.test(l))return;if(hasFallback(t))return;let u;try{u=e(l)}catch(e){t.warn(s,`Failed to parse value '${l}' as an image-set function. Leaving the original value intact.`)}if(void 0===u)return;const c=[];u.walk((n=>{if("function"!==n.type)return;if(!i.test(n.value))return;let r=!1;if(e.walk(n.nodes,(e=>{"function"===e.type&&i.test(e.value)&&(r=!0)})),r)return handleInvalidation({decl:t,oninvalid:o,result:s},"nested image-set functions are not allowed",e.stringify(n)),!1;const a=n.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));c.push({imageSetFunction:n,imageSetOptionNodes:a})})),processImageSet(c,t,{decl:t,oninvalid:o,preserve:n,result:s,postcss:a})}}};creator.postcss=!0,module.exports=creator;
+"use strict";var e=require("postcss-value-parser");const t=/^(cross-fade|image|(repeating-)?(conic|linear|radial)-gradient|url|var)$/i;function getImage(n){return!(!n||!n.type)&&("string"===n.type?"url("+e.stringify(n)+")":!("function"!==n.type||!t.test(n.value.toLowerCase()))&&e.stringify(n))}const n=new Map([["dpcm",2.54],["dpi",1],["dppx",96],["x",96]]);function getMedia(e,t,n){if("boolean"==typeof e)return!1;const r=Math.floor(e/96*100)/100;return t.atRule({name:"media",params:`(-webkit-min-device-pixel-ratio: ${r}), (min-resolution: ${e}dpi)`,source:n.source})}function getMediaDPI(t){if(!t)return!1;if("word"!==t.type)return!1;if(!isNumericNode(t))return!1;const r=e.unit(t.value);if(!r)return!1;const i=n.get(r.unit.toLowerCase());return!!i&&Number(r.number)*i}function isNumericNode(t){if(!t||!t.value)return!1;try{return!1!==e.unit(t.value)}catch(e){return!1}}const handleInvalidation=(e,t,n)=>{if("warn"===e.oninvalid)e.decl.warn(e.result,t,{word:String(n)});else if("throw"===e.oninvalid)throw e.decl.error(t,{word:String(n)})},processImageSet=(t,n,r)=>{const i=n.parent;if(!i)return;const o=new Map,s=n.value;for(let i=0;i<t.length;i++){const{imageSetFunction:l,imageSetOptionNodes:u}=t[i],c=new Map,p=u.length;let d=-1;for(;d<p;){const t=d<0||(a=u[d],"div"===Object(a).type&&","===Object(a).value),i=getImage(u[d+1]),p=getMediaDPI(u[d+2]),f=getMedia(p,r.postcss,n);if(!t)return void handleInvalidation(r,"expected a comma",e.stringify(u));if(!i)return void handleInvalidation(r,"unexpected image",e.stringify(u));if(!f||!p||c.has(p))return void handleInvalidation(r,"unexpected resolution",e.stringify(u));if(c.set(p,f),o.has(p)){const t=o.get(p);t.value=t.value.replace(e.stringify(l),i.trim()),o.set(p,t)}else o.set(p,{atRule:f,value:s.replace(e.stringify(l),i.trim())});d+=3}}var a;for(const{atRule:e,value:t}of o.values()){const r=i.clone().removeAll(),o=n.clone({value:t});r.append(o),e.append(r)}const l=Array.from(o.keys()).sort(((e,t)=>e-t)).map((e=>o.get(e)?.atRule)).filter((e=>!!e));if(!l.length)return;const u=l[0],c=l.slice(1);c.length&&i.after(c);const p=u.nodes[0].nodes[0];n.cloneBefore({value:p.value.trim()}),r.preserve||(n.remove(),i.nodes.length||i.remove())};function hasFallback(e){const t=e.parent;if(!t)return!1;const n=e.prop.toLowerCase(),r=t.index(e);for(let e=0;e<r;e++){const r=t.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===n)return!0}return!1}const r=/(^|[^\w-])(-webkit-)?image-set\(/i,i=/^(-webkit-)?image-set$/i,creator=t=>{const n=!("preserve"in Object(t))||Boolean(t?.preserve),o="onInvalid"in Object(t)?t?.onInvalid:"ignore";if("oninvalid"in Object(t))throw new Error('"oninvalid" was changed to "onInvalid" to match other plugins with similar options');return{postcssPlugin:"postcss-image-set-function",Declaration(t,{result:s,postcss:a}){const l=t.value;if(!r.test(l))return;if(hasFallback(t))return;let u;try{u=e(l)}catch(e){t.warn(s,`Failed to parse value '${l}' as an image-set function. Leaving the original value intact.`)}if(void 0===u)return;const c=[];u.walk((n=>{if("function"!==n.type)return;if(!i.test(n.value))return;let r=!1;if(e.walk(n.nodes,(e=>{"function"===e.type&&i.test(e.value)&&(r=!0)})),r)return handleInvalidation({decl:t,oninvalid:o,result:s},"nested image-set functions are not allowed",e.stringify(n)),!1;const a=n.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));c.push({imageSetFunction:n,imageSetOptionNodes:a})})),processImageSet(c,t,{decl:t,oninvalid:o,preserve:n,result:s,postcss:a})}}};creator.postcss=!0,module.exports=creator;
diff --git a/node_modules/postcss-image-set-function/dist/index.d.ts b/node_modules/postcss-image-set-function/dist/index.d.ts
index f421c2d7..5eb630f7 100644
--- a/node_modules/postcss-image-set-function/dist/index.d.ts
+++ b/node_modules/postcss-image-set-function/dist/index.d.ts
@@ -1,6 +1,10 @@
import type { PluginCreator } from 'postcss';
+
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
+
/** postcss-image-set-function plugin options */
-export type pluginOptions = {
+export declare type pluginOptions = {
/** Preserve the original notation. default: true */
preserve?: boolean;
/**
@@ -11,5 +15,5 @@ export type pluginOptions = {
*/
onInvalid?: 'warn' | 'throw' | 'ignore' | false;
};
-declare const creator: PluginCreator<pluginOptions>;
-export default creator;
+
+export { }
diff --git a/node_modules/postcss-image-set-function/dist/index.mjs b/node_modules/postcss-image-set-function/dist/index.mjs
index bbd71a2e..10bb7b06 100644
--- a/node_modules/postcss-image-set-function/dist/index.mjs
+++ b/node_modules/postcss-image-set-function/dist/index.mjs
@@ -1 +1 @@
-import e from"postcss-value-parser";const t=/^(cross-fade|image|(repeating-)?(conic|linear|radial)-gradient|url|var)$/i;function getImage(n){return!(!n||!n.type)&&("string"===n.type?"url("+e.stringify(n)+")":!("function"!==n.type||!t.test(n.value.toLowerCase()))&&e.stringify(n))}const n=new Map([["dpcm",2.54],["dpi",1],["dppx",96],["x",96]]);function getMedia(e,t,n){if("boolean"==typeof e)return!1;const r=Math.floor(e/96*100)/100;return t.atRule({name:"media",params:`(-webkit-min-device-pixel-ratio: ${r}), (min-resolution: ${e}dpi)`,source:n.source})}function getMediaDPI(t){if(!t)return!1;if("word"!==t.type)return!1;if(!isNumericNode(t))return!1;const r=e.unit(t.value);if(!r)return!1;const i=n.get(r.unit.toLowerCase());return!!i&&Number(r.number)*i}function isNumericNode(t){if(!t||!t.value)return!1;try{return!1!==e.unit(t.value)}catch(e){return!1}}const handleInvalidation=(e,t,n)=>{if("warn"===e.oninvalid)e.decl.warn(e.result,t,{word:String(n)});else if("throw"===e.oninvalid)throw e.decl.error(t,{word:String(n)})},processImageSet=(t,n,r)=>{const i=n.parent;if(!i)return;const o=new Map,a=n.value;for(let i=0;i<t.length;i++){const{imageSetFunction:l,imageSetOptionNodes:u}=t[i],c=new Map,d=u.length;let p=-1;for(;p<d;){const t=p<0||(s=u[p],"div"===Object(s).type&&","===Object(s).value),i=getImage(u[p+1]),d=getMediaDPI(u[p+2]),f=getMedia(d,r.postcss,n);if(!t)return void handleInvalidation(r,"expected a comma",e.stringify(u));if(!i)return void handleInvalidation(r,"unexpected image",e.stringify(u));if(!f||!d||c.has(d))return void handleInvalidation(r,"unexpected resolution",e.stringify(u));if(c.set(d,f),o.has(d)){const t=o.get(d);t.value=t.value.replace(e.stringify(l),i.trim()),o.set(d,t)}else o.set(d,{atRule:f,value:a.replace(e.stringify(l),i.trim())});p+=3}}var s;for(const{atRule:e,value:t}of o.values()){const r=i.clone().removeAll(),o=n.clone({value:t});r.append(o),e.append(r)}const l=Array.from(o.keys()).sort(((e,t)=>e-t)).map((e=>{var t;return null==(t=o.get(e))?void 0:t.atRule})).filter((e=>!!e));if(!l.length)return;const u=l[0],c=l.slice(1);c.length&&i.after(c);const d=u.nodes[0].nodes[0];n.cloneBefore({value:d.value.trim()}),r.preserve||(n.remove(),i.nodes.length||i.remove())};function hasFallback(e){const t=e.parent;if(!t)return!1;const n=e.prop.toLowerCase(),r=t.index(e);for(let e=0;e<r;e++){const r=t.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===n)return!0}return!1}const r=/(^|[^\w-])(-webkit-)?image-set\(/i,i=/^(-webkit-)?image-set$/i,creator=t=>{const n=!("preserve"in Object(t))||Boolean(null==t?void 0:t.preserve),o="onInvalid"in Object(t)?null==t?void 0:t.onInvalid:"ignore";if("oninvalid"in Object(t))throw new Error('"oninvalid" was changed to "onInvalid" to match other plugins with similar options');return{postcssPlugin:"postcss-image-set-function",Declaration(t,{result:a,postcss:s}){const l=t.value;if(!r.test(l))return;if(hasFallback(t))return;let u;try{u=e(l)}catch(e){t.warn(a,`Failed to parse value '${l}' as an image-set function. Leaving the original value intact.`)}if(void 0===u)return;const c=[];u.walk((n=>{if("function"!==n.type)return;if(!i.test(n.value))return;let r=!1;if(e.walk(n.nodes,(e=>{"function"===e.type&&i.test(e.value)&&(r=!0)})),r)return handleInvalidation({decl:t,oninvalid:o,result:a},"nested image-set functions are not allowed",e.stringify(n)),!1;const s=n.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));c.push({imageSetFunction:n,imageSetOptionNodes:s})})),processImageSet(c,t,{decl:t,oninvalid:o,preserve:n,result:a,postcss:s})}}};creator.postcss=!0;export{creator as default};
+import e from"postcss-value-parser";const t=/^(cross-fade|image|(repeating-)?(conic|linear|radial)-gradient|url|var)$/i;function getImage(n){return!(!n||!n.type)&&("string"===n.type?"url("+e.stringify(n)+")":!("function"!==n.type||!t.test(n.value.toLowerCase()))&&e.stringify(n))}const n=new Map([["dpcm",2.54],["dpi",1],["dppx",96],["x",96]]);function getMedia(e,t,n){if("boolean"==typeof e)return!1;const r=Math.floor(e/96*100)/100;return t.atRule({name:"media",params:`(-webkit-min-device-pixel-ratio: ${r}), (min-resolution: ${e}dpi)`,source:n.source})}function getMediaDPI(t){if(!t)return!1;if("word"!==t.type)return!1;if(!isNumericNode(t))return!1;const r=e.unit(t.value);if(!r)return!1;const i=n.get(r.unit.toLowerCase());return!!i&&Number(r.number)*i}function isNumericNode(t){if(!t||!t.value)return!1;try{return!1!==e.unit(t.value)}catch(e){return!1}}const handleInvalidation=(e,t,n)=>{if("warn"===e.oninvalid)e.decl.warn(e.result,t,{word:String(n)});else if("throw"===e.oninvalid)throw e.decl.error(t,{word:String(n)})},processImageSet=(t,n,r)=>{const i=n.parent;if(!i)return;const o=new Map,a=n.value;for(let i=0;i<t.length;i++){const{imageSetFunction:l,imageSetOptionNodes:u}=t[i],c=new Map,p=u.length;let f=-1;for(;f<p;){const t=f<0||(s=u[f],"div"===Object(s).type&&","===Object(s).value),i=getImage(u[f+1]),p=getMediaDPI(u[f+2]),d=getMedia(p,r.postcss,n);if(!t)return void handleInvalidation(r,"expected a comma",e.stringify(u));if(!i)return void handleInvalidation(r,"unexpected image",e.stringify(u));if(!d||!p||c.has(p))return void handleInvalidation(r,"unexpected resolution",e.stringify(u));if(c.set(p,d),o.has(p)){const t=o.get(p);t.value=t.value.replace(e.stringify(l),i.trim()),o.set(p,t)}else o.set(p,{atRule:d,value:a.replace(e.stringify(l),i.trim())});f+=3}}var s;for(const{atRule:e,value:t}of o.values()){const r=i.clone().removeAll(),o=n.clone({value:t});r.append(o),e.append(r)}const l=Array.from(o.keys()).sort(((e,t)=>e-t)).map((e=>o.get(e)?.atRule)).filter((e=>!!e));if(!l.length)return;const u=l[0],c=l.slice(1);c.length&&i.after(c);const p=u.nodes[0].nodes[0];n.cloneBefore({value:p.value.trim()}),r.preserve||(n.remove(),i.nodes.length||i.remove())};function hasFallback(e){const t=e.parent;if(!t)return!1;const n=e.prop.toLowerCase(),r=t.index(e);for(let e=0;e<r;e++){const r=t.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===n)return!0}return!1}const r=/(^|[^\w-])(-webkit-)?image-set\(/i,i=/^(-webkit-)?image-set$/i,creator=t=>{const n=!("preserve"in Object(t))||Boolean(t?.preserve),o="onInvalid"in Object(t)?t?.onInvalid:"ignore";if("oninvalid"in Object(t))throw new Error('"oninvalid" was changed to "onInvalid" to match other plugins with similar options');return{postcssPlugin:"postcss-image-set-function",Declaration(t,{result:a,postcss:s}){const l=t.value;if(!r.test(l))return;if(hasFallback(t))return;let u;try{u=e(l)}catch(e){t.warn(a,`Failed to parse value '${l}' as an image-set function. Leaving the original value intact.`)}if(void 0===u)return;const c=[];u.walk((n=>{if("function"!==n.type)return;if(!i.test(n.value))return;let r=!1;if(e.walk(n.nodes,(e=>{"function"===e.type&&i.test(e.value)&&(r=!0)})),r)return handleInvalidation({decl:t,oninvalid:o,result:a},"nested image-set functions are not allowed",e.stringify(n)),!1;const s=n.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));c.push({imageSetFunction:n,imageSetOptionNodes:s})})),processImageSet(c,t,{decl:t,oninvalid:o,preserve:n,result:a,postcss:s})}}};creator.postcss=!0;export{creator as default};
diff --git a/node_modules/postcss-image-set-function/dist/lib/get-comma.d.ts b/node_modules/postcss-image-set-function/dist/lib/get-comma.d.ts
deleted file mode 100644
index 77c82734..00000000
--- a/node_modules/postcss-image-set-function/dist/lib/get-comma.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import valueParser from 'postcss-value-parser';
-export declare function getComma(node: valueParser.Node): boolean;
diff --git a/node_modules/postcss-image-set-function/dist/lib/get-image.d.ts b/node_modules/postcss-image-set-function/dist/lib/get-image.d.ts
deleted file mode 100644
index 2a1a4d20..00000000
--- a/node_modules/postcss-image-set-function/dist/lib/get-image.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import valueParser from 'postcss-value-parser';
-export declare function getImage(node: valueParser.Node): string | false;
diff --git a/node_modules/postcss-image-set-function/dist/lib/get-media.d.ts b/node_modules/postcss-image-set-function/dist/lib/get-media.d.ts
deleted file mode 100644
index 324d4108..00000000
--- a/node_modules/postcss-image-set-function/dist/lib/get-media.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import type { Declaration, Postcss } from 'postcss';
-import type { Node } from 'postcss-value-parser';
-export declare function getMedia(dpi: number | false, postcss: Postcss, decl: Declaration): false | import("postcss/lib/at-rule").default;
-export declare function getMediaDPI(node: Node): number | false;
diff --git a/node_modules/postcss-image-set-function/dist/lib/handle-invalidation.d.ts b/node_modules/postcss-image-set-function/dist/lib/handle-invalidation.d.ts
deleted file mode 100644
index 13aad1b4..00000000
--- a/node_modules/postcss-image-set-function/dist/lib/handle-invalidation.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import type { Declaration, Result } from 'postcss';
-export declare const handleInvalidation: (opts: {
- oninvalid: 'warn' | 'throw' | unknown;
- decl: Declaration;
- result: Result;
-}, message: string, word: string) => void;
diff --git a/node_modules/postcss-image-set-function/dist/lib/process-image-set.d.ts b/node_modules/postcss-image-set-function/dist/lib/process-image-set.d.ts
deleted file mode 100644
index 76a38653..00000000
--- a/node_modules/postcss-image-set-function/dist/lib/process-image-set.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { Declaration, Result, Postcss } from 'postcss';
-import type { Node } from 'postcss-value-parser';
-type imageSetFunction = {
- imageSetFunction: Node;
- imageSetOptionNodes: Array<Node>;
-};
-export declare const processImageSet: (imageSetFunctions: Array<imageSetFunction>, decl: Declaration, opts: {
- decl: Declaration;
- oninvalid: 'warn' | 'throw' | 'ignore' | false | undefined;
- preserve: boolean;
- result: Result;
- postcss: Postcss;
-}) => void;
-export {};
diff --git a/node_modules/postcss-image-set-function/package.json b/node_modules/postcss-image-set-function/package.json
index 8536ac8e..2f3b29dc 100644
--- a/node_modules/postcss-image-set-function/package.json
+++ b/node_modules/postcss-image-set-function/package.json
@@ -1,7 +1,7 @@
{
"name": "postcss-image-set-function",
"description": "Display resolution-dependent images using the image-set() function in CSS",
- "version": "6.0.1",
+ "version": "6.0.2",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "MIT-0",
"funding": [
@@ -17,15 +17,18 @@
"engines": {
"node": "^14 || ^16 || >=18"
},
+ "type": "module",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
"exports": {
".": {
- "types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.cjs",
- "default": "./dist/index.mjs"
+ "import": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.mjs"
+ },
+ "require": {
+ "default": "./dist/index.cjs"
+ }
}
},
"files": [
@@ -40,17 +43,6 @@
"peerDependencies": {
"postcss": "^8.4"
},
- "devDependencies": {
- "@csstools/postcss-tape": "*"
- },
- "scripts": {
- "build": "rollup -c ../../rollup/default.mjs",
- "docs": "node ../../.github/bin/generate-docs/install.mjs",
- "lint": "node ../../.github/bin/format-package-json.mjs",
- "prepublishOnly": "npm run build && npm run test",
- "test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs",
- "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
- },
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-set-function#readme",
"repository": {
"type": "git",
@@ -69,12 +61,5 @@
"postcss-plugin",
"resolution",
"responsive"
- ],
- "csstools": {
- "exportName": "postcssImageSetFunction",
- "humanReadableName": "PostCSS image-set() Function"
- },
- "volta": {
- "extends": "../../package.json"
- }
+ ]
}