Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
94
node_modules/yoctocolors-cjs/index.d.ts
generated
vendored
Normal file
94
node_modules/yoctocolors-cjs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
type Format = (string: string) => string;
|
||||
|
||||
declare const reset: Format;
|
||||
declare const bold: Format;
|
||||
declare const dim: Format;
|
||||
declare const italic: Format;
|
||||
declare const underline: Format;
|
||||
declare const overline: Format;
|
||||
declare const inverse: Format;
|
||||
declare const hidden: Format;
|
||||
declare const strikethrough: Format;
|
||||
|
||||
declare const black: Format;
|
||||
declare const red: Format;
|
||||
declare const green: Format;
|
||||
declare const yellow: Format;
|
||||
declare const blue: Format;
|
||||
declare const magenta: Format;
|
||||
declare const cyan: Format;
|
||||
declare const white: Format;
|
||||
declare const gray: Format;
|
||||
|
||||
declare const bgBlack: Format;
|
||||
declare const bgRed: Format;
|
||||
declare const bgGreen: Format;
|
||||
declare const bgYellow: Format;
|
||||
declare const bgBlue: Format;
|
||||
declare const bgMagenta: Format;
|
||||
declare const bgCyan: Format;
|
||||
declare const bgWhite: Format;
|
||||
declare const bgGray: Format;
|
||||
|
||||
declare const redBright: Format;
|
||||
declare const greenBright: Format;
|
||||
declare const yellowBright: Format;
|
||||
declare const blueBright: Format;
|
||||
declare const magentaBright: Format;
|
||||
declare const cyanBright: Format;
|
||||
declare const whiteBright: Format;
|
||||
|
||||
declare const bgRedBright: Format;
|
||||
declare const bgGreenBright: Format;
|
||||
declare const bgYellowBright: Format;
|
||||
declare const bgBlueBright: Format;
|
||||
declare const bgMagentaBright: Format;
|
||||
declare const bgCyanBright: Format;
|
||||
declare const bgWhiteBright: Format;
|
||||
|
||||
declare const formats: {
|
||||
reset: Format;
|
||||
bold: Format;
|
||||
dim: Format;
|
||||
italic: Format;
|
||||
underline: Format;
|
||||
overline: Format;
|
||||
inverse: Format;
|
||||
hidden: Format;
|
||||
strikethrough: Format;
|
||||
black: Format;
|
||||
red: Format;
|
||||
green: Format;
|
||||
yellow: Format;
|
||||
blue: Format;
|
||||
magenta: Format;
|
||||
cyan: Format;
|
||||
white: Format;
|
||||
gray: Format;
|
||||
bgBlack: Format;
|
||||
bgRed: Format;
|
||||
bgGreen: Format;
|
||||
bgYellow: Format;
|
||||
bgBlue: Format;
|
||||
bgMagenta: Format;
|
||||
bgCyan: Format;
|
||||
bgWhite: Format;
|
||||
bgGray: Format;
|
||||
redBright: Format;
|
||||
greenBright: Format;
|
||||
yellowBright: Format;
|
||||
blueBright: Format;
|
||||
magentaBright: Format;
|
||||
cyanBright: Format;
|
||||
whiteBright: Format;
|
||||
bgRedBright: Format;
|
||||
bgGreenBright: Format;
|
||||
bgYellowBright: Format;
|
||||
bgBlueBright: Format;
|
||||
bgMagentaBright: Format;
|
||||
bgCyanBright: Format;
|
||||
bgWhiteBright: Format;
|
||||
};
|
||||
|
||||
export = formats;
|
||||
|
||||
93
node_modules/yoctocolors-cjs/index.js
generated
vendored
Normal file
93
node_modules/yoctocolors-cjs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
const tty = require('node:tty');
|
||||
|
||||
// eslint-disable-next-line no-warning-comments
|
||||
// TODO: Use a better method when it's added to Node.js (https://github.com/nodejs/node/pull/40240)
|
||||
// Lots of optionals here to support Deno.
|
||||
const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
||||
|
||||
const format = (open, close) => {
|
||||
if (!hasColors) {
|
||||
return input => input;
|
||||
}
|
||||
|
||||
const openCode = `\u001B[${open}m`;
|
||||
const closeCode = `\u001B[${close}m`;
|
||||
|
||||
return input => {
|
||||
const string = input + ''; // eslint-disable-line no-implicit-coercion -- This is faster.
|
||||
let index = string.indexOf(closeCode);
|
||||
|
||||
if (index === -1) {
|
||||
// Note: Intentionally not using string interpolation for performance reasons.
|
||||
return openCode + string + closeCode;
|
||||
}
|
||||
|
||||
// Handle nested colors.
|
||||
|
||||
// We could have done this, but it's too slow (as of Node.js 22).
|
||||
// return openCode + string.replaceAll(closeCode, openCode) + closeCode;
|
||||
|
||||
let result = openCode;
|
||||
let lastIndex = 0;
|
||||
|
||||
while (index !== -1) {
|
||||
result += string.slice(lastIndex, index) + openCode;
|
||||
lastIndex = index + closeCode.length;
|
||||
index = string.indexOf(closeCode, lastIndex);
|
||||
}
|
||||
|
||||
result += string.slice(lastIndex) + closeCode;
|
||||
|
||||
return result;
|
||||
};
|
||||
};
|
||||
|
||||
const colors = {};
|
||||
|
||||
colors.reset = format(0, 0);
|
||||
colors.bold = format(1, 22);
|
||||
colors.dim = format(2, 22);
|
||||
colors.italic = format(3, 23);
|
||||
colors.underline = format(4, 24);
|
||||
colors.overline = format(53, 55);
|
||||
colors.inverse = format(7, 27);
|
||||
colors.hidden = format(8, 28);
|
||||
colors.strikethrough = format(9, 29);
|
||||
|
||||
colors.black = format(30, 39);
|
||||
colors.red = format(31, 39);
|
||||
colors.green = format(32, 39);
|
||||
colors.yellow = format(33, 39);
|
||||
colors.blue = format(34, 39);
|
||||
colors.magenta = format(35, 39);
|
||||
colors.cyan = format(36, 39);
|
||||
colors.white = format(37, 39);
|
||||
colors.gray = format(90, 39);
|
||||
|
||||
colors.bgBlack = format(40, 49);
|
||||
colors.bgRed = format(41, 49);
|
||||
colors.bgGreen = format(42, 49);
|
||||
colors.bgYellow = format(43, 49);
|
||||
colors.bgBlue = format(44, 49);
|
||||
colors.bgMagenta = format(45, 49);
|
||||
colors.bgCyan = format(46, 49);
|
||||
colors.bgWhite = format(47, 49);
|
||||
colors.bgGray = format(100, 49);
|
||||
|
||||
colors.redBright = format(91, 39);
|
||||
colors.greenBright = format(92, 39);
|
||||
colors.yellowBright = format(93, 39);
|
||||
colors.blueBright = format(94, 39);
|
||||
colors.magentaBright = format(95, 39);
|
||||
colors.cyanBright = format(96, 39);
|
||||
colors.whiteBright = format(97, 39);
|
||||
|
||||
colors.bgRedBright = format(101, 49);
|
||||
colors.bgGreenBright = format(102, 49);
|
||||
colors.bgYellowBright = format(103, 49);
|
||||
colors.bgBlueBright = format(104, 49);
|
||||
colors.bgMagentaBright = format(105, 49);
|
||||
colors.bgCyanBright = format(106, 49);
|
||||
colors.bgWhiteBright = format(107, 49);
|
||||
|
||||
module.exports = colors;
|
||||
9
node_modules/yoctocolors-cjs/license
generated
vendored
Normal file
9
node_modules/yoctocolors-cjs/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
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.
|
||||
67
node_modules/yoctocolors-cjs/package.json
generated
vendored
Normal file
67
node_modules/yoctocolors-cjs/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"name": "yoctocolors-cjs",
|
||||
"version": "2.1.2",
|
||||
"description": "CommonJS version - The smallest and fastest command-line coloring package on the internet",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/yoctocolors",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"main": "./index.js",
|
||||
"types": "./index.d.ts",
|
||||
"sideEffects": false,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"base.js",
|
||||
"base.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"ansi",
|
||||
"style",
|
||||
"styles",
|
||||
"tty",
|
||||
"formatting",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@jonahsnider/benchmark": "^5.0.3",
|
||||
"ansi-colors": "^4.1.3",
|
||||
"ava": "^6.1.3",
|
||||
"chalk": "^5.3.0",
|
||||
"cli-color": "^2.0.4",
|
||||
"colorette": "^2.0.20",
|
||||
"kleur": "^4.1.5",
|
||||
"nanocolors": "^0.2.13",
|
||||
"picocolors": "^1.0.1",
|
||||
"tsd": "^0.31.0",
|
||||
"xo": "^0.58.0"
|
||||
},
|
||||
"ava": {
|
||||
"environmentVariables": {
|
||||
"FORCE_COLOR": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
130
node_modules/yoctocolors-cjs/readme.md
generated
vendored
Normal file
130
node_modules/yoctocolors-cjs/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
<sup>yoctocolors 🌈</sup>
|
||||
|
||||
> The smallest and fastest command-line coloring package on the internet
|
||||
|
||||
*Check out [Chalk](https://github.com/chalk/chalk) if you want something more mature and comprehensive.*
|
||||
|
||||
## Highlights
|
||||
|
||||
- Tiny
|
||||
- Fast
|
||||
- Handles nested colors
|
||||
- Tree-shakeable
|
||||
- No dependencies
|
||||
- Actively maintained
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install yoctocolors
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import colors from 'yoctocolors';
|
||||
|
||||
console.log(colors.red('Yo!'));
|
||||
|
||||
console.log(colors.blue(`Welcome to the ${colors.green('yoctocolors')} package!`));
|
||||
```
|
||||
|
||||
You can also import colors as named imports:
|
||||
|
||||
```js
|
||||
import {red, blue, green} from 'yoctocolors';
|
||||
|
||||
console.log(red('Yo!'));
|
||||
|
||||
console.log(blue(`Welcome to the ${green('yoctocolors')} package!`));
|
||||
```
|
||||
|
||||
*This package supports [basic color detection](https://nodejs.org/api/tty.html#writestreamhascolorscount-env). Colors can be forcefully enabled by setting the `FORCE_COLOR` environment variable to `1` and can be forcefully disabled by setting `NO_COLOR` or `NODE_DISABLE_COLORS` to any value. [More info.](https://nodejs.org/api/tty.html#writestreamgetcolordepthenv)*
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset` - Reset the current style.
|
||||
- `bold` - Make the text bold.
|
||||
- `dim` - Make the text have lower opacity.
|
||||
- `italic` - Make the text italic. *(Not widely supported)*
|
||||
- `underline` - Put a horizontal line above the text. *(Not widely supported)*
|
||||
- `overline` - Put a horizontal line below the text. *(Not widely supported)*
|
||||
- `inverse`- Invert background and foreground colors.
|
||||
- `hidden` - Print the text but make it invisible.
|
||||
- `strikethrough` - Put a horizontal line through the center of the text. *(Not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
- `redBright`
|
||||
- `greenBright`
|
||||
- `yellowBright`
|
||||
- `blueBright`
|
||||
- `magentaBright`
|
||||
- `cyanBright`
|
||||
- `whiteBright`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
- `bgGray`
|
||||
- `bgRedBright`
|
||||
- `bgGreenBright`
|
||||
- `bgYellowBright`
|
||||
- `bgBlueBright`
|
||||
- `bgMagentaBright`
|
||||
- `bgCyanBright`
|
||||
- `bgWhiteBright`
|
||||
|
||||
## Prior art
|
||||
|
||||
Yes
|
||||
|
||||
## Benchmark
|
||||
|
||||
```sh
|
||||
$ ./benchmark.js
|
||||
┌─────────┬────────────────┬─────────────┐
|
||||
│ (index) │ library │ ops/sec │
|
||||
├─────────┼────────────────┼─────────────┤
|
||||
│ 0 │ 'yoctocolors' │ '8,000,000' │
|
||||
│ 1 │ 'colorette' │ '8,000,000' │
|
||||
│ 2 │ 'picocolors' │ '8,000,000' │
|
||||
│ 3 │ 'nanocolors' │ '5,988,024' │
|
||||
│ 4 │ 'chalk' │ '4,807,692' │
|
||||
│ 5 │ 'kleur/colors' │ '4,807,692' │
|
||||
│ 6 │ 'kleur' │ '4,784,689' │
|
||||
│ 7 │ 'ansi-colors' │ '2,178,649' │
|
||||
│ 8 │ 'cli-color' │ '585,138' │
|
||||
└─────────┴────────────────┴─────────────┘
|
||||
```
|
||||
|
||||
*See [benchmark.js](benchmark.js).*
|
||||
|
||||
## FAQ
|
||||
|
||||
### What is yocto?
|
||||
|
||||
[It was the smallest official unit prefix in the metric system until 2022.](https://en.wikipedia.org/wiki/Yocto-) Much smaller than nano.
|
||||
|
||||
## Related
|
||||
|
||||
- [yoctodelay](https://github.com/sindresorhus/yoctodelay) - Delay a promise a given amount of time
|
||||
- [chalk](https://github.com/chalk/chalk) - Terminal string styling
|
||||
Loading…
Add table
Add a link
Reference in a new issue