Changeset 0c6b92a for imaps-frontend/node_modules/picocolors
- Timestamp:
- 12/12/24 17:06:06 (6 weeks ago)
- Branches:
- main
- Children:
- 79a0317
- Parents:
- d565449
- Location:
- imaps-frontend/node_modules/picocolors
- Files:
-
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified imaps-frontend/node_modules/picocolors/LICENSE ¶
rd565449 r0c6b92a 1 1 ISC License 2 2 3 Copyright (c) 2021 AlexeyRaspopov, Kostiantyn Denysov, Anton Verinov3 Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov 4 4 5 5 Permission to use, copy, modify, and/or distribute this software for any -
TabularUnified imaps-frontend/node_modules/picocolors/package.json ¶
rd565449 r0c6b92a 1 1 { 2 2 "name": "picocolors", 3 "version": "1. 0.1",3 "version": "1.1.1", 4 4 "main": "./picocolors.js", 5 5 "types": "./picocolors.d.ts", … … 11 11 "files": [ 12 12 "picocolors.*", 13 "types. ts"13 "types.d.ts" 14 14 ], 15 15 "keywords": [ -
TabularUnified imaps-frontend/node_modules/picocolors/picocolors.browser.js ¶
rd565449 r0c6b92a 1 1 var x=String; 2 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 }};2 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}}; 3 3 module.exports=create(); 4 4 module.exports.createColors = create; -
TabularUnified imaps-frontend/node_modules/picocolors/picocolors.js ¶
rd565449 r0c6b92a 1 let argv = process.argv || [], 2 env = process.env 1 let p = process || {}, argv = p.argv || [], env = p.env || {} 3 2 let isColorSupported = 4 !("NO_COLOR" in env || argv.includes("--no-color")) && 5 ("FORCE_COLOR" in env || 6 argv.includes("--color") || 7 process.platform === "win32" || 8 (require != null && require("tty").isatty(1) && env.TERM !== "dumb") || 9 "CI" in env) 3 !(!!env.NO_COLOR || argv.includes("--no-color")) && 4 (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI) 10 5 11 let formatter = 12 (open, close, replace = open) => 6 let formatter = (open, close, replace = open) => 13 7 input => { 14 let string = "" + input 15 let index = string.indexOf(close, open.length) 16 return ~index 17 ? open + replaceClose(string, close, replace, index) + close 18 : open + string + close 8 let string = "" + input, index = string.indexOf(close, open.length) 9 return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close 19 10 } 20 11 21 12 let replaceClose = (string, close, replace, index) => { 22 let result = "" 23 let cursor = 0 13 let result = "", cursor = 0 24 14 do { 25 15 result += string.substring(cursor, index) + replace … … 31 21 32 22 let createColors = (enabled = isColorSupported) => { 33 let init= enabled ? formatter : () => String23 let f = enabled ? formatter : () => String 34 24 return { 35 25 isColorSupported: enabled, 36 reset: init("\x1b[0m", "\x1b[0m"), 37 bold: init("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), 38 dim: init("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), 39 italic: init("\x1b[3m", "\x1b[23m"), 40 underline: init("\x1b[4m", "\x1b[24m"), 41 inverse: init("\x1b[7m", "\x1b[27m"), 42 hidden: init("\x1b[8m", "\x1b[28m"), 43 strikethrough: init("\x1b[9m", "\x1b[29m"), 44 black: init("\x1b[30m", "\x1b[39m"), 45 red: init("\x1b[31m", "\x1b[39m"), 46 green: init("\x1b[32m", "\x1b[39m"), 47 yellow: init("\x1b[33m", "\x1b[39m"), 48 blue: init("\x1b[34m", "\x1b[39m"), 49 magenta: init("\x1b[35m", "\x1b[39m"), 50 cyan: init("\x1b[36m", "\x1b[39m"), 51 white: init("\x1b[37m", "\x1b[39m"), 52 gray: init("\x1b[90m", "\x1b[39m"), 53 bgBlack: init("\x1b[40m", "\x1b[49m"), 54 bgRed: init("\x1b[41m", "\x1b[49m"), 55 bgGreen: init("\x1b[42m", "\x1b[49m"), 56 bgYellow: init("\x1b[43m", "\x1b[49m"), 57 bgBlue: init("\x1b[44m", "\x1b[49m"), 58 bgMagenta: init("\x1b[45m", "\x1b[49m"), 59 bgCyan: init("\x1b[46m", "\x1b[49m"), 60 bgWhite: init("\x1b[47m", "\x1b[49m"), 26 reset: f("\x1b[0m", "\x1b[0m"), 27 bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), 28 dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), 29 italic: f("\x1b[3m", "\x1b[23m"), 30 underline: f("\x1b[4m", "\x1b[24m"), 31 inverse: f("\x1b[7m", "\x1b[27m"), 32 hidden: f("\x1b[8m", "\x1b[28m"), 33 strikethrough: f("\x1b[9m", "\x1b[29m"), 34 35 black: f("\x1b[30m", "\x1b[39m"), 36 red: f("\x1b[31m", "\x1b[39m"), 37 green: f("\x1b[32m", "\x1b[39m"), 38 yellow: f("\x1b[33m", "\x1b[39m"), 39 blue: f("\x1b[34m", "\x1b[39m"), 40 magenta: f("\x1b[35m", "\x1b[39m"), 41 cyan: f("\x1b[36m", "\x1b[39m"), 42 white: f("\x1b[37m", "\x1b[39m"), 43 gray: f("\x1b[90m", "\x1b[39m"), 44 45 bgBlack: f("\x1b[40m", "\x1b[49m"), 46 bgRed: f("\x1b[41m", "\x1b[49m"), 47 bgGreen: f("\x1b[42m", "\x1b[49m"), 48 bgYellow: f("\x1b[43m", "\x1b[49m"), 49 bgBlue: f("\x1b[44m", "\x1b[49m"), 50 bgMagenta: f("\x1b[45m", "\x1b[49m"), 51 bgCyan: f("\x1b[46m", "\x1b[49m"), 52 bgWhite: f("\x1b[47m", "\x1b[49m"), 53 54 blackBright: f("\x1b[90m", "\x1b[39m"), 55 redBright: f("\x1b[91m", "\x1b[39m"), 56 greenBright: f("\x1b[92m", "\x1b[39m"), 57 yellowBright: f("\x1b[93m", "\x1b[39m"), 58 blueBright: f("\x1b[94m", "\x1b[39m"), 59 magentaBright: f("\x1b[95m", "\x1b[39m"), 60 cyanBright: f("\x1b[96m", "\x1b[39m"), 61 whiteBright: f("\x1b[97m", "\x1b[39m"), 62 63 bgBlackBright: f("\x1b[100m", "\x1b[49m"), 64 bgRedBright: f("\x1b[101m", "\x1b[49m"), 65 bgGreenBright: f("\x1b[102m", "\x1b[49m"), 66 bgYellowBright: f("\x1b[103m", "\x1b[49m"), 67 bgBlueBright: f("\x1b[104m", "\x1b[49m"), 68 bgMagentaBright: f("\x1b[105m", "\x1b[49m"), 69 bgCyanBright: f("\x1b[106m", "\x1b[49m"), 70 bgWhiteBright: f("\x1b[107m", "\x1b[49m"), 61 71 } 62 72 } -
TabularUnified imaps-frontend/node_modules/picocolors/types.d.ts ¶
rd565449 r0c6b92a 3 3 export interface Colors { 4 4 isColorSupported: boolean 5 5 6 reset: Formatter 6 7 bold: Formatter … … 11 12 hidden: Formatter 12 13 strikethrough: Formatter 14 13 15 black: Formatter 14 16 red: Formatter … … 20 22 white: Formatter 21 23 gray: Formatter 24 22 25 bgBlack: Formatter 23 26 bgRed: Formatter … … 28 31 bgCyan: Formatter 29 32 bgWhite: Formatter 33 34 blackBright: Formatter 35 redBright: Formatter 36 greenBright: Formatter 37 yellowBright: Formatter 38 blueBright: Formatter 39 magentaBright: Formatter 40 cyanBright: Formatter 41 whiteBright: Formatter 42 43 bgBlackBright: Formatter 44 bgRedBright: Formatter 45 bgGreenBright: Formatter 46 bgYellowBright: Formatter 47 bgBlueBright: Formatter 48 bgMagentaBright: Formatter 49 bgCyanBright: Formatter 50 bgWhiteBright: Formatter 30 51 }
Note:
See TracChangeset
for help on using the changeset viewer.