From c06f7ee0a40255214c477e13d9b956a7e07c2900 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:05:55 +0800 Subject: postcss,(plugins): nanocss, postcss-preset-env --- .../postcss-color-rebeccapurple/CHANGELOG.md | 117 +++++++++++++++++++++ .../postcss-color-rebeccapurple/LICENSE.md | 18 ++++ node_modules/postcss-color-rebeccapurple/README.md | 89 ++++++++++++++++ .../dist/has-fallback-decl.d.ts | 2 + .../postcss-color-rebeccapurple/dist/index.cjs | 1 + .../postcss-color-rebeccapurple/dist/index.d.ts | 8 ++ .../postcss-color-rebeccapurple/dist/index.mjs | 1 + .../postcss-color-rebeccapurple/package.json | 102 ++++++++++++++++++ 8 files changed, 338 insertions(+) create mode 100644 node_modules/postcss-color-rebeccapurple/CHANGELOG.md create mode 100644 node_modules/postcss-color-rebeccapurple/LICENSE.md create mode 100644 node_modules/postcss-color-rebeccapurple/README.md create mode 100644 node_modules/postcss-color-rebeccapurple/dist/has-fallback-decl.d.ts create mode 100644 node_modules/postcss-color-rebeccapurple/dist/index.cjs create mode 100644 node_modules/postcss-color-rebeccapurple/dist/index.d.ts create mode 100644 node_modules/postcss-color-rebeccapurple/dist/index.mjs create mode 100644 node_modules/postcss-color-rebeccapurple/package.json (limited to 'node_modules/postcss-color-rebeccapurple') diff --git a/node_modules/postcss-color-rebeccapurple/CHANGELOG.md b/node_modules/postcss-color-rebeccapurple/CHANGELOG.md new file mode 100644 index 00000000..0662b615 --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/CHANGELOG.md @@ -0,0 +1,117 @@ +# Changes to PostCSS RebeccaPurple + +### 9.0.1 + +_September 18, 2023_ + +- Improve performance + +### 9.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/)) + +### 8.0.2 + +_February 6, 2023_ + +- Reduce the amount of duplicate fallback CSS. + +### 8.0.1 + +_January 28, 2023_ + +- Improve `types` declaration in `package.json` + +### 8.0.0 + +_January 24, 2023_ + +- Updated: Support for Node v14+ (major). + +### 7.1.1 + +_July 8, 2022_ + +- Fix case insensitive matching. + +### 7.1.0 + +_June 10, 2022_ + +- Added: TypeScript typings + +### 7.0.2 + +_January 2, 2022_ + +- Removed Sourcemaps from package tarball. +- Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121). + +### 7.0.1 + +_December 16, 2021_ + +- Changed: now uses `postcss-value-parser` for parsing. +- Updated: documentation + +### 7.0.0 + +_September 17, 2021_ + +- Updated: Support for PostCSS 8+ (major). +- Updated: Support for Node v12+ (major). + +### 6.0.0 + +_April 25, 2020_ + +- Updated: `postcss-values-parser` to 3.2.0 (major) + +## 5.0.0 (January 29, 2020) + +- Updated: Support for Node v10+ +- Updated: PostCSS Values Parser v3+ + +## 4.0.1 (September 18, 2018) + +- Updated: PostCSS Values Parser v2+ + +## 4.0.0 (September 17, 2018) + +- Updated: Support for PostCSS v7+ +- Updated: Support for Node v6+ + +## 3.1.0 (May 1, 2018) + +- Improve `rebeccapurple` pre-parse word detection +- Switched from `postcss-value-parser` to `postcss-values-parser` +- Bump `postcss` from `^6.0.1` to `^6.0.22` + +## 3.0.0 (May 1, 2017) + +- Added: compatibility with postcss v6.x + +## 2.0.1 (November 28, 2016) + +- Bump `color` dependency version +([postcss-cssnext/#327](https://github.com/MoOx/postcss-cssnext/issues/327) - @wtgtybhertgeghgtwtg). + +## 2.0.0 (September 8, 2015) + +- Added: compatibility with postcss v5.x +- Removed: compatiblity with postcss v4.x + +## 1.2.0 (August 13, 2015) + +- Added: compatibility with postcss v4.1.x +([#4](https://github.com/postcss/postcss-color-rebeccapurple/pull/4)) + +## 1.1.0 (November 25, 2014) + +- Enhanced exceptions + +## 1.0.0 (November 4, 2014) + +Initial release from [postcss-color](https://github.com/postcss/postcss-color) diff --git a/node_modules/postcss-color-rebeccapurple/LICENSE.md b/node_modules/postcss-color-rebeccapurple/LICENSE.md new file mode 100644 index 00000000..e8ae93b9 --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/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-color-rebeccapurple/README.md b/node_modules/postcss-color-rebeccapurple/README.md new file mode 100644 index 00000000..37cea591 --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/README.md @@ -0,0 +1,89 @@ +# PostCSS RebeccaPurple [PostCSS Logo][PostCSS] + +[npm version][npm-url] [CSS Standard Status][css-url] [Build Status][cli-url] [Discord][discord] + +```bash +npm install postcss-color-rebeccapurple --save-dev +``` + +[PostCSS RebeccaPurple] lets you use the `rebeccapurple` color keyword in CSS. + +```pcss +.heading { + color: rebeccapurple; +} + +/* becomes */ + +.heading { + color: #639; +} +``` + +## About the `rebeccapurple` keyword + +In 2014, Rebecca Alison Meyer, the daughter of [Eric A. Meyer](https://en.wikipedia.org/wiki/Eric_A._Meyer), an American web design consultant best known for his advocacy work on behalf of CSS, passed away of a brain tumor at six years of age. + +In her memory, the hex color `#663399` is named `rebeccapurple` and [added to the CSS Colors list](https://lists.w3.org/Archives/Public/www-style/2014Jun/0312.html). + +## Usage + +Add [PostCSS RebeccaPurple] to your project: + +```bash +npm install postcss postcss-color-rebeccapurple --save-dev +``` + +Use it as a [PostCSS] plugin: + +```js +const postcss = require('postcss'); +const postcssRebeccaPurple = require('postcss-color-rebeccapurple'); + +postcss([ + postcssRebeccaPurple(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +[PostCSS RebeccaPurple] runs in all Node environments, with special +instructions for: + +- [Node](INSTALL.md#node) +- [PostCSS CLI](INSTALL.md#postcss-cli) +- [PostCSS Load Config](INSTALL.md#postcss-load-config) +- [Webpack](INSTALL.md#webpack) +- [Next.js](INSTALL.md#nextjs) +- [Gulp](INSTALL.md#gulp) +- [Grunt](INSTALL.md#grunt) + +## Options + +### preserve + +The `preserve` option determines whether the original notation +is preserved. By default, it is not preserved. + +```js +postcssRebeccaPurple({ preserve: true }) +``` + +```pcss +.heading { + color: rebeccapurple; +} + +/* becomes */ + +.heading { + color: #639; + color: rebeccapurple; +} +``` + +[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test +[css-url]: https://cssdb.org/#rebeccapurple-color +[discord]: https://discord.gg/bUadyRwkJS +[npm-url]: https://www.npmjs.com/package/postcss-color-rebeccapurple + +[PostCSS]: https://github.com/postcss/postcss +[PostCSS RebeccaPurple]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-rebeccapurple diff --git a/node_modules/postcss-color-rebeccapurple/dist/has-fallback-decl.d.ts b/node_modules/postcss-color-rebeccapurple/dist/has-fallback-decl.d.ts new file mode 100644 index 00000000..d7ae8d89 --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/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-color-rebeccapurple/dist/index.cjs b/node_modules/postcss-color-rebeccapurple/dist/index.cjs new file mode 100644 index 00000000..cf85118f --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/dist/index.cjs @@ -0,0 +1 @@ +"use strict";var e=require("postcss-value-parser");function hasFallback(e){const r=e.parent;if(!r)return!1;const s=e.prop.toLowerCase(),t=r.index(e);for(let e=0;e{const o=Object.assign({preserve:!1},t);return{postcssPlugin:"postcss-color-rebeccapurple",Declaration(t){if(!r.test(t.value))return;if(hasFallback(t))return;const c=e(t.value);c.walk((e=>{"word"===e.type&&s.test(e.value)&&(e.value="#639")}));const a=String(c);a!==t.value&&(t.cloneBefore({value:a}),o.preserve||t.remove())}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/postcss-color-rebeccapurple/dist/index.d.ts b/node_modules/postcss-color-rebeccapurple/dist/index.d.ts new file mode 100644 index 00000000..2909bb92 --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/dist/index.d.ts @@ -0,0 +1,8 @@ +import type { PluginCreator } from 'postcss'; +/** postcss-color-rebeccapurple plugin options */ +export type pluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean; +}; +declare const creator: PluginCreator; +export default creator; diff --git a/node_modules/postcss-color-rebeccapurple/dist/index.mjs b/node_modules/postcss-color-rebeccapurple/dist/index.mjs new file mode 100644 index 00000000..af09c1fd --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/dist/index.mjs @@ -0,0 +1 @@ +import e from"postcss-value-parser";function hasFallback(e){const r=e.parent;if(!r)return!1;const t=e.prop.toLowerCase(),s=r.index(e);for(let e=0;e{const o=Object.assign({preserve:!1},s);return{postcssPlugin:"postcss-color-rebeccapurple",Declaration(s){if(!r.test(s.value))return;if(hasFallback(s))return;const a=e(s.value);a.walk((e=>{"word"===e.type&&t.test(e.value)&&(e.value="#639")}));const c=String(a);c!==s.value&&(s.cloneBefore({value:c}),o.preserve||s.remove())}}};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/postcss-color-rebeccapurple/package.json b/node_modules/postcss-color-rebeccapurple/package.json new file mode 100644 index 00000000..67a793ad --- /dev/null +++ b/node_modules/postcss-color-rebeccapurple/package.json @@ -0,0 +1,102 @@ +{ + "name": "postcss-color-rebeccapurple", + "description": "Use the rebeccapurple color keyword in CSS", + "version": "9.0.1", + "contributors": [ + { + "name": "Antonio Laguna", + "email": "antonio@laguna.es", + "url": "https://antonio.laguna.es" + }, + { + "name": "Romain Menke", + "email": "romainmenke@gmail.com" + }, + { + "name": "Jonathan Neal", + "email": "jonathantneal@hotmail.com" + }, + { + "name": "Maxime Thirouin" + } + ], + "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 && node ../../.github/bin/generate-docs/readme.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-color-rebeccapurple#readme", + "repository": { + "type": "git", + "url": "https://github.com/csstools/postcss-plugins.git", + "directory": "plugins/postcss-color-rebeccapurple" + }, + "bugs": "https://github.com/csstools/postcss-plugins/issues", + "keywords": [ + "becca", + "color", + "css", + "csswg", + "eric", + "meyer", + "postcss", + "postcss-plugin", + "purple", + "rebecca", + "rgb", + "syntax", + "w3c" + ], + "csstools": { + "cssdbId": "rebeccapurple-color", + "exportName": "postcssRebeccaPurple", + "humanReadableName": "PostCSS RebeccaPurple", + "specUrl": "https://www.w3.org/TR/css-color-4/#valdef-color-rebeccapurple" + }, + "volta": { + "extends": "../../package.json" + } +} -- cgit v1.2.3