Add settings page for managing forecasting API key and URL via UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-20 14:37:36 +00:00
parent cae411eae7
commit 1c411e402e
19809 changed files with 1962608 additions and 97 deletions

View file

@ -0,0 +1,32 @@
//#region src/server/colors/_internal/parseHex.ts
const BLACK = [
0,
0,
0
];
const HEX_COLOR_REGEX = /^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$/;
/**
* Parses a hex color string (e.g. "#ff0000", "#f00", "ff0000") into
* an [r, g, b] tuple. Used by `hex()` and `bgHex()` to convert
* user-provided hex values into RGB components for ANSI escape codes.
*
* Only #RGB and #RRGGBB formats are supported. #RGBA and #RRGGBBAA
* are not accepted because ANSI terminals do not support alpha channels.
* Returns [0, 0, 0] (black) for invalid input.
*
* @param hex - A hex color string, with or without the leading `#`.
* @returns An `[r, g, b]` tuple with each component in the 0255 range.
*/
function parseHex(hex) {
const raw = hex.startsWith("#") ? hex.slice(1) : hex;
if (!HEX_COLOR_REGEX.test(raw)) return BLACK;
const full = raw.length === 3 ? raw[0] + raw[0] + raw[1] + raw[1] + raw[2] + raw[2] : raw;
const colorValue = parseInt(full, 16);
return [
colorValue >> 16 & 255,
colorValue >> 8 & 255,
colorValue & 255
];
}
//#endregion
exports.parseHex = parseHex;

View file

@ -0,0 +1,32 @@
//#region src/server/colors/_internal/parseHex.ts
const BLACK = [
0,
0,
0
];
const HEX_COLOR_REGEX = /^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$/;
/**
* Parses a hex color string (e.g. "#ff0000", "#f00", "ff0000") into
* an [r, g, b] tuple. Used by `hex()` and `bgHex()` to convert
* user-provided hex values into RGB components for ANSI escape codes.
*
* Only #RGB and #RRGGBB formats are supported. #RGBA and #RRGGBBAA
* are not accepted because ANSI terminals do not support alpha channels.
* Returns [0, 0, 0] (black) for invalid input.
*
* @param hex - A hex color string, with or without the leading `#`.
* @returns An `[r, g, b]` tuple with each component in the 0255 range.
*/
function parseHex(hex) {
const raw = hex.startsWith("#") ? hex.slice(1) : hex;
if (!HEX_COLOR_REGEX.test(raw)) return BLACK;
const full = raw.length === 3 ? raw[0] + raw[0] + raw[1] + raw[1] + raw[2] + raw[2] : raw;
const colorValue = parseInt(full, 16);
return [
colorValue >> 16 & 255,
colorValue >> 8 & 255,
colorValue & 255
];
}
//#endregion
export { parseHex };

View file

@ -0,0 +1,21 @@
//#region src/server/colors/_internal/wrapAnsi.ts
/**
* Wraps text with ANSI open/close codes for foreground colors and modifiers.
*
* If `text` already contains `close` (typically from a nested style that
* shares the same close code, e.g. `red(green('x'))` where both end with
* `\x1b[39m`), re-opens the outer style after each occurrence so the rest
* of the text keeps its color. For background colors use `wrapAnsiBg`
* instead it adds the newline handling that backgrounds need.
*
* @param open - The ANSI open code (e.g. `\x1b[31m`).
* @param close - The ANSI close code (e.g. `\x1b[39m`).
* @param text - The text to wrap.
* @returns The wrapped text.
*/
function wrapAnsi(open, close, text) {
if (text.includes(close)) text = text.replaceAll(close, close + open);
return open + text + close;
}
//#endregion
exports.wrapAnsi = wrapAnsi;

View file

@ -0,0 +1,21 @@
//#region src/server/colors/_internal/wrapAnsi.ts
/**
* Wraps text with ANSI open/close codes for foreground colors and modifiers.
*
* If `text` already contains `close` (typically from a nested style that
* shares the same close code, e.g. `red(green('x'))` where both end with
* `\x1b[39m`), re-opens the outer style after each occurrence so the rest
* of the text keeps its color. For background colors use `wrapAnsiBg`
* instead it adds the newline handling that backgrounds need.
*
* @param open - The ANSI open code (e.g. `\x1b[31m`).
* @param close - The ANSI close code (e.g. `\x1b[39m`).
* @param text - The text to wrap.
* @returns The wrapped text.
*/
function wrapAnsi(open, close, text) {
if (text.includes(close)) text = text.replaceAll(close, close + open);
return open + text + close;
}
//#endregion
export { wrapAnsi };

View file

@ -0,0 +1,30 @@
//#region src/server/colors/_internal/wrapAnsiBg.ts
/**
* Wraps text with ANSI open/close codes for background colors.
*
* On top of the basic wrap, handles two cases:
*
* 1. **Nested style sharing the same close.** If `text` already contains
* `close` (e.g. `bgRed(bgGreen('x'))` where both end with `\x1b[49m`),
* re-opens the outer style after each occurrence so the rest keeps its
* color. This step runs first.
* 2. **Multi-line text.** Terminals reset the background color at line
* boundaries, so the bg disappears after `\n` if not re-opened. Insert
* `close + open` around every newline. CRLF is treated as a single unit
* so the close sits outside both characters.
*
* Step 2 must run after step 1 otherwise the close codes that step 2
* inserts would also trigger step 1's re-open and leak duplicate codes.
*
* @param open - The ANSI background open code (e.g. `\x1b[41m`).
* @param close - The ANSI background close code (e.g. `\x1b[49m`).
* @param text - The text to wrap.
* @returns The wrapped text.
*/
function wrapAnsiBg(open, close, text) {
if (text.includes(close)) text = text.replaceAll(close, close + open);
if (text.includes("\n")) text = text.replaceAll(/\r?\n/g, (match) => close + match + open);
return open + text + close;
}
//#endregion
exports.wrapAnsiBg = wrapAnsiBg;

View file

@ -0,0 +1,30 @@
//#region src/server/colors/_internal/wrapAnsiBg.ts
/**
* Wraps text with ANSI open/close codes for background colors.
*
* On top of the basic wrap, handles two cases:
*
* 1. **Nested style sharing the same close.** If `text` already contains
* `close` (e.g. `bgRed(bgGreen('x'))` where both end with `\x1b[49m`),
* re-opens the outer style after each occurrence so the rest keeps its
* color. This step runs first.
* 2. **Multi-line text.** Terminals reset the background color at line
* boundaries, so the bg disappears after `\n` if not re-opened. Insert
* `close + open` around every newline. CRLF is treated as a single unit
* so the close sits outside both characters.
*
* Step 2 must run after step 1 otherwise the close codes that step 2
* inserts would also trigger step 1's re-open and leak duplicate codes.
*
* @param open - The ANSI background open code (e.g. `\x1b[41m`).
* @param close - The ANSI background close code (e.g. `\x1b[49m`).
* @param text - The text to wrap.
* @returns The wrapped text.
*/
function wrapAnsiBg(open, close, text) {
if (text.includes(close)) text = text.replaceAll(close, close + open);
if (text.includes("\n")) text = text.replaceAll(/\r?\n/g, (match) => close + match + open);
return open + text + close;
}
//#endregion
export { wrapAnsiBg };

View file

@ -0,0 +1,18 @@
import { ColorFunction } from "./types.mjs";
//#region src/server/colors/ansi256.d.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) foreground.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 foreground.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const orange = colors.ansi256(208);
* console.log(orange('hello'));
*/
declare function ansi256(code: number): ColorFunction;
//#endregion
export { ansi256 };

View file

@ -0,0 +1,18 @@
import { ColorFunction } from "./types.js";
//#region src/server/colors/ansi256.d.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) foreground.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 foreground.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const orange = colors.ansi256(208);
* console.log(orange('hello'));
*/
declare function ansi256(code: number): ColorFunction;
//#endregion
export { ansi256 };

View file

@ -0,0 +1,19 @@
const require_wrapAnsi = require("./_internal/wrapAnsi.js");
//#region src/server/colors/ansi256.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) foreground.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 foreground.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const orange = colors.ansi256(208);
* console.log(orange('hello'));
*/
function ansi256(code) {
return (text) => require_wrapAnsi.wrapAnsi(`\x1b[38;5;${code}m`, "\x1B[39m", text);
}
//#endregion
exports.ansi256 = ansi256;

View file

@ -0,0 +1,19 @@
import { wrapAnsi } from "./_internal/wrapAnsi.mjs";
//#region src/server/colors/ansi256.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) foreground.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 foreground.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const orange = colors.ansi256(208);
* console.log(orange('hello'));
*/
function ansi256(code) {
return (text) => wrapAnsi(`\x1b[38;5;${code}m`, "\x1B[39m", text);
}
//#endregion
export { ansi256 };

View file

@ -0,0 +1,18 @@
import { ColorFunction } from "./types.mjs";
//#region src/server/colors/bgAnsi256.d.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) background.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const warn = colors.bgAnsi256(208);
* console.log(warn('hello'));
*/
declare function bgAnsi256(code: number): ColorFunction;
//#endregion
export { bgAnsi256 };

View file

@ -0,0 +1,18 @@
import { ColorFunction } from "./types.js";
//#region src/server/colors/bgAnsi256.d.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) background.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const warn = colors.bgAnsi256(208);
* console.log(warn('hello'));
*/
declare function bgAnsi256(code: number): ColorFunction;
//#endregion
export { bgAnsi256 };

View file

@ -0,0 +1,19 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgAnsi256.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) background.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const warn = colors.bgAnsi256(208);
* console.log(warn('hello'));
*/
function bgAnsi256(code) {
return (text) => require_wrapAnsiBg.wrapAnsiBg(`\x1b[48;5;${code}m`, "\x1B[49m", text);
}
//#endregion
exports.bgAnsi256 = bgAnsi256;

View file

@ -0,0 +1,19 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgAnsi256.ts
/**
* Returns a function that wraps text with the given 8-bit (256-color) background.
*
* @param code - The 8-bit color code (0255).
* @returns A color function that wraps text with the chosen ANSI 256 background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const warn = colors.bgAnsi256(208);
* console.log(warn('hello'));
*/
function bgAnsi256(code) {
return (text) => wrapAnsiBg(`\x1b[48;5;${code}m`, "\x1B[49m", text);
}
//#endregion
export { bgAnsi256 };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlack.d.ts
/**
* Black background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlack('hello'));
*/
declare function bgBlack(text: string): string;
//#endregion
export { bgBlack };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlack.d.ts
/**
* Black background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlack('hello'));
*/
declare function bgBlack(text: string): string;
//#endregion
export { bgBlack };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgBlack.ts
/**
* Black background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlack('hello'));
*/
function bgBlack(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[40m", "\x1B[49m", text);
}
//#endregion
exports.bgBlack = bgBlack;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgBlack.ts
/**
* Black background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlack('hello'));
*/
function bgBlack(text) {
return wrapAnsiBg("\x1B[40m", "\x1B[49m", text);
}
//#endregion
export { bgBlack };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlackBright.d.ts
/**
* Bright black (gray) background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlackBright('hello'));
*/
declare function bgBlackBright(text: string): string;
//#endregion
export { bgBlackBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlackBright.d.ts
/**
* Bright black (gray) background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlackBright('hello'));
*/
declare function bgBlackBright(text: string): string;
//#endregion
export { bgBlackBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgBlackBright.ts
/**
* Bright black (gray) background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlackBright('hello'));
*/
function bgBlackBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[100m", "\x1B[49m", text);
}
//#endregion
exports.bgBlackBright = bgBlackBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgBlackBright.ts
/**
* Bright black (gray) background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlackBright('hello'));
*/
function bgBlackBright(text) {
return wrapAnsiBg("\x1B[100m", "\x1B[49m", text);
}
//#endregion
export { bgBlackBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlue.d.ts
/**
* Blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlue('hello'));
*/
declare function bgBlue(text: string): string;
//#endregion
export { bgBlue };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlue.d.ts
/**
* Blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlue('hello'));
*/
declare function bgBlue(text: string): string;
//#endregion
export { bgBlue };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgBlue.ts
/**
* Blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlue('hello'));
*/
function bgBlue(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[44m", "\x1B[49m", text);
}
//#endregion
exports.bgBlue = bgBlue;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgBlue.ts
/**
* Blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlue('hello'));
*/
function bgBlue(text) {
return wrapAnsiBg("\x1B[44m", "\x1B[49m", text);
}
//#endregion
export { bgBlue };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlueBright.d.ts
/**
* Bright blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlueBright('hello'));
*/
declare function bgBlueBright(text: string): string;
//#endregion
export { bgBlueBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgBlueBright.d.ts
/**
* Bright blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlueBright('hello'));
*/
declare function bgBlueBright(text: string): string;
//#endregion
export { bgBlueBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgBlueBright.ts
/**
* Bright blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlueBright('hello'));
*/
function bgBlueBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[104m", "\x1B[49m", text);
}
//#endregion
exports.bgBlueBright = bgBlueBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgBlueBright.ts
/**
* Bright blue background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgBlueBright('hello'));
*/
function bgBlueBright(text) {
return wrapAnsiBg("\x1B[104m", "\x1B[49m", text);
}
//#endregion
export { bgBlueBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgCyan.d.ts
/**
* Cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyan('hello'));
*/
declare function bgCyan(text: string): string;
//#endregion
export { bgCyan };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgCyan.d.ts
/**
* Cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyan('hello'));
*/
declare function bgCyan(text: string): string;
//#endregion
export { bgCyan };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgCyan.ts
/**
* Cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyan('hello'));
*/
function bgCyan(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[46m", "\x1B[49m", text);
}
//#endregion
exports.bgCyan = bgCyan;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgCyan.ts
/**
* Cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyan('hello'));
*/
function bgCyan(text) {
return wrapAnsiBg("\x1B[46m", "\x1B[49m", text);
}
//#endregion
export { bgCyan };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgCyanBright.d.ts
/**
* Bright cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyanBright('hello'));
*/
declare function bgCyanBright(text: string): string;
//#endregion
export { bgCyanBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgCyanBright.d.ts
/**
* Bright cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyanBright('hello'));
*/
declare function bgCyanBright(text: string): string;
//#endregion
export { bgCyanBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgCyanBright.ts
/**
* Bright cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyanBright('hello'));
*/
function bgCyanBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[106m", "\x1B[49m", text);
}
//#endregion
exports.bgCyanBright = bgCyanBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgCyanBright.ts
/**
* Bright cyan background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgCyanBright('hello'));
*/
function bgCyanBright(text) {
return wrapAnsiBg("\x1B[106m", "\x1B[49m", text);
}
//#endregion
export { bgCyanBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgGreen.d.ts
/**
* Green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreen('hello'));
*/
declare function bgGreen(text: string): string;
//#endregion
export { bgGreen };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgGreen.d.ts
/**
* Green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreen('hello'));
*/
declare function bgGreen(text: string): string;
//#endregion
export { bgGreen };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgGreen.ts
/**
* Green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreen('hello'));
*/
function bgGreen(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[42m", "\x1B[49m", text);
}
//#endregion
exports.bgGreen = bgGreen;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgGreen.ts
/**
* Green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreen('hello'));
*/
function bgGreen(text) {
return wrapAnsiBg("\x1B[42m", "\x1B[49m", text);
}
//#endregion
export { bgGreen };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgGreenBright.d.ts
/**
* Bright green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreenBright('hello'));
*/
declare function bgGreenBright(text: string): string;
//#endregion
export { bgGreenBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgGreenBright.d.ts
/**
* Bright green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreenBright('hello'));
*/
declare function bgGreenBright(text: string): string;
//#endregion
export { bgGreenBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgGreenBright.ts
/**
* Bright green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreenBright('hello'));
*/
function bgGreenBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[102m", "\x1B[49m", text);
}
//#endregion
exports.bgGreenBright = bgGreenBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgGreenBright.ts
/**
* Bright green background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgGreenBright('hello'));
*/
function bgGreenBright(text) {
return wrapAnsiBg("\x1B[102m", "\x1B[49m", text);
}
//#endregion
export { bgGreenBright };

View file

@ -0,0 +1,18 @@
import { ColorFunction } from "./types.mjs";
//#region src/server/colors/bgHex.d.ts
/**
* Returns a function that wraps text with a 24-bit background color parsed from a hex string.
* Accepts `#RGB`, `#RRGGBB`, or the same without `#`.
*
* @param color - A hex color string (e.g. `"#ff6347"`, `"#f00"`).
* @returns A color function that wraps text with the parsed RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgHex('#ff6347')('hello'));
*/
declare function bgHex(color: string): ColorFunction;
//#endregion
export { bgHex };

View file

@ -0,0 +1,18 @@
import { ColorFunction } from "./types.js";
//#region src/server/colors/bgHex.d.ts
/**
* Returns a function that wraps text with a 24-bit background color parsed from a hex string.
* Accepts `#RGB`, `#RRGGBB`, or the same without `#`.
*
* @param color - A hex color string (e.g. `"#ff6347"`, `"#f00"`).
* @returns A color function that wraps text with the parsed RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgHex('#ff6347')('hello'));
*/
declare function bgHex(color: string): ColorFunction;
//#endregion
export { bgHex };

View file

@ -0,0 +1,21 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
const require_parseHex = require("./_internal/parseHex.js");
//#region src/server/colors/bgHex.ts
/**
* Returns a function that wraps text with a 24-bit background color parsed from a hex string.
* Accepts `#RGB`, `#RRGGBB`, or the same without `#`.
*
* @param color - A hex color string (e.g. `"#ff6347"`, `"#f00"`).
* @returns A color function that wraps text with the parsed RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgHex('#ff6347')('hello'));
*/
function bgHex(color) {
const [r, g, b] = require_parseHex.parseHex(color);
return (text) => require_wrapAnsiBg.wrapAnsiBg(`\x1b[48;2;${r};${g};${b}m`, "\x1B[49m", text);
}
//#endregion
exports.bgHex = bgHex;

View file

@ -0,0 +1,21 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
import { parseHex } from "./_internal/parseHex.mjs";
//#region src/server/colors/bgHex.ts
/**
* Returns a function that wraps text with a 24-bit background color parsed from a hex string.
* Accepts `#RGB`, `#RRGGBB`, or the same without `#`.
*
* @param color - A hex color string (e.g. `"#ff6347"`, `"#f00"`).
* @returns A color function that wraps text with the parsed RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgHex('#ff6347')('hello'));
*/
function bgHex(color) {
const [r, g, b] = parseHex(color);
return (text) => wrapAnsiBg(`\x1b[48;2;${r};${g};${b}m`, "\x1B[49m", text);
}
//#endregion
export { bgHex };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgMagenta.d.ts
/**
* Magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagenta('hello'));
*/
declare function bgMagenta(text: string): string;
//#endregion
export { bgMagenta };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgMagenta.d.ts
/**
* Magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagenta('hello'));
*/
declare function bgMagenta(text: string): string;
//#endregion
export { bgMagenta };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgMagenta.ts
/**
* Magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagenta('hello'));
*/
function bgMagenta(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[45m", "\x1B[49m", text);
}
//#endregion
exports.bgMagenta = bgMagenta;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgMagenta.ts
/**
* Magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagenta('hello'));
*/
function bgMagenta(text) {
return wrapAnsiBg("\x1B[45m", "\x1B[49m", text);
}
//#endregion
export { bgMagenta };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgMagentaBright.d.ts
/**
* Bright magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagentaBright('hello'));
*/
declare function bgMagentaBright(text: string): string;
//#endregion
export { bgMagentaBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgMagentaBright.d.ts
/**
* Bright magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagentaBright('hello'));
*/
declare function bgMagentaBright(text: string): string;
//#endregion
export { bgMagentaBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgMagentaBright.ts
/**
* Bright magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagentaBright('hello'));
*/
function bgMagentaBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[105m", "\x1B[49m", text);
}
//#endregion
exports.bgMagentaBright = bgMagentaBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgMagentaBright.ts
/**
* Bright magenta background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgMagentaBright('hello'));
*/
function bgMagentaBright(text) {
return wrapAnsiBg("\x1B[105m", "\x1B[49m", text);
}
//#endregion
export { bgMagentaBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgRed.d.ts
/**
* Red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRed('hello'));
*/
declare function bgRed(text: string): string;
//#endregion
export { bgRed };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgRed.d.ts
/**
* Red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRed('hello'));
*/
declare function bgRed(text: string): string;
//#endregion
export { bgRed };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgRed.ts
/**
* Red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRed('hello'));
*/
function bgRed(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[41m", "\x1B[49m", text);
}
//#endregion
exports.bgRed = bgRed;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgRed.ts
/**
* Red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRed('hello'));
*/
function bgRed(text) {
return wrapAnsiBg("\x1B[41m", "\x1B[49m", text);
}
//#endregion
export { bgRed };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgRedBright.d.ts
/**
* Bright red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRedBright('hello'));
*/
declare function bgRedBright(text: string): string;
//#endregion
export { bgRedBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgRedBright.d.ts
/**
* Bright red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRedBright('hello'));
*/
declare function bgRedBright(text: string): string;
//#endregion
export { bgRedBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgRedBright.ts
/**
* Bright red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRedBright('hello'));
*/
function bgRedBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[101m", "\x1B[49m", text);
}
//#endregion
exports.bgRedBright = bgRedBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgRedBright.ts
/**
* Bright red background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgRedBright('hello'));
*/
function bgRedBright(text) {
return wrapAnsiBg("\x1B[101m", "\x1B[49m", text);
}
//#endregion
export { bgRedBright };

View file

@ -0,0 +1,20 @@
import { ColorFunction } from "./types.mjs";
//#region src/server/colors/bgRgb.d.ts
/**
* Returns a function that wraps text with the given 24-bit (truecolor) background.
*
* @param r - Red component (0255).
* @param g - Green component (0255).
* @param b - Blue component (0255).
* @returns A color function that wraps text with the chosen RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const highlight = colors.bgRgb(255, 99, 71);
* console.log(highlight('hello'));
*/
declare function bgRgb(r: number, g: number, b: number): ColorFunction;
//#endregion
export { bgRgb };

View file

@ -0,0 +1,20 @@
import { ColorFunction } from "./types.js";
//#region src/server/colors/bgRgb.d.ts
/**
* Returns a function that wraps text with the given 24-bit (truecolor) background.
*
* @param r - Red component (0255).
* @param g - Green component (0255).
* @param b - Blue component (0255).
* @returns A color function that wraps text with the chosen RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const highlight = colors.bgRgb(255, 99, 71);
* console.log(highlight('hello'));
*/
declare function bgRgb(r: number, g: number, b: number): ColorFunction;
//#endregion
export { bgRgb };

View file

@ -0,0 +1,21 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgRgb.ts
/**
* Returns a function that wraps text with the given 24-bit (truecolor) background.
*
* @param r - Red component (0255).
* @param g - Green component (0255).
* @param b - Blue component (0255).
* @returns A color function that wraps text with the chosen RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const highlight = colors.bgRgb(255, 99, 71);
* console.log(highlight('hello'));
*/
function bgRgb(r, g, b) {
return (text) => require_wrapAnsiBg.wrapAnsiBg(`\x1b[48;2;${r};${g};${b}m`, "\x1B[49m", text);
}
//#endregion
exports.bgRgb = bgRgb;

View file

@ -0,0 +1,21 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgRgb.ts
/**
* Returns a function that wraps text with the given 24-bit (truecolor) background.
*
* @param r - Red component (0255).
* @param g - Green component (0255).
* @param b - Blue component (0255).
* @returns A color function that wraps text with the chosen RGB background.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* const highlight = colors.bgRgb(255, 99, 71);
* console.log(highlight('hello'));
*/
function bgRgb(r, g, b) {
return (text) => wrapAnsiBg(`\x1b[48;2;${r};${g};${b}m`, "\x1B[49m", text);
}
//#endregion
export { bgRgb };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgWhite.d.ts
/**
* White background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhite('hello'));
*/
declare function bgWhite(text: string): string;
//#endregion
export { bgWhite };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgWhite.d.ts
/**
* White background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhite('hello'));
*/
declare function bgWhite(text: string): string;
//#endregion
export { bgWhite };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgWhite.ts
/**
* White background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhite('hello'));
*/
function bgWhite(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[47m", "\x1B[49m", text);
}
//#endregion
exports.bgWhite = bgWhite;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgWhite.ts
/**
* White background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhite('hello'));
*/
function bgWhite(text) {
return wrapAnsiBg("\x1B[47m", "\x1B[49m", text);
}
//#endregion
export { bgWhite };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgWhiteBright.d.ts
/**
* Bright white background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhiteBright('hello'));
*/
declare function bgWhiteBright(text: string): string;
//#endregion
export { bgWhiteBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgWhiteBright.d.ts
/**
* Bright white background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhiteBright('hello'));
*/
declare function bgWhiteBright(text: string): string;
//#endregion
export { bgWhiteBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgWhiteBright.ts
/**
* Bright white background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhiteBright('hello'));
*/
function bgWhiteBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[107m", "\x1B[49m", text);
}
//#endregion
exports.bgWhiteBright = bgWhiteBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgWhiteBright.ts
/**
* Bright white background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgWhiteBright('hello'));
*/
function bgWhiteBright(text) {
return wrapAnsiBg("\x1B[107m", "\x1B[49m", text);
}
//#endregion
export { bgWhiteBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgYellow.d.ts
/**
* Yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellow('hello'));
*/
declare function bgYellow(text: string): string;
//#endregion
export { bgYellow };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgYellow.d.ts
/**
* Yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellow('hello'));
*/
declare function bgYellow(text: string): string;
//#endregion
export { bgYellow };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgYellow.ts
/**
* Yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellow('hello'));
*/
function bgYellow(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[43m", "\x1B[49m", text);
}
//#endregion
exports.bgYellow = bgYellow;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgYellow.ts
/**
* Yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellow('hello'));
*/
function bgYellow(text) {
return wrapAnsiBg("\x1B[43m", "\x1B[49m", text);
}
//#endregion
export { bgYellow };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgYellowBright.d.ts
/**
* Bright yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellowBright('hello'));
*/
declare function bgYellowBright(text: string): string;
//#endregion
export { bgYellowBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/bgYellowBright.d.ts
/**
* Bright yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellowBright('hello'));
*/
declare function bgYellowBright(text: string): string;
//#endregion
export { bgYellowBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsiBg = require("./_internal/wrapAnsiBg.js");
//#region src/server/colors/bgYellowBright.ts
/**
* Bright yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellowBright('hello'));
*/
function bgYellowBright(text) {
return require_wrapAnsiBg.wrapAnsiBg("\x1B[103m", "\x1B[49m", text);
}
//#endregion
exports.bgYellowBright = bgYellowBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsiBg } from "./_internal/wrapAnsiBg.mjs";
//#region src/server/colors/bgYellowBright.ts
/**
* Bright yellow background. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.bgYellowBright('hello'));
*/
function bgYellowBright(text) {
return wrapAnsiBg("\x1B[103m", "\x1B[49m", text);
}
//#endregion
export { bgYellowBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/black.d.ts
/**
* Black foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.black('hello'));
*/
declare function black(text: string): string;
//#endregion
export { black };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/black.d.ts
/**
* Black foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.black('hello'));
*/
declare function black(text: string): string;
//#endregion
export { black };

View file

@ -0,0 +1,18 @@
const require_wrapAnsi = require("./_internal/wrapAnsi.js");
//#region src/server/colors/black.ts
/**
* Black foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.black('hello'));
*/
function black(text) {
return require_wrapAnsi.wrapAnsi("\x1B[30m", "\x1B[39m", text);
}
//#endregion
exports.black = black;

View file

@ -0,0 +1,18 @@
import { wrapAnsi } from "./_internal/wrapAnsi.mjs";
//#region src/server/colors/black.ts
/**
* Black foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.black('hello'));
*/
function black(text) {
return wrapAnsi("\x1B[30m", "\x1B[39m", text);
}
//#endregion
export { black };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/blackBright.d.ts
/**
* Bright black (gray) foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blackBright('hello'));
*/
declare function blackBright(text: string): string;
//#endregion
export { blackBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/blackBright.d.ts
/**
* Bright black (gray) foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blackBright('hello'));
*/
declare function blackBright(text: string): string;
//#endregion
export { blackBright };

View file

@ -0,0 +1,18 @@
const require_wrapAnsi = require("./_internal/wrapAnsi.js");
//#region src/server/colors/blackBright.ts
/**
* Bright black (gray) foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blackBright('hello'));
*/
function blackBright(text) {
return require_wrapAnsi.wrapAnsi("\x1B[90m", "\x1B[39m", text);
}
//#endregion
exports.blackBright = blackBright;

View file

@ -0,0 +1,18 @@
import { wrapAnsi } from "./_internal/wrapAnsi.mjs";
//#region src/server/colors/blackBright.ts
/**
* Bright black (gray) foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blackBright('hello'));
*/
function blackBright(text) {
return wrapAnsi("\x1B[90m", "\x1B[39m", text);
}
//#endregion
export { blackBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/blue.d.ts
/**
* Blue foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blue('hello'));
*/
declare function blue(text: string): string;
//#endregion
export { blue };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/blue.d.ts
/**
* Blue foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blue('hello'));
*/
declare function blue(text: string): string;
//#endregion
export { blue };

View file

@ -0,0 +1,18 @@
const require_wrapAnsi = require("./_internal/wrapAnsi.js");
//#region src/server/colors/blue.ts
/**
* Blue foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blue('hello'));
*/
function blue(text) {
return require_wrapAnsi.wrapAnsi("\x1B[34m", "\x1B[39m", text);
}
//#endregion
exports.blue = blue;

View file

@ -0,0 +1,18 @@
import { wrapAnsi } from "./_internal/wrapAnsi.mjs";
//#region src/server/colors/blue.ts
/**
* Blue foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blue('hello'));
*/
function blue(text) {
return wrapAnsi("\x1B[34m", "\x1B[39m", text);
}
//#endregion
export { blue };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/blueBright.d.ts
/**
* Bright blue foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blueBright('hello'));
*/
declare function blueBright(text: string): string;
//#endregion
export { blueBright };

View file

@ -0,0 +1,15 @@
//#region src/server/colors/blueBright.d.ts
/**
* Bright blue foreground. Wraps text with ANSI codes.
*
* @param text - The text to style.
* @returns The styled text.
*
* @example
* import { colors } from 'es-toolkit/server';
*
* console.log(colors.blueBright('hello'));
*/
declare function blueBright(text: string): string;
//#endregion
export { blueBright };

Some files were not shown because too many files have changed in this diff Show more