summaryrefslogtreecommitdiff
path: root/node_modules/postcss-normalize-unicode
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/postcss-normalize-unicode
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/postcss-normalize-unicode')
-rw-r--r--node_modules/postcss-normalize-unicode/LICENSE-MIT22
-rw-r--r--node_modules/postcss-normalize-unicode/README.md46
-rw-r--r--node_modules/postcss-normalize-unicode/package.json41
-rw-r--r--node_modules/postcss-normalize-unicode/src/index.js144
-rw-r--r--node_modules/postcss-normalize-unicode/types/index.d.ts23
-rw-r--r--node_modules/postcss-normalize-unicode/types/index.d.ts.map1
6 files changed, 0 insertions, 277 deletions
diff --git a/node_modules/postcss-normalize-unicode/LICENSE-MIT b/node_modules/postcss-normalize-unicode/LICENSE-MIT
deleted file mode 100644
index fd0e863a..00000000
--- a/node_modules/postcss-normalize-unicode/LICENSE-MIT
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
-
-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-normalize-unicode/README.md b/node_modules/postcss-normalize-unicode/README.md
deleted file mode 100644
index ec8ba575..00000000
--- a/node_modules/postcss-normalize-unicode/README.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# [postcss][postcss]-normalize-unicode
-
-> Normalize unicode with PostCSS.
-
-## Install
-
-With [npm](https://npmjs.org/package/postcss-normalize-unicode) do:
-
-```
-npm install postcss-normalize-unicode --save
-```
-
-## Example
-
-### Input
-
-```css
-@font-face{
- font-family: test;
- unicode-range: u+2b00-2bff
-}
-```
-
-### Output
-
-```css
-@font-face{
- font-family: test;
- unicode-range: u+2b??
-}
-```
-
-## Usage
-
-See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
-examples for your environment.
-
-## Contributors
-
-See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
-
-## License
-
-MIT © [Ben Briggs](http://beneb.info)
-
-[postcss]: https://github.com/postcss/postcss
diff --git a/node_modules/postcss-normalize-unicode/package.json b/node_modules/postcss-normalize-unicode/package.json
deleted file mode 100644
index 8333e018..00000000
--- a/node_modules/postcss-normalize-unicode/package.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "postcss-normalize-unicode",
- "version": "6.1.0",
- "description": "Normalize unicode-range descriptors, and can convert to wildcard ranges.",
- "main": "src/index.js",
- "types": "types/index.d.ts",
- "files": [
- "src",
- "LICENSE-MIT",
- "types"
- ],
- "keywords": [
- "css",
- "postcss",
- "postcss-plugin"
- ],
- "license": "MIT",
- "homepage": "https://github.com/cssnano/cssnano",
- "author": {
- "name": "Ben Briggs",
- "email": "beneb.info@gmail.com",
- "url": "http://beneb.info"
- },
- "repository": "cssnano/cssnano",
- "dependencies": {
- "browserslist": "^4.23.0",
- "postcss-value-parser": "^4.2.0"
- },
- "bugs": {
- "url": "https://github.com/cssnano/cssnano/issues"
- },
- "engines": {
- "node": "^14 || ^16 || >=18.0"
- },
- "devDependencies": {
- "postcss": "^8.4.35"
- },
- "peerDependencies": {
- "postcss": "^8.4.31"
- }
-} \ No newline at end of file
diff --git a/node_modules/postcss-normalize-unicode/src/index.js b/node_modules/postcss-normalize-unicode/src/index.js
deleted file mode 100644
index 2285fc52..00000000
--- a/node_modules/postcss-normalize-unicode/src/index.js
+++ /dev/null
@@ -1,144 +0,0 @@
-'use strict';
-const { dirname } = require('path');
-const browserslist = require('browserslist');
-const valueParser = require('postcss-value-parser');
-
-const regexLowerCaseUPrefix = /^u(?=\+)/;
-
-/**
- * @param {string} range
- * @return {string}
- */
-function unicode(range) {
- const values = range.slice(2).split('-');
-
- if (values.length < 2) {
- return range;
- }
-
- const left = values[0].split('');
- const right = values[1].split('');
-
- if (left.length !== right.length) {
- return range;
- }
-
- const merged = mergeRangeBounds(left, right);
-
- if (merged) {
- return merged;
- }
-
- return range;
-}
-/**
- * @param {string[]} left
- * @param {string[]} right
- * @return {false|string}
- */
-function mergeRangeBounds(left, right) {
- let questionCounter = 0;
- let group = 'u+';
- for (const [index, value] of left.entries()) {
- if (value === right[index] && questionCounter === 0) {
- group = group + value;
- } else if (value === '0' && right[index] === 'f') {
- questionCounter++;
- group = group + '?';
- } else {
- return false;
- }
- }
- // The maximum number of wildcard characters (?) for ranges is 5.
- if (questionCounter < 6) {
- return group;
- } else {
- return false;
- }
-}
-
-/**
- * IE and Edge before 16 version ignore the unicode-range if the 'U' is lowercase
- *
- * https://caniuse.com/#search=unicode-range
- *
- * @param {string} browser
- * @return {boolean}
- */
-function hasLowerCaseUPrefixBug(browser) {
- return browserslist('ie <=11, edge <= 15').includes(browser);
-}
-
-/**
- * @param {string} value
- * @return {string}
- */
-function transform(value, isLegacy = false) {
- return valueParser(value)
- .walk((child) => {
- if (child.type === 'unicode-range') {
- const transformed = unicode(child.value.toLowerCase());
-
- child.value = isLegacy
- ? transformed.replace(regexLowerCaseUPrefix, 'U')
- : transformed;
- }
-
- return false;
- })
- .toString();
-}
-
-/**
- * @typedef {{ overrideBrowserslist?: string | string[] }} AutoprefixerOptions
- * @typedef {Pick<browserslist.Options, 'stats' | 'path' | 'env'>} BrowserslistOptions
- * @typedef {AutoprefixerOptions & BrowserslistOptions} Options
- */
-
-/**
- * @type {import('postcss').PluginCreator<Options>}
- * @param {Options} opts
- * @return {import('postcss').Plugin}
- */
-function pluginCreator(opts = {}) {
- return {
- postcssPlugin: 'postcss-normalize-unicode',
-
- /**
- * @param {import('postcss').Result & {opts: BrowserslistOptions & {file?: string}}} result
- */
- prepare(result) {
- const { stats, env, from, file } = result.opts || {};
- const browsers = browserslist(opts.overrideBrowserslist, {
- stats: opts.stats || stats,
- path: opts.path || dirname(from || file || __filename),
- env: opts.env || env,
- });
-
- const cache = new Map();
- const isLegacy = browsers.some(hasLowerCaseUPrefixBug);
-
- return {
- OnceExit(css) {
- css.walkDecls(/^unicode-range$/i, (decl) => {
- const value = decl.value;
-
- if (cache.has(value)) {
- decl.value = cache.get(value);
-
- return;
- }
-
- const newValue = transform(value, isLegacy);
-
- decl.value = newValue;
- cache.set(value, newValue);
- });
- },
- };
- },
- };
-}
-
-pluginCreator.postcss = true;
-module.exports = pluginCreator;
diff --git a/node_modules/postcss-normalize-unicode/types/index.d.ts b/node_modules/postcss-normalize-unicode/types/index.d.ts
deleted file mode 100644
index 9d7777f9..00000000
--- a/node_modules/postcss-normalize-unicode/types/index.d.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-export = pluginCreator;
-/**
- * @typedef {{ overrideBrowserslist?: string | string[] }} AutoprefixerOptions
- * @typedef {Pick<browserslist.Options, 'stats' | 'path' | 'env'>} BrowserslistOptions
- * @typedef {AutoprefixerOptions & BrowserslistOptions} Options
- */
-/**
- * @type {import('postcss').PluginCreator<Options>}
- * @param {Options} opts
- * @return {import('postcss').Plugin}
- */
-declare function pluginCreator(opts?: Options): import('postcss').Plugin;
-declare namespace pluginCreator {
- export { postcss, AutoprefixerOptions, BrowserslistOptions, Options };
-}
-type Options = AutoprefixerOptions & BrowserslistOptions;
-declare var postcss: true;
-type AutoprefixerOptions = {
- overrideBrowserslist?: string | string[];
-};
-type BrowserslistOptions = Pick<browserslist.Options, 'stats' | 'path' | 'env'>;
-import browserslist = require("browserslist");
-//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/postcss-normalize-unicode/types/index.d.ts.map b/node_modules/postcss-normalize-unicode/types/index.d.ts.map
deleted file mode 100644
index c1bcf467..00000000
--- a/node_modules/postcss-normalize-unicode/types/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AA2FA;;;;GAIG;AAEH;;;;GAIG;AACH,sCAHW,OAAO,GACN,OAAO,SAAS,EAAE,MAAM,CAwCnC;;;;eA9CY,mBAAmB,GAAG,mBAAmB;;2BAFzC;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE;2BAC5C,KAAK,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC"} \ No newline at end of file