summaryrefslogtreecommitdiff
path: root/node_modules/css-prefers-color-scheme
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/css-prefers-color-scheme
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/css-prefers-color-scheme')
-rw-r--r--node_modules/css-prefers-color-scheme/CHANGELOG.md177
-rw-r--r--node_modules/css-prefers-color-scheme/README.md22
-rw-r--r--node_modules/css-prefers-color-scheme/dist/index.d.ts10
-rw-r--r--node_modules/css-prefers-color-scheme/package.json39
4 files changed, 38 insertions, 210 deletions
diff --git a/node_modules/css-prefers-color-scheme/CHANGELOG.md b/node_modules/css-prefers-color-scheme/CHANGELOG.md
index d27db488..005a093f 100644
--- a/node_modules/css-prefers-color-scheme/CHANGELOG.md
+++ b/node_modules/css-prefers-color-scheme/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changes to Prefers Color Scheme
+### 9.0.1
+
+_December 15, 2023_
+
+- Fix type definitions
+
### 9.0.0
_July 3, 2023_
@@ -12,173 +18,4 @@ _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.0.1
-
-_August 23, 2022_
-
-- Fix: assign global browser polyfill to `window`, `self` or a blank object.
-
-### 7.0.0
-
-_July 8, 2022_
-
-[Read the full changelog](https://github.com/csstools/postcss-plugins/wiki/PostCSS-Preset-Env-8)
-
-- Breaking: removed old CDN urls
-- Breaking: remove `color-depth` queries fallback
-- Breaking: remove 'no-preference' support as this was dropped from the spec
-- Breaking: remove old global object
-- Fix: case insensitive matching.
-
-#### How to migrate :
-
-##### Re-build your CSS with the new version of the library.
-
-##### If you use a CDN url, please update it.
-
-```diff
-- <script src="https://unpkg.com/css-prefers-color-scheme/browser"></script>
-+ <script src="https://unpkg.com/css-prefers-color-scheme/dist/browser-global.js"></script>
-```
-
-```diff
-- <script src="https://unpkg.com/css-prefers-color-scheme/browser.min"></script>
-+ <script src="https://unpkg.com/css-prefers-color-scheme/dist/browser-global.js"></script>
-```
-
-##### Use `prefersColorSchemeInit` to initialize the polyfill in the browser.
-
-```diff
-- initPrefersColorScheme()
-+ prefersColorSchemeInit()
-```
-
-##### Remove `@media (prefer-color-scheme: no-preference)` from your CSS.
-
-`@media (prefers-color-scheme: no-preference)` was removed from the specification and should be equivalent to not having any media query.
-
-```diff
-- @media (prefers-color-scheme: no-preference) {
-- .some-selector {
-- /* your styles ... */
-- }
-- }
-+ .some-selector {
-+ /* your styles ... */
-+ }
-```
-
-### 6.0.3
-
-_January 31, 2022_
-
-- Fix `preserve: false` option.
-
-### 6.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).
-
-### 6.0.1
-
-_December 27, 2021_
-
-- Fixed: require/import paths for browser script
-
-### 6.0.0
-
-_December 13, 2021_
-
-- Breaking: require/import paths have changed
-- Changed: new polyfill CDN urls.
-- Updated: documentation
-- Fixed: `CSSRuleList` edits skipping rules as this is a live list.
-- Fixed: complex `@media` queries not working.
-
-**Migrating to 6.0.0**
-
-PostCSS plugin :
-
-```diff
-- const postcssPrefersColorScheme = require('css-prefers-color-scheme/postcss');
-+ const postcssPrefersColorScheme = require('css-prefers-color-scheme');
-```
-
-Browser Polyfill :
-
-```diff
-- const prefersColorScheme = require('css-prefers-color-scheme')();
-+ const prefersColorScheme = require('css-prefers-color-scheme/browser')();
-```
-
-_The old CND url is now deprecated and will be removed in a next major release._
-_It will continue to work for now._
-
-```diff
-- <script src="https://unpkg.com/css-prefers-color-scheme/browser.min"></script>
-+ <script src="https://unpkg.com/css-prefers-color-scheme/dist/browser-global.js"></script>
-```
-
-### 5.0.0
-
-_September 17, 2021_
-
-- Updated: Support for PostCS 8+ (major).
-- Updated: Support for Node 12+ (major).
-
-### 4.0.0
-
-_May 24, 2019_
-
-- Updated: `postcss` to 7.0.16 (patch)
-- Updated: Node 8+ compatibility (major)
-
-### 3.1.1
-
-_November 10, 2018_
-
-- Updated: Project organization. No functional changes.
-
-### 3.1.0
-
-_November 10, 2018_
-
-- Include CLI tool for transforming CSS without any installation
-- Update documentation
-
-### 3.0.0
-
-_November 4, 2018_
-
-- Preserve `prefers-color-scheme` queries by default for non-JS environments
-- Remove `prefers-color-scheme` queries on the frontend for JS environments
-
-### 2.0.0
-
-_November 3, 2018_
-
-- The client library now returns an object with various features, including:
- - `scheme` to get or set the preferred color scheme
- - `hasNativeSupport` to report whether `prefers-color-scheme` is supported
- - `onChange` to listen for when the preferred color scheme changes
- - `removeListener` to destroy the native `prefers-color-scheme` listener
-
-### 1.0.0
-
-_September 24, 2018_
-
-- Initial version
+[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-prefers-color-scheme/CHANGELOG.md)
diff --git a/node_modules/css-prefers-color-scheme/README.md b/node_modules/css-prefers-color-scheme/README.md
index 84a58e63..4d067f5f 100644
--- a/node_modules/css-prefers-color-scheme/README.md
+++ b/node_modules/css-prefers-color-scheme/README.md
@@ -2,6 +2,10 @@
[<img alt="npm version" src="https://img.shields.io/npm/v/css-prefers-color-scheme.svg" height="20">][npm-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/prefers-color-scheme-query.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 css-prefers-color-scheme --save-dev
+```
+
[Prefers Color Scheme] lets you use light and dark color schemes in all browsers, following the [Media Queries] specification.
To use this feature you need to do two things :
@@ -142,12 +146,13 @@ or
```html
<!-- When using a CDN url you will have to manually update the version number -->
-<script src="https://unpkg.com/css-prefers-color-scheme@9.0.0/dist/browser-global.js"></script>
+<script src="https://unpkg.com/css-prefers-color-scheme@9.0.1/dist/browser-global.js"></script>
<script>prefersColorSchemeInit()</script>
```
-⚠️ Please use a versioned url, like this : `https://unpkg.com/css-prefers-color-scheme@9.0.0/dist/browser-global.js`
-Without the version, you might unexpectedly get a new major version of the library with breaking changes.
+> [!TIP]
+> Please use a versioned url, like this : `https://unpkg.com/css-prefers-color-scheme@9.0.1/dist/browser-global.js`
+> Without the version, you might unexpectedly get a new major version of the library with breaking changes.
[Prefers Color Scheme] works in all major browsers, including Safari 6+ and
Internet Explorer 9+ without any additional polyfills.
@@ -220,7 +225,7 @@ const prefersColorScheme = prefersColorSchemeInit('light', { debug: true });
```
```html
-<script src="https://unpkg.com/css-prefers-color-scheme@9.0.0/dist/browser-global.js"></script>
+<script src="https://unpkg.com/css-prefers-color-scheme@9.0.1/dist/browser-global.js"></script>
<script>prefersColorSchemeInit('light', { debug: true })</script>
```
@@ -242,10 +247,11 @@ ECMA Script:
## CORS
-⚠️ Applies to you if you load CSS from a different domain than the page.
-
-In this case the CSS is treated as untrusted and will not be made available to the JavaScript polyfill.
-The polyfill will not work without applying the correct configuration for CORS.
+> [!IMPORTANT]
+> Applies to you if you load CSS from a different domain than the page.
+>
+> In this case the CSS is treated as untrusted and will not be made available to the JavaScript polyfill.
+> The polyfill will not work without applying the correct configuration for CORS.
Example :
diff --git a/node_modules/css-prefers-color-scheme/dist/index.d.ts b/node_modules/css-prefers-color-scheme/dist/index.d.ts
index e7060b75..c401d2a2 100644
--- a/node_modules/css-prefers-color-scheme/dist/index.d.ts
+++ b/node_modules/css-prefers-color-scheme/dist/index.d.ts
@@ -1,8 +1,12 @@
import type { PluginCreator } from 'postcss';
+
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
+
/** postcss-prefers-color-scheme plugin options */
-export type pluginOptions = {
+export declare type pluginOptions = {
/** Preserve the original notation. default: true */
preserve?: boolean;
};
-declare const creator: PluginCreator<pluginOptions>;
-export default creator;
+
+export { }
diff --git a/node_modules/css-prefers-color-scheme/package.json b/node_modules/css-prefers-color-scheme/package.json
index 34a73ea3..07297e81 100644
--- a/node_modules/css-prefers-color-scheme/package.json
+++ b/node_modules/css-prefers-color-scheme/package.json
@@ -1,7 +1,7 @@
{
"name": "css-prefers-color-scheme",
"description": "Use light and dark color schemes in all browsers",
- "version": "9.0.0",
+ "version": "9.0.1",
"contributors": [
{
"name": "Antonio Laguna",
@@ -31,15 +31,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"
+ }
},
"./browser": {
"import": "./dist/browser.mjs",
@@ -59,19 +62,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/css-prefers-color-scheme#readme",
"repository": {
"type": "git",
@@ -94,14 +84,5 @@
"queries",
"query",
"scheme"
- ],
- "csstools": {
- "cssdbId": "prefers-color-scheme-query",
- "exportName": "prefersColorScheme",
- "humanReadableName": "Prefers Color Scheme",
- "specUrl": "https://www.w3.org/TR/mediaqueries-5/#prefers-color-scheme"
- },
- "volta": {
- "extends": "../../package.json"
- }
+ ]
}