diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 15:05:55 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 15:05:55 +0800 |
| commit | c06f7ee0a40255214c477e13d9b956a7e07c2900 (patch) | |
| tree | f5982a568ef8fab865d0142e71c7494fea3e4c1b /node_modules/postcss-image-set-function | |
| parent | 3fd9400d4dccc25aa29b5702216732e0b7542073 (diff) | |
postcss,(plugins): nanocss, postcss-preset-env
Diffstat (limited to 'node_modules/postcss-image-set-function')
13 files changed, 417 insertions, 0 deletions
diff --git a/node_modules/postcss-image-set-function/CHANGELOG.md b/node_modules/postcss-image-set-function/CHANGELOG.md new file mode 100644 index 00000000..fb2a5dae --- /dev/null +++ b/node_modules/postcss-image-set-function/CHANGELOG.md @@ -0,0 +1,110 @@ +# Changes to PostCSS image-set() Function + +### 6.0.1 + +_September 18, 2023_ + +- Improve performance + +### 6.0.0 + +_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 diff --git a/node_modules/postcss-image-set-function/LICENSE.md b/node_modules/postcss-image-set-function/LICENSE.md new file mode 100644 index 00000000..e8ae93b9 --- /dev/null +++ b/node_modules/postcss-image-set-function/LICENSE.md @@ -0,0 +1,18 @@ +MIT No Attribution (MIT-0) + +Copyright © CSSTools Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/postcss-image-set-function/README.md b/node_modules/postcss-image-set-function/README.md new file mode 100644 index 00000000..fd6dac24 --- /dev/null +++ b/node_modules/postcss-image-set-function/README.md @@ -0,0 +1,162 @@ +# PostCSS image-set() Function [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss] + +[![NPM Version][npm-img]][npm-url] +[![CSS Standard Status][css-img]][css-url] +[![Build Status][cli-img]][cli-url] +[<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord] + +[PostCSS image-set() Function] lets you display resolution-dependent images +using the `image-set()` function in CSS, following the [CSS Images] +specification. + +[](https://caniuse.com/#feat=css-image-set) + +```pcss +.example { + background-image: image-set( + url(img.png) 1x, + url(img@2x.png) 2x, + url(img@print.png) 600dpi + ); +} + +/* becomes */ + +.example { + background-image: url(img.png); +} + +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + .example { + background-image: url(img@2x.png); + } +} + + +@media (-webkit-min-device-pixel-ratio: 6.25), (min-resolution: 600dpi) { + .example { + background-image: url(my@print.png); + } +} + +.example { + background-image: image-set( + url(img.png) 1x, + url(img@2x.png) 2x, + url(img@print.png) 600dpi + ); +} +``` + +## Usage + +Add [PostCSS image-set() Function] to your project: + +```bash +npm install postcss-image-set-function --save-dev +``` + +Use [PostCSS image-set() Function] as a [PostCSS] plugin: + +```js +const postcss = require('postcss'); +const postcssImageSetFunction = require('postcss-image-set-function'); + +postcss([ + postcssImageSetFunction(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +[PostCSS image-set() Function] runs in all Node environments, with special +instructions for: + +| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) | +| --- | --- | --- | --- | --- | + +## Options + +### preserve + +The `preserve` option determines whether the original declaration using +`image-set()` is preserved. By default, it is preserved. + +```js +postcssImageSetFunction({ preserve: false }) +``` + +```pcss +.example { + background-image: image-set( + url(img.png) 1x, + url(img@2x.png) 2x, + url(img@print.png) 600dpi + ); +} + +/* becomes */ + +@media (-webkit-min-device-pixel-ratio: 1), (min-resolution: 96dpi) { + .example { + background-image: url(img.png); + } +} + +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + .example { + background-image: url(img@2x.png); + } +} + + +@media (-webkit-min-device-pixel-ratio: 6.25), (min-resolution: 600dpi) { + .example { + background-image: url(my@print.png); + } +} +``` + +### onInvalid + +The `onInvalid` option determines how invalid usage of `image-set()` should be +handled. By default, invalid usages of `image-set()` are ignored. +They can be configured to emit a warning with `warn` or throw an exception with `throw`. + +```js +postcssImageSetFunction({ onInvalid: 'warn' }) // warn on invalid usages +``` + +```js +postcssImageSetFunction({ onInvalid: 'throw' }) // throw on invalid usages +``` + +## Image Resolution + +The `image-set()` function allows an author to provide multiple resolutions of +an image and let the browser decide which is most appropriate in a given +situation. The `image-set()` also never fails to choose an image; the +`<resolution>` just helps determine which of the images is chosen. + +Since this plugin is not a browser, the image options are sorted by device +pixel ratio and the lowest ratio is used as the default, while the remaining +images are pushed behind media queries. + +Therefore, this plugin can only approximate native browser behavior. While +images should typically match the resolution as the device they’re being viewed +in, other factors can affect the chosen image. For example, if the user is on a +slow mobile connection, the browser may prefer to select a lower-res image +rather than wait for a larger, resolution-matching image to load. + +[cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg +[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test +[css-img]: https://cssdb.org/images/badges/image-set-function.svg +[css-url]: https://cssdb.org/#image-set-function +[discord]: https://discord.gg/bUadyRwkJS +[npm-img]: https://img.shields.io/npm/v/postcss-image-set-function.svg +[npm-url]: https://www.npmjs.com/package/postcss-image-set-function + +[CSS Images]: https://drafts.csswg.org/css-images-4/#image-set-notation +[Gulp PostCSS]: https://github.com/postcss/gulp-postcss +[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss +[PostCSS]: https://github.com/postcss/postcss +[PostCSS Loader]: https://github.com/postcss/postcss-loader +[PostCSS image-set() Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-set-function 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 new file mode 100644 index 00000000..d7ae8d89 --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/has-fallback-decl.d.ts @@ -0,0 +1,2 @@ +import type { Declaration } from 'postcss'; +export declare function hasFallback(node: Declaration): boolean; diff --git a/node_modules/postcss-image-set-function/dist/index.cjs b/node_modules/postcss-image-set-function/dist/index.cjs new file mode 100644 index 00000000..1d922e9b --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/index.cjs @@ -0,0 +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; diff --git a/node_modules/postcss-image-set-function/dist/index.d.ts b/node_modules/postcss-image-set-function/dist/index.d.ts new file mode 100644 index 00000000..f421c2d7 --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/index.d.ts @@ -0,0 +1,15 @@ +import type { PluginCreator } from 'postcss'; +/** postcss-image-set-function plugin options */ +export type pluginOptions = { + /** Preserve the original notation. default: true */ + preserve?: boolean; + /** + * Determine how invalid usage of `image-set()` should be handled. + * By default, invalid usages of `image-set()` are ignored. + * They can be configured to emit a warning with `warn` or throw an exception with `throw`. + * default: 'ignore' + */ + onInvalid?: 'warn' | 'throw' | 'ignore' | false; +}; +declare const creator: PluginCreator<pluginOptions>; +export default creator; diff --git a/node_modules/postcss-image-set-function/dist/index.mjs b/node_modules/postcss-image-set-function/dist/index.mjs new file mode 100644 index 00000000..bbd71a2e --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/index.mjs @@ -0,0 +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}; 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 new file mode 100644 index 00000000..77c82734 --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/lib/get-comma.d.ts @@ -0,0 +1,2 @@ +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 new file mode 100644 index 00000000..2a1a4d20 --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/lib/get-image.d.ts @@ -0,0 +1,2 @@ +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 new file mode 100644 index 00000000..324d4108 --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/lib/get-media.d.ts @@ -0,0 +1,4 @@ +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 new file mode 100644 index 00000000..13aad1b4 --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/lib/handle-invalidation.d.ts @@ -0,0 +1,6 @@ +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 new file mode 100644 index 00000000..76a38653 --- /dev/null +++ b/node_modules/postcss-image-set-function/dist/lib/process-image-set.d.ts @@ -0,0 +1,14 @@ +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 new file mode 100644 index 00000000..8536ac8e --- /dev/null +++ b/node_modules/postcss-image-set-function/package.json @@ -0,0 +1,80 @@ +{ + "name": "postcss-image-set-function", + "description": "Display resolution-dependent images using the image-set() function in CSS", + "version": "6.0.1", + "author": "Jonathan Neal <jonathantneal@hotmail.com>", + "license": "MIT-0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "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" + } + }, + "files": [ + "CHANGELOG.md", + "LICENSE.md", + "README.md", + "dist" + ], + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "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", + "url": "https://github.com/csstools/postcss-plugins.git", + "directory": "plugins/postcss-image-set-function" + }, + "bugs": "https://github.com/csstools/postcss-plugins/issues", + "keywords": [ + "background", + "css", + "image", + "image-set", + "negotiation", + "optimization", + "postcss", + "postcss-plugin", + "resolution", + "responsive" + ], + "csstools": { + "exportName": "postcssImageSetFunction", + "humanReadableName": "PostCSS image-set() Function" + }, + "volta": { + "extends": "../../package.json" + } +} |
