second commit
This commit is contained in:
15
node_modules/picocolors/LICENSE
generated
vendored
Normal file
15
node_modules/picocolors/LICENSE
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
21
node_modules/picocolors/README.md
generated
vendored
Normal file
21
node_modules/picocolors/README.md
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# picocolors
|
||||
|
||||
The tiniest and the fastest library for terminal output formatting with ANSI colors.
|
||||
|
||||
```javascript
|
||||
import pc from "picocolors"
|
||||
|
||||
console.log(
|
||||
pc.green(`How are ${pc.italic(`you`)} doing?`)
|
||||
)
|
||||
```
|
||||
|
||||
- **No dependencies.**
|
||||
- **14 times** smaller and **2 times** faster than chalk.
|
||||
- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist.
|
||||
- Node.js v6+ & browsers support. Support for both CJS and ESM projects.
|
||||
- TypeScript type declarations included.
|
||||
- [`NO_COLOR`](https://no-color.org/) friendly.
|
||||
|
||||
## Docs
|
||||
Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.
|
25
node_modules/picocolors/package.json
generated
vendored
Normal file
25
node_modules/picocolors/package.json
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "picocolors",
|
||||
"version": "1.1.1",
|
||||
"main": "./picocolors.js",
|
||||
"types": "./picocolors.d.ts",
|
||||
"browser": {
|
||||
"./picocolors.js": "./picocolors.browser.js"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"description": "The tiniest and the fastest library for terminal output formatting with ANSI colors",
|
||||
"files": [
|
||||
"picocolors.*",
|
||||
"types.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"terminal",
|
||||
"colors",
|
||||
"formatting",
|
||||
"cli",
|
||||
"console"
|
||||
],
|
||||
"author": "Alexey Raspopov",
|
||||
"repository": "alexeyraspopov/picocolors",
|
||||
"license": "ISC"
|
||||
}
|
4
node_modules/picocolors/picocolors.browser.js
generated
vendored
Normal file
4
node_modules/picocolors/picocolors.browser.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
var x=String;
|
||||
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
|
||||
module.exports=create();
|
||||
module.exports.createColors = create;
|
5
node_modules/picocolors/picocolors.d.ts
generated
vendored
Normal file
5
node_modules/picocolors/picocolors.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { Colors } from "./types"
|
||||
|
||||
declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors }
|
||||
|
||||
export = picocolors
|
75
node_modules/picocolors/picocolors.js
generated
vendored
Normal file
75
node_modules/picocolors/picocolors.js
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
let p = process || {}, argv = p.argv || [], env = p.env || {}
|
||||
let isColorSupported =
|
||||
!(!!env.NO_COLOR || argv.includes("--no-color")) &&
|
||||
(!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI)
|
||||
|
||||
let formatter = (open, close, replace = open) =>
|
||||
input => {
|
||||
let string = "" + input, index = string.indexOf(close, open.length)
|
||||
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close
|
||||
}
|
||||
|
||||
let replaceClose = (string, close, replace, index) => {
|
||||
let result = "", cursor = 0
|
||||
do {
|
||||
result += string.substring(cursor, index) + replace
|
||||
cursor = index + close.length
|
||||
index = string.indexOf(close, cursor)
|
||||
} while (~index)
|
||||
return result + string.substring(cursor)
|
||||
}
|
||||
|
||||
let createColors = (enabled = isColorSupported) => {
|
||||
let f = enabled ? formatter : () => String
|
||||
return {
|
||||
isColorSupported: enabled,
|
||||
reset: f("\x1b[0m", "\x1b[0m"),
|
||||
bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
|
||||
dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
|
||||
italic: f("\x1b[3m", "\x1b[23m"),
|
||||
underline: f("\x1b[4m", "\x1b[24m"),
|
||||
inverse: f("\x1b[7m", "\x1b[27m"),
|
||||
hidden: f("\x1b[8m", "\x1b[28m"),
|
||||
strikethrough: f("\x1b[9m", "\x1b[29m"),
|
||||
|
||||
black: f("\x1b[30m", "\x1b[39m"),
|
||||
red: f("\x1b[31m", "\x1b[39m"),
|
||||
green: f("\x1b[32m", "\x1b[39m"),
|
||||
yellow: f("\x1b[33m", "\x1b[39m"),
|
||||
blue: f("\x1b[34m", "\x1b[39m"),
|
||||
magenta: f("\x1b[35m", "\x1b[39m"),
|
||||
cyan: f("\x1b[36m", "\x1b[39m"),
|
||||
white: f("\x1b[37m", "\x1b[39m"),
|
||||
gray: f("\x1b[90m", "\x1b[39m"),
|
||||
|
||||
bgBlack: f("\x1b[40m", "\x1b[49m"),
|
||||
bgRed: f("\x1b[41m", "\x1b[49m"),
|
||||
bgGreen: f("\x1b[42m", "\x1b[49m"),
|
||||
bgYellow: f("\x1b[43m", "\x1b[49m"),
|
||||
bgBlue: f("\x1b[44m", "\x1b[49m"),
|
||||
bgMagenta: f("\x1b[45m", "\x1b[49m"),
|
||||
bgCyan: f("\x1b[46m", "\x1b[49m"),
|
||||
bgWhite: f("\x1b[47m", "\x1b[49m"),
|
||||
|
||||
blackBright: f("\x1b[90m", "\x1b[39m"),
|
||||
redBright: f("\x1b[91m", "\x1b[39m"),
|
||||
greenBright: f("\x1b[92m", "\x1b[39m"),
|
||||
yellowBright: f("\x1b[93m", "\x1b[39m"),
|
||||
blueBright: f("\x1b[94m", "\x1b[39m"),
|
||||
magentaBright: f("\x1b[95m", "\x1b[39m"),
|
||||
cyanBright: f("\x1b[96m", "\x1b[39m"),
|
||||
whiteBright: f("\x1b[97m", "\x1b[39m"),
|
||||
|
||||
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
|
||||
bgRedBright: f("\x1b[101m", "\x1b[49m"),
|
||||
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
|
||||
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
|
||||
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
|
||||
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
|
||||
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
|
||||
bgWhiteBright: f("\x1b[107m", "\x1b[49m"),
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = createColors()
|
||||
module.exports.createColors = createColors
|
51
node_modules/picocolors/types.d.ts
generated
vendored
Normal file
51
node_modules/picocolors/types.d.ts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
export type Formatter = (input: string | number | null | undefined) => string
|
||||
|
||||
export interface Colors {
|
||||
isColorSupported: boolean
|
||||
|
||||
reset: Formatter
|
||||
bold: Formatter
|
||||
dim: Formatter
|
||||
italic: Formatter
|
||||
underline: Formatter
|
||||
inverse: Formatter
|
||||
hidden: Formatter
|
||||
strikethrough: Formatter
|
||||
|
||||
black: Formatter
|
||||
red: Formatter
|
||||
green: Formatter
|
||||
yellow: Formatter
|
||||
blue: Formatter
|
||||
magenta: Formatter
|
||||
cyan: Formatter
|
||||
white: Formatter
|
||||
gray: Formatter
|
||||
|
||||
bgBlack: Formatter
|
||||
bgRed: Formatter
|
||||
bgGreen: Formatter
|
||||
bgYellow: Formatter
|
||||
bgBlue: Formatter
|
||||
bgMagenta: Formatter
|
||||
bgCyan: Formatter
|
||||
bgWhite: Formatter
|
||||
|
||||
blackBright: Formatter
|
||||
redBright: Formatter
|
||||
greenBright: Formatter
|
||||
yellowBright: Formatter
|
||||
blueBright: Formatter
|
||||
magentaBright: Formatter
|
||||
cyanBright: Formatter
|
||||
whiteBright: Formatter
|
||||
|
||||
bgBlackBright: Formatter
|
||||
bgRedBright: Formatter
|
||||
bgGreenBright: Formatter
|
||||
bgYellowBright: Formatter
|
||||
bgBlueBright: Formatter
|
||||
bgMagentaBright: Formatter
|
||||
bgCyanBright: Formatter
|
||||
bgWhiteBright: Formatter
|
||||
}
|
Reference in New Issue
Block a user