diff options
Diffstat (limited to 'node_modules/postcss-selector-not')
| -rw-r--r-- | node_modules/postcss-selector-not/CHANGELOG.md | 22 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/LICENSE.md | 20 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/README.md | 64 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/dist/index.cjs | 1 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/dist/index.d.ts | 9 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/dist/index.mjs | 1 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/package.json | 72 |
7 files changed, 0 insertions, 189 deletions
diff --git a/node_modules/postcss-selector-not/CHANGELOG.md b/node_modules/postcss-selector-not/CHANGELOG.md deleted file mode 100644 index 3897758f..00000000 --- a/node_modules/postcss-selector-not/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# Changes to PostCSS Selector Not - -### 7.0.2 - -_February 19, 2024_ - -- Fix type definitions - -### 7.0.1 - -_January 28, 2023_ - -- Improve `types` declaration in `package.json` - -### 7.0.0 - -_January 24, 2023_ - -- Updated: Support for Node v14+ (major). -- Fix: Do not throw when a selector is invalid, show a warning instead. - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-selector-not/CHANGELOG.md) diff --git a/node_modules/postcss-selector-not/LICENSE.md b/node_modules/postcss-selector-not/LICENSE.md deleted file mode 100644 index b75f6e61..00000000 --- a/node_modules/postcss-selector-not/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Maxime Thirouin - -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, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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-selector-not/README.md b/node_modules/postcss-selector-not/README.md deleted file mode 100644 index 8a1d0947..00000000 --- a/node_modules/postcss-selector-not/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# PostCSS Selector Not [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS] - -[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-selector-not.svg" height="20">][npm-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]<br><br>[<img alt="Baseline Status" src="https://cssdb.org/images/badges-baseline/not-pseudo-class.svg" height="20">][css-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/not-pseudo-class.svg" height="20">][css-url] - -```bash -npm install postcss-selector-not --save-dev -``` - -[PostCSS Selector Not] transforms :not() W3C CSS level 4 pseudo classes to :not() CSS level 3 selectors following the [Selectors 4 Specification]. - -```pcss -p:not(:first-child, .special) { - color: red; -} - -/* becomes */ - -p:not(:first-child):not(.special) { - color: red; -} -``` - -> [!CAUTION] -> Only lists of simple selectors (`:not(.a, .b)`) will work as expected. -> Complex selectors (`:not(.a > .b, .c ~ .d)`) can not be downgraded. - -## Usage - -Add [PostCSS Selector Not] to your project: - -```bash -npm install postcss postcss-selector-not --save-dev -``` - -Use it as a [PostCSS] plugin: - -```js -const postcss = require('postcss'); -const postcssSelectorNot = require('postcss-selector-not'); - -postcss([ - postcssSelectorNot(/* pluginOptions */) -]).process(YOUR_CSS /*, processOptions */); -``` - -[PostCSS Selector Not] 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) - -[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test -[css-url]: https://cssdb.org/#not-pseudo-class -[discord]: https://discord.gg/bUadyRwkJS -[npm-url]: https://www.npmjs.com/package/postcss-selector-not - -[PostCSS]: https://github.com/postcss/postcss -[PostCSS Selector Not]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-selector-not -[Selectors 4 Specification]: https://www.w3.org/TR/selectors-4/#negation-pseudo diff --git a/node_modules/postcss-selector-not/dist/index.cjs b/node_modules/postcss-selector-not/dist/index.cjs deleted file mode 100644 index fa5c279f..00000000 --- a/node_modules/postcss-selector-not/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var e=require("postcss-selector-parser");function cleanupWhitespace(e){e.spaces&&(e.spaces.after="",e.spaces.before=""),e.nodes&&e.nodes.length>0&&(e.nodes[0]&&e.nodes[0].spaces&&(e.nodes[0].spaces.before=""),e.nodes[e.nodes.length-1]&&e.nodes[e.nodes.length-1].spaces&&(e.nodes[e.nodes.length-1].spaces.after=""))}const creator=()=>({postcssPlugin:"postcss-selector-not",Rule:(s,{result:o})=>{if(s.selector&&s.selector.toLowerCase().includes(":not("))try{const o=e().astSync(s.selector);o.walkPseudos((s=>{if(":not"!==s.value.toLowerCase())return;if(!s.nodes||s.nodes.length<2)return;const o=[];s.nodes.forEach((s=>{cleanupWhitespace(s);const t=e.pseudo({value:":not",nodes:[s]});o.push(t)})),s.replaceWith(...o)}));const t=o.toString();t!==s.selector&&s.replaceWith(s.clone({selector:t}))}catch(e){s.warn(o,`Failed to parse selector : "${s.selector}" with message: "${e instanceof Error?e.message:e}"`)}}});creator.postcss=!0,module.exports=creator; diff --git a/node_modules/postcss-selector-not/dist/index.d.ts b/node_modules/postcss-selector-not/dist/index.d.ts deleted file mode 100644 index 9ecd7053..00000000 --- a/node_modules/postcss-selector-not/dist/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -declare const creator: PluginCreator<pluginOptions>; -export default creator; - -/** postcss-selector-not plugin options */ -export declare type pluginOptions = Record<string, never>; - -export { } diff --git a/node_modules/postcss-selector-not/dist/index.mjs b/node_modules/postcss-selector-not/dist/index.mjs deleted file mode 100644 index ffbe2ae7..00000000 --- a/node_modules/postcss-selector-not/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import e from"postcss-selector-parser";function cleanupWhitespace(e){e.spaces&&(e.spaces.after="",e.spaces.before=""),e.nodes&&e.nodes.length>0&&(e.nodes[0]&&e.nodes[0].spaces&&(e.nodes[0].spaces.before=""),e.nodes[e.nodes.length-1]&&e.nodes[e.nodes.length-1].spaces&&(e.nodes[e.nodes.length-1].spaces.after=""))}const creator=()=>({postcssPlugin:"postcss-selector-not",Rule:(s,{result:o})=>{if(s.selector&&s.selector.toLowerCase().includes(":not("))try{const o=e().astSync(s.selector);o.walkPseudos((s=>{if(":not"!==s.value.toLowerCase())return;if(!s.nodes||s.nodes.length<2)return;const o=[];s.nodes.forEach((s=>{cleanupWhitespace(s);const t=e.pseudo({value:":not",nodes:[s]});o.push(t)})),s.replaceWith(...o)}));const t=o.toString();t!==s.selector&&s.replaceWith(s.clone({selector:t}))}catch(e){s.warn(o,`Failed to parse selector : "${s.selector}" with message: "${e instanceof Error?e.message:e}"`)}}});creator.postcss=!0;export{creator as default}; diff --git a/node_modules/postcss-selector-not/package.json b/node_modules/postcss-selector-not/package.json deleted file mode 100644 index 728dd077..00000000 --- a/node_modules/postcss-selector-not/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "postcss-selector-not", - "description": "PostCSS plugin to transform :not() W3C CSS level 4 pseudo class to :not() CSS level 3 selectors", - "version": "7.0.2", - "contributors": [ - { - "name": "Antonio Laguna", - "email": "antonio@laguna.es", - "url": "https://antonio.laguna.es" - }, - { - "name": "Romain Menke", - "email": "romainmenke@gmail.com" - }, - { - "name": "Maxime Thirouin" - } - ], - "license": "MIT", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "engines": { - "node": "^14 || ^16 || >=18" - }, - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.mjs", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.mjs" - }, - "require": { - "default": "./dist/index.cjs" - } - } - }, - "files": [ - "CHANGELOG.md", - "LICENSE.md", - "README.md", - "dist" - ], - "dependencies": { - "postcss-selector-parser": "^6.0.13" - }, - "peerDependencies": { - "postcss": "^8.4" - }, - "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-selector-not#readme", - "repository": { - "type": "git", - "url": "https://github.com/csstools/postcss-plugins.git", - "directory": "plugins/postcss-selector-not" - }, - "bugs": "https://github.com/csstools/postcss-plugins/issues", - "keywords": [ - "Not", - "postcss", - "postcss-plugin", - "selector" - ] -} |
