From fc87c009806dcc98867f6b58efe29b042aa01dee Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 May 2026 23:10:59 +0800 Subject: node: update --- node_modules/postcss-dir-pseudo-class/CHANGELOG.md | 21 --- node_modules/postcss-dir-pseudo-class/LICENSE.md | 18 -- node_modules/postcss-dir-pseudo-class/README.md | 206 --------------------- .../postcss-dir-pseudo-class/dist/index.cjs | 1 - .../postcss-dir-pseudo-class/dist/index.d.ts | 16 -- .../postcss-dir-pseudo-class/dist/index.mjs | 1 - node_modules/postcss-dir-pseudo-class/package.json | 83 --------- 7 files changed, 346 deletions(-) delete mode 100644 node_modules/postcss-dir-pseudo-class/CHANGELOG.md delete mode 100644 node_modules/postcss-dir-pseudo-class/LICENSE.md delete mode 100644 node_modules/postcss-dir-pseudo-class/README.md delete mode 100644 node_modules/postcss-dir-pseudo-class/dist/index.cjs delete mode 100644 node_modules/postcss-dir-pseudo-class/dist/index.d.ts delete mode 100644 node_modules/postcss-dir-pseudo-class/dist/index.mjs delete mode 100644 node_modules/postcss-dir-pseudo-class/package.json (limited to 'node_modules/postcss-dir-pseudo-class') diff --git a/node_modules/postcss-dir-pseudo-class/CHANGELOG.md b/node_modules/postcss-dir-pseudo-class/CHANGELOG.md deleted file mode 100644 index 36c4865c..00000000 --- a/node_modules/postcss-dir-pseudo-class/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changes to PostCSS Dir Pseudo Class - -### 8.0.1 - -_December 15, 2023_ - -- Fix type definitions - -### 8.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/)) - -### 7.0.2 - -_February 6, 2023_ - -- Reduce the amount of duplicate fallback CSS. - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-dir-pseudo-class/CHANGELOG.md) diff --git a/node_modules/postcss-dir-pseudo-class/LICENSE.md b/node_modules/postcss-dir-pseudo-class/LICENSE.md deleted file mode 100644 index e8ae93b9..00000000 --- a/node_modules/postcss-dir-pseudo-class/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -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-dir-pseudo-class/README.md b/node_modules/postcss-dir-pseudo-class/README.md deleted file mode 100644 index 0386a753..00000000 --- a/node_modules/postcss-dir-pseudo-class/README.md +++ /dev/null @@ -1,206 +0,0 @@ -# PostCSS Dir Pseudo Class [PostCSS Logo][PostCSS] - -[npm version][npm-url] [CSS Standard Status][css-url] [Build Status][cli-url] [Discord][discord] - -```bash -npm install postcss-dir-pseudo-class --save-dev -``` - -[PostCSS Dir Pseudo Class] lets you style by directionality using the `:dir()` -pseudo-class in CSS, following the [Selectors] specification. - -```pcss -article h3:dir(rtl) { - margin-right: 10px; -} - -article h3:dir(ltr) { - margin-left: 10px; -} - -/* becomes */ - -[dir="rtl"] article h3 { - margin-right: 10px; -} - -[dir="ltr"] article h3 { - margin-left: 10px; -} -``` - -### Maintaining Specificity - -Using [PostCSS Dir Pseudo Class] will not impact selector weight, but it will -require having at least one `[dir]` attribute in your HTML. If you don’t have -_any_ `[dir]` attributes, consider using the following JavaScript: - -```js -// force at least one dir attribute (this can run at any time) -document.documentElement.dir=document.documentElement.dir||'ltr'; -``` - -If you absolutely cannot add a `[dir]` attribute in your HTML or even force one -via JavaScript, you can still work around this by presuming a direction in your -CSS using the [`dir` option](#dir), but understand that this will -sometimes increase selector weight by one element (`html`). - -## Usage - -Add [PostCSS Dir Pseudo Class] to your project: - -```bash -npm install postcss postcss-dir-pseudo-class --save-dev -``` - -Use it as a [PostCSS] plugin: - -```js -const postcss = require('postcss'); -const postcssDirPseudoClass = require('postcss-dir-pseudo-class'); - -postcss([ - postcssDirPseudoClass(/* pluginOptions */) -]).process(YOUR_CSS /*, processOptions */); -``` - -[PostCSS Dir Pseudo Class] 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 -postcssDirPseudoClass({ preserve: true }) -``` - -```pcss -article h3:dir(rtl) { - margin-right: 10px; -} - -article h3:dir(ltr) { - margin-left: 10px; -} - -/* becomes */ - -[dir="rtl"] article h3 { - margin-right: 10px; -} - -article h3:dir(rtl) { - margin-right: 10px; -} - -[dir="ltr"] article h3 { - margin-left: 10px; -} - -article h3:dir(ltr) { - margin-left: 10px; -} -``` - -### dir - -The `dir` option allows you presume a direction in your CSS. By default, this -is not specified and you are required to include a direction `[dir]` attribute -somewhere in your HTML, preferably on the `html` element. - -```js -postcssDirPseudoClass({ dir: 'ltr' }); -``` - -```pcss -article h3:dir(rtl) { - margin-right: 10px; -} - -article h3:dir(ltr) { - margin-left: 10px; -} - -/* becomes */ - -[dir="rtl"] article h3 { - margin-right: 10px; -} - -html:not([dir="rtl"]) article h3 { - margin-left: 10px; -} -``` - -```js -postcssDirPseudoClass({ dir: 'rtl' }); -``` - -```pcss -article h3:dir(rtl) { - margin-right: 10px; -} - -article h3:dir(ltr) { - margin-left: 10px; -} - -/* becomes */ - -html:not([dir="ltr"]) article h3 { - margin-right: 10px; -} - -[dir="ltr"] article h3 { - margin-left: 10px; -} -``` - -### shadow - -The `shadow` option determines whether the CSS is assumed to be used in Shadow DOM with Custom Elements. - -```js -postcssDirPseudoClass({ shadow: true }) -``` - -```pcss -article h3:dir(rtl) { - margin-right: 10px; -} - -article h3:dir(ltr) { - margin-left: 10px; -} - -/* becomes */ - -:host-context([dir="rtl"]) article h3 { - margin-right: 10px; -} - -:host-context([dir="ltr"]) article h3 { - margin-left: 10px; -} -``` - -[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test -[css-url]: https://cssdb.org/#dir-pseudo-class -[discord]: https://discord.gg/bUadyRwkJS -[npm-url]: https://www.npmjs.com/package/postcss-dir-pseudo-class - -[PostCSS]: https://github.com/postcss/postcss -[PostCSS Dir Pseudo Class]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-dir-pseudo-class -[Selectors]: https://www.w3.org/TR/selectors-4/#the-dir-pseudo diff --git a/node_modules/postcss-dir-pseudo-class/dist/index.cjs b/node_modules/postcss-dir-pseudo-class/dist/index.cjs deleted file mode 100644 index f09a68b4..00000000 --- a/node_modules/postcss-dir-pseudo-class/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var e=require("postcss-selector-parser");const creator=t=>{const r=Object.assign({dir:null,preserve:!1,shadow:!1},t);return{postcssPlugin:"postcss-dir-pseudo-class",prepare(){const t=new WeakSet;return{Rule(o,{result:s}){if(t.has(o))return;let a,n=!1;if(o.selector.toLowerCase().includes(":dir(")){try{a=e((t=>{t.nodes.forEach((t=>{t.walk((t=>{if("pseudo"!==t.type)return;if(":dir"!==t.value.toLowerCase())return;if(!t.nodes||!t.nodes.length)return;const a=t.nodes.toString().toLowerCase();if("rtl"!==a&&"ltr"!==a)return;const l=t.parent;if(!l)return;l.nodes.filter((e=>"pseudo"===e.type&&":dir"===e.value.toLowerCase())).length>1&&!n&&(n=!0,o.warn(s,`Hierarchical :dir pseudo class usage can't be transformed correctly to [dir] attributes. This will lead to incorrect selectors for "${o.selector}"`));const c=t.prev(),i=t.next(),p=c&&c.type&&"combinator"!==c.type,u=i&&i.type&&"combinator"!==i.type,d=i&&i.type&&("combinator"!==i.type||"combinator"===i.type&&" "===i.value);p||u||0===l.nodes.indexOf(t)&&d||1===l.nodes.length?t.remove():t.replaceWith(e.universal());const v=l.nodes[0],f=v&&"combinator"===v.type&&" "===v.value,w=v&&"tag"===v.type&&"html"===v.value.toLowerCase(),y=v&&"pseudo"===v.type&&":root"===v.value.toLowerCase();!v||w||y||f||l.prepend(e.combinator({value:" "}));const h=r.dir===a,b=e.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${a}"`,raws:{}}),m=e.pseudo({value:":host-context"});m.append(e.selector({value:"",nodes:[b]}));const g=e.pseudo({value:(w||y?"":"html")+":not"});g.append(e.selector({value:"",nodes:[e.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${"ltr"===a?"rtl":"ltr"}"`,raws:{}})]})),h?w?l.insertAfter(v,g):l.prepend(g):w?l.insertAfter(v,b):r.shadow&&!y?l.prepend(m):l.prepend(b)}))}))})).processSync(o.selector)}catch(e){return void o.warn(s,`Failed to parse selector : ${o.selector}`)}void 0!==a&&a!==o.selector&&(t.add(o),o.cloneBefore({selector:a}),r.preserve||o.remove())}}}}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/postcss-dir-pseudo-class/dist/index.d.ts b/node_modules/postcss-dir-pseudo-class/dist/index.d.ts deleted file mode 100644 index bcfe2c60..00000000 --- a/node_modules/postcss-dir-pseudo-class/dist/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -declare const creator: PluginCreator; -export default creator; - -/** postcss-dir-pseudo-class plugin options */ -export declare type pluginOptions = { - /** Preserve the original notation. default: true */ - preserve?: boolean; - /** Assume a direction for the document. default: null */ - dir?: 'ltr' | 'rtl'; - /** Assume that the CSS is intended to be used in Shadow DOM with Custom Elements. default: false */ - shadow?: boolean; -}; - -export { } diff --git a/node_modules/postcss-dir-pseudo-class/dist/index.mjs b/node_modules/postcss-dir-pseudo-class/dist/index.mjs deleted file mode 100644 index d3c2142d..00000000 --- a/node_modules/postcss-dir-pseudo-class/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import e from"postcss-selector-parser";const creator=t=>{const r=Object.assign({dir:null,preserve:!1,shadow:!1},t);return{postcssPlugin:"postcss-dir-pseudo-class",prepare(){const t=new WeakSet;return{Rule(o,{result:s}){if(t.has(o))return;let a,n=!1;if(o.selector.toLowerCase().includes(":dir(")){try{a=e((t=>{t.nodes.forEach((t=>{t.walk((t=>{if("pseudo"!==t.type)return;if(":dir"!==t.value.toLowerCase())return;if(!t.nodes||!t.nodes.length)return;const a=t.nodes.toString().toLowerCase();if("rtl"!==a&&"ltr"!==a)return;const l=t.parent;if(!l)return;l.nodes.filter((e=>"pseudo"===e.type&&":dir"===e.value.toLowerCase())).length>1&&!n&&(n=!0,o.warn(s,`Hierarchical :dir pseudo class usage can't be transformed correctly to [dir] attributes. This will lead to incorrect selectors for "${o.selector}"`));const c=t.prev(),p=t.next(),i=c&&c.type&&"combinator"!==c.type,d=p&&p.type&&"combinator"!==p.type,u=p&&p.type&&("combinator"!==p.type||"combinator"===p.type&&" "===p.value);i||d||0===l.nodes.indexOf(t)&&u||1===l.nodes.length?t.remove():t.replaceWith(e.universal());const v=l.nodes[0],f=v&&"combinator"===v.type&&" "===v.value,w=v&&"tag"===v.type&&"html"===v.value.toLowerCase(),y=v&&"pseudo"===v.type&&":root"===v.value.toLowerCase();!v||w||y||f||l.prepend(e.combinator({value:" "}));const h=r.dir===a,b=e.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${a}"`,raws:{}}),m=e.pseudo({value:":host-context"});m.append(e.selector({value:"",nodes:[b]}));const g=e.pseudo({value:(w||y?"":"html")+":not"});g.append(e.selector({value:"",nodes:[e.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${"ltr"===a?"rtl":"ltr"}"`,raws:{}})]})),h?w?l.insertAfter(v,g):l.prepend(g):w?l.insertAfter(v,b):r.shadow&&!y?l.prepend(m):l.prepend(b)}))}))})).processSync(o.selector)}catch(e){return void o.warn(s,`Failed to parse selector : ${o.selector}`)}void 0!==a&&a!==o.selector&&(t.add(o),o.cloneBefore({selector:a}),r.preserve||o.remove())}}}}}};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/postcss-dir-pseudo-class/package.json b/node_modules/postcss-dir-pseudo-class/package.json deleted file mode 100644 index f849484d..00000000 --- a/node_modules/postcss-dir-pseudo-class/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "postcss-dir-pseudo-class", - "description": "Use the :dir pseudo-class in CSS", - "version": "8.0.1", - "contributors": [ - { - "name": "Antonio Laguna", - "email": "antonio@laguna.es", - "url": "https://antonio.laguna.es" - }, - { - "name": "Jonathan Neal", - "email": "jonathantneal@hotmail.com" - }, - { - "name": "Romain Menke", - "email": "romainmenke@gmail.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" - }, - "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-dir-pseudo-class#readme", - "repository": { - "type": "git", - "url": "https://github.com/csstools/postcss-plugins.git", - "directory": "plugins/postcss-dir-pseudo-class" - }, - "bugs": "https://github.com/csstools/postcss-plugins/issues", - "keywords": [ - "attribute", - "css", - "directionality", - "directions", - "left", - "left-to-right", - "ltr", - "polyfill", - "postcss", - "postcss-plugin", - "right", - "right-to-left", - "rtl", - "selector" - ] -} -- cgit v1.2.3