summaryrefslogtreecommitdiff
path: root/node_modules/postcss-focus-visible
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
commitf06956efd2dc4bf77244a9fcce2b883a00b925af (patch)
tree0123cb73ce67f1f4b17e1d6cbabff076ee44e31b /node_modules/postcss-focus-visible
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/postcss-focus-visible')
-rw-r--r--node_modules/postcss-focus-visible/CHANGELOG.md102
-rw-r--r--node_modules/postcss-focus-visible/README.md4
-rw-r--r--node_modules/postcss-focus-visible/dist/index.cjs2
-rw-r--r--node_modules/postcss-focus-visible/dist/index.d.ts10
-rw-r--r--node_modules/postcss-focus-visible/dist/index.mjs2
-rw-r--r--node_modules/postcss-focus-visible/package.json39
6 files changed, 30 insertions, 129 deletions
diff --git a/node_modules/postcss-focus-visible/CHANGELOG.md b/node_modules/postcss-focus-visible/CHANGELOG.md
index 7e7618b0..17e6a24b 100644
--- a/node_modules/postcss-focus-visible/CHANGELOG.md
+++ b/node_modules/postcss-focus-visible/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changes to PostCSS Focus Visible
+### 9.0.1
+
+_December 15, 2023_
+
+- Fix type definitions
+
### 9.0.0
_July 3, 2023_
@@ -12,98 +18,4 @@ _February 8, 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).
-- Fix: Do not throw when a selector is invalid, show a warning instead.
-
-### 7.1.0
-
-_July 30, 2022_
-
-- Added: `disablePolyfillReadyClass` plugin option to prevent `.js-focus-visible` from being added.
-
-### 7.0.0
-
-_July 8, 2022_
-
-- Breaking: Changed generated classes so it prepends `.js-focus-visible` to the
-generated class so CSS is applied when the polyfill is known to be running.
-
-### 6.0.4
-
-_February 5, 2022_
-
-- Improved `es module` and `commonjs` compatibility
-
-### 6.0.3
-
-_January 2, 2022_
-
-- Removed Sourcemaps from package tarball.
-- Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121).
-
-### 6.0.2
-
-_December 13, 2021_
-
-- Changed: now uses `postcss-selector-parser` for parsing.
-- Updated: documentation
-
-### 6.0.1
-
-_September 22, 2021_
-
-- Added missing `dist` to bundle.
-- Added missing `exports` to `package.json`
-- Added missing `types` to `package.json`
-- Added bundling & testing as prepublish step.
-
-### 6.0.0
-
-_September 17, 2021_
-
-- Updated: Support for PostCS 8+ (major).
-- Updated: Support for Node 12+ (major).
-
-### 5.0.0
-
-_April 14, 2020_
-
-- Updated: `:focus-visible` can appear escaped in a selector
-- Updated: Support for Node v10+
-
-### 4.0.0
-
-_September 17, 2018_
-
-- Updated: Support for PostCSS v7+
-- Updated: Support for Node v6+
-
-### 3.0.0
-
-_April 7, 2018_
-
-- Changed: default functionality to preserve the original rule
-- Added: `preserve` option to preserve the original rule using `:focus-visible`
-
-### 2.0.0
-
-_February 17, 2018_
-
-- Changed `:focus-ring` to `:focus-visible` per the specification
-- Removed `assignTo` export option
-
-### 1.0.0
-
-_May 22, 2017_
-
-- Initial version
+[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-visible/CHANGELOG.md)
diff --git a/node_modules/postcss-focus-visible/README.md b/node_modules/postcss-focus-visible/README.md
index f6a980d6..b4286cea 100644
--- a/node_modules/postcss-focus-visible/README.md
+++ b/node_modules/postcss-focus-visible/README.md
@@ -2,6 +2,10 @@
[<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].
diff --git a/node_modules/postcss-focus-visible/dist/index.cjs b/node_modules/postcss-focus-visible/dist/index.cjs
index b738bcfc..1c2c2c5c 100644
--- a/node_modules/postcss-focus-visible/dist/index.cjs
+++ b/node_modules/postcss-focus-visible/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e=require("postcss-selector-parser");const s="js-focus-visible",o=":focus-visible",creator=n=>{const r=Object.assign({preserve:!0,replaceWith:".focus-visible",disablePolyfillReadyClass:!1},n),t=e().astSync(r.replaceWith);return{postcssPlugin:"postcss-focus-visible",prepare(){const n=new WeakSet;return{Rule(l,{result:a}){if(n.has(l))return;if(!l.selector.toLowerCase().includes(o))return;const i=l.selectors.flatMap((n=>{if(!n.toLowerCase().includes(o))return[n];let i;try{i=e().astSync(n)}catch(e){return l.warn(a,`Failed to parse selector : "${n}" with message: "${e.message}"`),n}if(void 0===i)return[n];let c=!1;if(i.walkPseudos((e=>{e.value.toLowerCase()===o&&(e.nodes&&e.nodes.length||(c=!0,e.replaceWith(t.clone({}))))})),!c)return[n];const u=i.clone();if(!r.disablePolyfillReadyClass){var d,p,f,v,b;if(null!=(d=i.nodes)&&null!=(p=d[0])&&null!=(f=p.nodes)&&f.length)for(let o=0;o<i.nodes[0].nodes.length;o++){const n=i.nodes[0].nodes[o];if("combinator"===n.type||e.isPseudoElement(n)){i.nodes[0].insertBefore(n,e.className({value:s}));break}if(o===i.nodes[0].nodes.length-1){i.nodes[0].append(e.className({value:s}));break}}return null!=(v=i.nodes)&&null!=(b=v[0])&&b.nodes&&(u.nodes[0].prepend(e.combinator({value:" "})),u.nodes[0].prepend(e.className({value:s}))),[i.toString(),u.toString()]}return[i.toString()]}));i.join(",")!==l.selectors.join(",")&&(n.add(l),l.cloneBefore({selectors:i}),r.preserve||l.remove())}}}}};creator.postcss=!0,module.exports=creator;
+"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
index be2e9120..0a69f02e 100644
--- a/node_modules/postcss-focus-visible/dist/index.d.ts
+++ b/node_modules/postcss-focus-visible/dist/index.d.ts
@@ -1,6 +1,10 @@
import type { PluginCreator } from 'postcss';
+
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
+
/** postcss-focus-visible plugin options */
-export type pluginOptions = {
+export declare type pluginOptions = {
/** Preserve the original notation. default: true */
preserve?: boolean;
/** The replacement class to be used in the polyfill. default: ".focus-visible" */
@@ -8,5 +12,5 @@ export type pluginOptions = {
/** Disable the selector prefix that is used to prevent a flash of incorrectly styled content. default: false */
disablePolyfillReadyClass?: boolean;
};
-declare const creator: PluginCreator<pluginOptions>;
-export default creator;
+
+export { }
diff --git a/node_modules/postcss-focus-visible/dist/index.mjs b/node_modules/postcss-focus-visible/dist/index.mjs
index 3b2c6abc..6db252dc 100644
--- a/node_modules/postcss-focus-visible/dist/index.mjs
+++ b/node_modules/postcss-focus-visible/dist/index.mjs
@@ -1 +1 @@
-import e from"postcss-selector-parser";const s="js-focus-visible",o=":focus-visible",creator=n=>{const t=Object.assign({preserve:!0,replaceWith:".focus-visible",disablePolyfillReadyClass:!1},n),r=e().astSync(t.replaceWith);return{postcssPlugin:"postcss-focus-visible",prepare(){const n=new WeakSet;return{Rule(l,{result:a}){if(n.has(l))return;if(!l.selector.toLowerCase().includes(o))return;const i=l.selectors.flatMap((n=>{if(!n.toLowerCase().includes(o))return[n];let i;try{i=e().astSync(n)}catch(e){return l.warn(a,`Failed to parse selector : "${n}" with message: "${e.message}"`),n}if(void 0===i)return[n];let c=!1;if(i.walkPseudos((e=>{e.value.toLowerCase()===o&&(e.nodes&&e.nodes.length||(c=!0,e.replaceWith(r.clone({}))))})),!c)return[n];const d=i.clone();if(!t.disablePolyfillReadyClass){var u,p,f,v,b;if(null!=(u=i.nodes)&&null!=(p=u[0])&&null!=(f=p.nodes)&&f.length)for(let o=0;o<i.nodes[0].nodes.length;o++){const n=i.nodes[0].nodes[o];if("combinator"===n.type||e.isPseudoElement(n)){i.nodes[0].insertBefore(n,e.className({value:s}));break}if(o===i.nodes[0].nodes.length-1){i.nodes[0].append(e.className({value:s}));break}}return null!=(v=i.nodes)&&null!=(b=v[0])&&b.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(",")&&(n.add(l),l.cloneBefore({selectors:i}),t.preserve||l.remove())}}}}};creator.postcss=!0;export{creator as default};
+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
index 13535db0..50a0d8f7 100644
--- a/node_modules/postcss-focus-visible/package.json
+++ b/node_modules/postcss-focus-visible/package.json
@@ -1,7 +1,7 @@
{
"name": "postcss-focus-visible",
"description": "Use the :focus-visible pseudo-selector in CSS",
- "version": "9.0.0",
+ "version": "9.0.1",
"contributors": [
{
"name": "Antonio Laguna",
@@ -27,15 +27,18 @@
"engines": {
"node": "^14 || ^16 || >=18"
},
+ "type": "module",
"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"
+ "import": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.mjs"
+ },
+ "require": {
+ "default": "./dist/index.cjs"
+ }
}
},
"files": [
@@ -50,19 +53,6 @@
"peerDependencies": {
"postcss": "^8.4"
},
- "devDependencies": {
- "@csstools/postcss-tape": "*",
- "puppeteer": "^20.7.4"
- },
- "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:browser": "node ./test/_browser.mjs",
- "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
- },
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-visible#readme",
"repository": {
"type": "git",
@@ -95,14 +85,5 @@
"textarea",
"touch",
"trackpad"
- ],
- "csstools": {
- "cssdbId": "focus-visible-pseudo-class",
- "exportName": "postcssFocusVisible",
- "humanReadableName": "PostCSS Focus Visible",
- "specUrl": "https://www.w3.org/TR/selectors-4/#the-focus-visible-pseudo"
- },
- "volta": {
- "extends": "../../package.json"
- }
+ ]
}