diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/postcss-focus-visible | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/postcss-focus-visible')
| -rw-r--r-- | node_modules/postcss-focus-visible/CHANGELOG.md | 21 | ||||
| -rw-r--r-- | node_modules/postcss-focus-visible/LICENSE.md | 18 | ||||
| -rw-r--r-- | node_modules/postcss-focus-visible/README.md | 150 | ||||
| -rw-r--r-- | node_modules/postcss-focus-visible/dist/index.cjs | 1 | ||||
| -rw-r--r-- | node_modules/postcss-focus-visible/dist/index.d.ts | 16 | ||||
| -rw-r--r-- | node_modules/postcss-focus-visible/dist/index.mjs | 1 | ||||
| -rw-r--r-- | node_modules/postcss-focus-visible/package.json | 89 |
7 files changed, 0 insertions, 296 deletions
diff --git a/node_modules/postcss-focus-visible/CHANGELOG.md b/node_modules/postcss-focus-visible/CHANGELOG.md deleted file mode 100644 index 17e6a24b..00000000 --- a/node_modules/postcss-focus-visible/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changes to PostCSS Focus Visible - -### 9.0.1 - -_December 15, 2023_ - -- Fix type definitions - -### 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 8, 2023_ - -- Reduce the amount of duplicate fallback CSS. - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-visible/CHANGELOG.md) diff --git a/node_modules/postcss-focus-visible/LICENSE.md b/node_modules/postcss-focus-visible/LICENSE.md deleted file mode 100644 index e8ae93b9..00000000 --- a/node_modules/postcss-focus-visible/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-focus-visible/README.md b/node_modules/postcss-focus-visible/README.md deleted file mode 100644 index b4286cea..00000000 --- a/node_modules/postcss-focus-visible/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# PostCSS Focus Visible [<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-focus-visible.svg" height="20">][npm-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/focus-visible-pseudo-class.svg" height="20">][css-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] - -```bash -npm install postcss-focus-visible --save-dev -``` - -[PostCSS Focus Visible] lets you use the `:focus-visible` pseudo-class in CSS, -following the [Selectors Level 4 specification]. - -To use this feature you need to do two things : -- add the [PostCSS plugin](#usage) that transforms the selector into a class or attribute -- add the [focus-visible polyfill] that sets the attribute or class on elements in a browser - -[](https://caniuse.com/#feat=css-focus-visible) - -```css - -```pcss -:focus:not(:focus-visible) { - outline: none; -} - -/* becomes */ - -:focus:not(.focus-visible).js-focus-visible, .js-focus-visible :focus:not(.focus-visible) { - outline: none; -} -:focus:not(:focus-visible) { - outline: none; -} -``` - -[PostCSS Focus Visible] duplicates rules using the `:focus-visible` pseudo-class -with a `.focus-visible` class selector, the same selector used by the -[focus-visible polyfill]. - -## Usage - -Add [PostCSS Focus Visible] to your project: - -```bash -npm install postcss postcss-focus-visible --save-dev -``` - -Use it as a [PostCSS] plugin: - -```js -const postcss = require('postcss'); -const postcssFocusVisible = require('postcss-focus-visible'); - -postcss([ - postcssFocusVisible(/* pluginOptions */) -]).process(YOUR_CSS /*, processOptions */); -``` - -[PostCSS Focus Visible] 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 preserved. - -```js -postcssFocusVisible({ preserve: false }) -``` - -```pcss -:focus:not(:focus-visible) { - outline: none; -} - -/* becomes */ - -:focus:not(.focus-visible).js-focus-visible, .js-focus-visible :focus:not(.focus-visible) { - outline: none; -} -``` - -### replaceWith - -The `replaceWith` option defines the selector to replace `:focus-visible`. By -default, the replacement selector is `.focus-visible`. - -```js -postcssFocusVisible({ replaceWith: '[data-focus-visible-added]' }) -``` - -```pcss -:focus:not(:focus-visible) { - outline: none; -} - -/* becomes */ - -<example.preserve-true.expect.css> -``` - -Note that if you want to keep using [focus-visible polyfill], the only -acceptable value would be `[data-focus-visible-added]`, -given that the polyfill does not support arbitrary values. - -### disablePolyfillReadyClass - -The `disablePolyfillReadyClass` option determines if selectors are prefixed with an indicator class. -This class is only set on your document if the polyfill loads and is needed. - -By default this option is `false`. -Set this to `true` to prevent the class from being added. - -```js -postcssFocusVisible({ disablePolyfillReadyClass: true }) -``` - -```pcss -:focus:not(:focus-visible) { - outline: none; -} - -/* becomes */ - -:focus:not(.focus-visible) { - outline: none; -} -:focus:not(:focus-visible) { - outline: none; -} -``` - -[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test -[css-url]: https://cssdb.org/#focus-visible-pseudo-class -[discord]: https://discord.gg/bUadyRwkJS -[npm-url]: https://www.npmjs.com/package/postcss-focus-visible - -[PostCSS]: https://github.com/postcss/postcss -[PostCSS Focus Visible]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-visible -[Selectors Level 4 specification]: https://www.w3.org/TR/selectors-4/#the-focus-visible-pseudo -[focus-visible polyfill]: https://github.com/WICG/focus-visible diff --git a/node_modules/postcss-focus-visible/dist/index.cjs b/node_modules/postcss-focus-visible/dist/index.cjs deleted file mode 100644 index 1c2c2c5c..00000000 --- a/node_modules/postcss-focus-visible/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var e=require("postcss-selector-parser");const s="js-focus-visible",o=":focus-visible",creator=r=>{const t=Object.assign({preserve:!0,replaceWith:".focus-visible",disablePolyfillReadyClass:!1},r),n=e().astSync(t.replaceWith);return{postcssPlugin:"postcss-focus-visible",prepare(){const r=new WeakSet;return{Rule(l,{result:a}){if(r.has(l))return;if(!l.selector.toLowerCase().includes(o))return;const i=l.selectors.flatMap((r=>{if(!r.toLowerCase().includes(o))return[r];let i;try{i=e().astSync(r)}catch(e){return l.warn(a,`Failed to parse selector : "${r}" with message: "${e instanceof Error?e.message:e}"`),r}if(void 0===i)return[r];let c=!1;if(i.walkPseudos((e=>{e.value.toLowerCase()===o&&(e.nodes&&e.nodes.length||(c=!0,e.replaceWith(n.clone({}))))})),!c)return[r];const d=i.clone();if(!t.disablePolyfillReadyClass){if(i.nodes?.[0]?.nodes?.length)for(let o=0;o<i.nodes[0].nodes.length;o++){const r=i.nodes[0].nodes[o];if("combinator"===r.type||e.isPseudoElement(r)){i.nodes[0].insertBefore(r,e.className({value:s}));break}if(o===i.nodes[0].nodes.length-1){i.nodes[0].append(e.className({value:s}));break}}return i.nodes?.[0]?.nodes&&(d.nodes[0].prepend(e.combinator({value:" "})),d.nodes[0].prepend(e.className({value:s}))),[i.toString(),d.toString()]}return[i.toString()]}));i.join(",")!==l.selectors.join(",")&&(r.add(l),l.cloneBefore({selectors:i}),t.preserve||l.remove())}}}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/postcss-focus-visible/dist/index.d.ts b/node_modules/postcss-focus-visible/dist/index.d.ts deleted file mode 100644 index 0a69f02e..00000000 --- a/node_modules/postcss-focus-visible/dist/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -declare const creator: PluginCreator<pluginOptions>; -export default creator; - -/** postcss-focus-visible plugin options */ -export declare type pluginOptions = { - /** Preserve the original notation. default: true */ - preserve?: boolean; - /** The replacement class to be used in the polyfill. default: ".focus-visible" */ - replaceWith?: string; - /** Disable the selector prefix that is used to prevent a flash of incorrectly styled content. default: false */ - disablePolyfillReadyClass?: boolean; -}; - -export { } diff --git a/node_modules/postcss-focus-visible/dist/index.mjs b/node_modules/postcss-focus-visible/dist/index.mjs deleted file mode 100644 index 6db252dc..00000000 --- a/node_modules/postcss-focus-visible/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import e from"postcss-selector-parser";const s="js-focus-visible",o=":focus-visible",creator=r=>{const t=Object.assign({preserve:!0,replaceWith:".focus-visible",disablePolyfillReadyClass:!1},r),n=e().astSync(t.replaceWith);return{postcssPlugin:"postcss-focus-visible",prepare(){const r=new WeakSet;return{Rule(l,{result:a}){if(r.has(l))return;if(!l.selector.toLowerCase().includes(o))return;const i=l.selectors.flatMap((r=>{if(!r.toLowerCase().includes(o))return[r];let i;try{i=e().astSync(r)}catch(e){return l.warn(a,`Failed to parse selector : "${r}" with message: "${e instanceof Error?e.message:e}"`),r}if(void 0===i)return[r];let c=!1;if(i.walkPseudos((e=>{e.value.toLowerCase()===o&&(e.nodes&&e.nodes.length||(c=!0,e.replaceWith(n.clone({}))))})),!c)return[r];const d=i.clone();if(!t.disablePolyfillReadyClass){if(i.nodes?.[0]?.nodes?.length)for(let o=0;o<i.nodes[0].nodes.length;o++){const r=i.nodes[0].nodes[o];if("combinator"===r.type||e.isPseudoElement(r)){i.nodes[0].insertBefore(r,e.className({value:s}));break}if(o===i.nodes[0].nodes.length-1){i.nodes[0].append(e.className({value:s}));break}}return i.nodes?.[0]?.nodes&&(d.nodes[0].prepend(e.combinator({value:" "})),d.nodes[0].prepend(e.className({value:s}))),[i.toString(),d.toString()]}return[i.toString()]}));i.join(",")!==l.selectors.join(",")&&(r.add(l),l.cloneBefore({selectors:i}),t.preserve||l.remove())}}}}};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/postcss-focus-visible/package.json b/node_modules/postcss-focus-visible/package.json deleted file mode 100644 index 50a0d8f7..00000000 --- a/node_modules/postcss-focus-visible/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "postcss-focus-visible", - "description": "Use the :focus-visible pseudo-selector 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" - } - ], - "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-focus-visible#readme", - "repository": { - "type": "git", - "url": "https://github.com/csstools/postcss-plugins.git", - "directory": "plugins/postcss-focus-visible" - }, - "bugs": "https://github.com/csstools/postcss-plugins/issues", - "keywords": [ - "a11y", - "accessibility", - "button", - "contenteditable", - "css", - "cursor", - "focus", - "input", - "javascript", - "js", - "keyboards", - "mice", - "mouse", - "pen", - "pointer", - "postcss", - "postcss-plugin", - "pseudos", - "ring", - "select", - "selectors", - "textarea", - "touch", - "trackpad" - ] -} |
