@reliverse/relico 1.4.1 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +0,0 @@
1
- {
2
- "recommendations": [
3
- "fabiospampinato.vscode-open-multiple-files",
4
- "davidanson.vscode-markdownlint",
5
- "usernamehw.errorlens",
6
- "yoavbls.pretty-ts-errors"
7
- ]
8
- }
@@ -1,45 +0,0 @@
1
- {
2
- "editor.formatOnSave": true,
3
- "editor.codeActionsOnSave": {
4
- "source.addMissingImports.ts": "never",
5
- "source.biome": "explicit",
6
- "source.fixAll.biome": "explicit",
7
- "source.fixAll.ts": "never",
8
- "source.organizeImports.biome": "explicit",
9
- "source.organizeImports": "never",
10
- "source.removeUnused.ts": "never",
11
- "source.removeUnusedImports": "never",
12
- "source.sortImports": "never"
13
- },
14
- "editor.defaultFormatter": "biomejs.biome",
15
- "[typescript]": {
16
- "editor.defaultFormatter": "biomejs.biome"
17
- },
18
- "[json]": {
19
- "editor.defaultFormatter": "biomejs.biome"
20
- },
21
- "[javascript]": {
22
- "editor.defaultFormatter": "biomejs.biome"
23
- },
24
- "[jsonc]": {
25
- "editor.defaultFormatter": "biomejs.biome"
26
- },
27
- "[typescriptreact]": {
28
- "editor.defaultFormatter": "biomejs.biome"
29
- },
30
- "[markdown]": {
31
- "editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
32
- },
33
- "markdownlint.config": {
34
- "MD033": false,
35
- "MD024": false
36
- },
37
- "json.schemaDownload.enable": true,
38
- "css.lint.unknownAtRules": "ignore",
39
- "emmet.showExpandedAbbreviation": "never",
40
- "typescript.preferences.importModuleSpecifier": "shortest",
41
- "typescript.updateImportsOnFileMove.enabled": "never",
42
- "javascript.updateImportsOnFileMove.enabled": "never",
43
- "typescript.updateImportsOnPaste.enabled": false,
44
- "javascript.updateImportsOnPaste.enabled": false
45
- }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- # MIT License
2
-
3
- Copyright (c) Nazar Kornienko (blefnk), Bleverse, Reliverse
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/biome.json DELETED
@@ -1,86 +0,0 @@
1
- {
2
- "$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
3
- "extends": ["ultracite"],
4
- "vcs": {
5
- "enabled": false,
6
- "clientKind": "git",
7
- "useIgnoreFile": false
8
- },
9
- "files": {
10
- "ignoreUnknown": false,
11
- "maxSize": 1700000,
12
- "includes": [
13
- "**",
14
- "!**/.js",
15
- "!**/.d.ts",
16
- "!**/_generated",
17
- "!**/.basehub",
18
- "!**/.expo",
19
- "!**/.next",
20
- "!**/.nuxt",
21
- "!**/.react-email",
22
- "!**/.source",
23
- "!**/.turbo",
24
- "!**/.vercel",
25
- "!**/.wrangler",
26
- "!**/.zed",
27
- "!**/dev-dist",
28
- "!**/dist-npm",
29
- "!**/dist",
30
- "!**/drizzle/migrations",
31
- "!**/node_modules",
32
- "!**/routeTree.gen.ts",
33
- "!**/src-tauri"
34
- ]
35
- },
36
- "formatter": {
37
- "enabled": true,
38
- "indentStyle": "space",
39
- "lineWidth": 100
40
- },
41
- "linter": {
42
- "enabled": true,
43
- "rules": {
44
- "recommended": true,
45
- "suspicious": {
46
- "noConsole": "off",
47
- "noVar": "off",
48
- "noExplicitAny": "off"
49
- },
50
- "style": {
51
- "useNodejsImportProtocol": "off",
52
- "noMagicNumbers": "off",
53
- "useBlockStatements": "off"
54
- },
55
- "complexity": { "noExcessiveLinesPerFunction": "off" },
56
- "nursery": {
57
- "useConsistentTypeDefinitions": {
58
- "level": "off",
59
- "options": { "style": "interface" }
60
- }
61
- }
62
- }
63
- },
64
- "javascript": {
65
- "globals": ["Bun"],
66
- "formatter": {
67
- "jsxQuoteStyle": "double",
68
- "quoteProperties": "asNeeded",
69
- "trailingCommas": "all",
70
- "semicolons": "always",
71
- "arrowParentheses": "always",
72
- "bracketSpacing": true,
73
- "bracketSameLine": false,
74
- "quoteStyle": "double",
75
- "attributePosition": "auto"
76
- }
77
- },
78
- "assist": {
79
- "enabled": true,
80
- "actions": {
81
- "source": {
82
- "organizeImports": "on"
83
- }
84
- }
85
- }
86
- }
@@ -1,143 +0,0 @@
1
- // Bundle size analysis for relico
2
- import { readFileSync, statSync } from "fs";
3
- import { dirname, resolve } from "path";
4
- import { fileURLToPath } from "url";
5
- import { config, getEnabledDirs, getFilePaths, getImportPath } from "./config";
6
-
7
- // Get the directory where this benchmark file is located
8
- const __filename = fileURLToPath(import.meta.url);
9
- const __dirname = dirname(__filename);
10
-
11
- // Constants for size formatting
12
- const BYTES_PER_KB = 1024;
13
- const BYTES_PER_MB = 1024 * 1024;
14
- const NEWLINE_LENGTH = 1;
15
- const PERCENT_MULTIPLIER = 100;
16
- const DECIMAL_PLACES = 1;
17
- const SEPARATOR_LENGTH = 60;
18
-
19
- function getFileSize(path: string): number {
20
- try {
21
- const stats = statSync(path);
22
- return stats.size;
23
- } catch {
24
- return 0;
25
- }
26
- }
27
-
28
- function formatSize(bytes: number): string {
29
- if (bytes < BYTES_PER_KB) {
30
- return `${bytes}B`;
31
- }
32
- if (bytes < BYTES_PER_MB) {
33
- return `${(bytes / BYTES_PER_KB).toFixed(DECIMAL_PLACES)}KB`;
34
- }
35
- return `${(bytes / BYTES_PER_MB).toFixed(DECIMAL_PLACES)}MB`;
36
- }
37
-
38
- function analyzeFile(filePath: string): { types: number; constants: number; logic: number } {
39
- try {
40
- const sourceCode = readFileSync(filePath, "utf8");
41
- const lines = sourceCode.split("\n");
42
-
43
- let typeDefinitions = 0;
44
- let constants = 0;
45
- let logic = 0;
46
-
47
- for (const line of lines) {
48
- const trimmed = line.trim();
49
-
50
- // Type definitions
51
- if (trimmed.includes("type ") || trimmed.includes("interface ")) {
52
- typeDefinitions += line.length + NEWLINE_LENGTH;
53
- continue;
54
- }
55
-
56
- // Constants and color data
57
- if (
58
- trimmed.includes("const ") ||
59
- trimmed.includes("COLOR_LEVEL") ||
60
- trimmed.includes("SGR_")
61
- ) {
62
- constants += line.length + NEWLINE_LENGTH;
63
- continue;
64
- }
65
-
66
- // Everything else is logic
67
- if (trimmed.length > 0) {
68
- logic += line.length + NEWLINE_LENGTH;
69
- }
70
- }
71
-
72
- return { types: typeDefinitions, constants, logic };
73
- } catch (error) {
74
- console.warn(`āš ļø Could not analyze ${filePath}:`, error);
75
- return { types: 0, constants: 0, logic: 0 };
76
- }
77
- }
78
-
79
- function analyzeSingleDirectory(dir: "src" | "distNpmBin"): void {
80
- const importPath = getImportPath(dir);
81
- const filePaths = getFilePaths(dir);
82
-
83
- console.log(`\nšŸ” Analyzing ${dir.toUpperCase()} directory: ${importPath}`);
84
- console.log("=".repeat(SEPARATOR_LENGTH));
85
-
86
- // Analyze JavaScript/TypeScript file
87
- if (filePaths.js) {
88
- const jsFilePath = resolve(__dirname, filePaths.js);
89
- console.log(`šŸ“„ JavaScript/TypeScript file: ${filePaths.js}`);
90
- console.log(`Resolved path: ${jsFilePath}`);
91
-
92
- const jsFileSize = getFileSize(jsFilePath);
93
- if (jsFileSize === 0) {
94
- console.log(`āŒ File not found or empty: ${jsFilePath}`);
95
- } else {
96
- console.log(`File size: ${formatSize(jsFileSize)}`);
97
-
98
- const jsAnalysis = analyzeFile(jsFilePath);
99
-
100
- console.log("\nBreakdown:");
101
- console.log(
102
- `- Types: ${formatSize(jsAnalysis.types)} (${((jsAnalysis.types / jsFileSize) * PERCENT_MULTIPLIER).toFixed(DECIMAL_PLACES)}%)`,
103
- );
104
- console.log(
105
- `- Constants: ${formatSize(jsAnalysis.constants)} (${((jsAnalysis.constants / jsFileSize) * PERCENT_MULTIPLIER).toFixed(DECIMAL_PLACES)}%)`,
106
- );
107
- console.log(
108
- `- Logic: ${formatSize(jsAnalysis.logic)} (${((jsAnalysis.logic / jsFileSize) * PERCENT_MULTIPLIER).toFixed(DECIMAL_PLACES)}%)`,
109
- );
110
-
111
- if (config.bundleAnalysis.analyzeDependencies) {
112
- console.log("\nšŸ“Š Additional Info:");
113
- try {
114
- const sourceCode = readFileSync(jsFilePath, "utf8");
115
- const lines = sourceCode.split("\n");
116
- console.log(`- Total lines: ${lines.length}`);
117
- console.log("- File type: TypeScript");
118
- } catch (error) {
119
- console.log(`- Could not read file for line count: ${error}`);
120
- }
121
- }
122
- }
123
- }
124
- }
125
-
126
- function analyzeAllDirectories(): void {
127
- const enabledDirs = getEnabledDirs();
128
-
129
- for (const dir of enabledDirs) {
130
- analyzeSingleDirectory(dir);
131
- }
132
- }
133
-
134
- // Main execution
135
- console.log("šŸ“¦ Relico Bundle Size Analysis");
136
- console.log("=".repeat(50));
137
-
138
- console.log("Starting analysis...");
139
- analyzeAllDirectories();
140
- console.log("\nāœ… All analyses completed!");
141
- console.log("Starting analysis...");
142
- analyzeAllDirectories();
143
- console.log("\nāœ… All analyses completed!");
@@ -1,55 +0,0 @@
1
- // Example configuration for relico benchmarks
2
- // Copy this file to config.ts and modify as needed
3
-
4
- import type { BenchmarkConfig } from "./config";
5
-
6
- // Custom configuration example
7
- export const customConfig: BenchmarkConfig = {
8
- sourceDirs: {
9
- src: "../../src", // Source TypeScript files
10
- distNpmBin: "../../dist-npm/bin", // Binary distribution files
11
- },
12
-
13
- // Choose which directories to test
14
- enabledDirs: ["src", "distNpmBin"], // Only test src and dist-npm/bin
15
-
16
- performance: {
17
- iterations: 50_000, // Reduce iterations for faster testing
18
- warmupRuns: 500, // Reduce warmup runs
19
- },
20
-
21
- bundleAnalysis: {
22
- includeSourceMaps: false, // Skip source map analysis
23
- analyzeDependencies: true, // Include dependency analysis
24
- },
25
- };
26
-
27
- // Example: Test only source files
28
- export const sourceOnlyConfig: BenchmarkConfig = {
29
- ...customConfig,
30
- enabledDirs: ["src"],
31
- };
32
-
33
- // Example: Test only built files
34
- export const builtOnlyConfig: BenchmarkConfig = {
35
- ...customConfig,
36
- enabledDirs: ["distNpmBin"],
37
- };
38
-
39
- // Example: High-performance testing
40
- export const highPerfConfig: BenchmarkConfig = {
41
- ...customConfig,
42
- performance: {
43
- iterations: 1_000_000, // 1M iterations for accurate results
44
- warmupRuns: 10_000, // 10K warmup runs
45
- },
46
- };
47
-
48
- // Example: Quick testing
49
- export const quickConfig: BenchmarkConfig = {
50
- ...customConfig,
51
- performance: {
52
- iterations: 10_000, // 10K iterations for quick results
53
- warmupRuns: 100, // Minimal warmup
54
- },
55
- };
@@ -1,93 +0,0 @@
1
- // Benchmark configuration for relico
2
- export interface BenchmarkConfig {
3
- // Source directories to test
4
- sourceDirs: {
5
- src?: string;
6
- distNpmBin: string;
7
- };
8
-
9
- // Which directories to include in testing
10
- enabledDirs: ("src" | "distNpmBin")[];
11
-
12
- // Performance test settings
13
- performance: {
14
- iterations: number;
15
- warmupRuns: number;
16
- };
17
-
18
- // Bundle analysis settings
19
- bundleAnalysis: {
20
- includeSourceMaps: boolean;
21
- analyzeDependencies: boolean;
22
- };
23
- }
24
-
25
- // Default configuration
26
- export const defaultConfig: BenchmarkConfig = {
27
- sourceDirs: {
28
- src: "../../src",
29
- distNpmBin: "../../dist-npm/bin", // Binary distribution (where .js and .d.ts files are)
30
- },
31
-
32
- // Test source directory by default since we don't have a built version
33
- enabledDirs: ["src"],
34
-
35
- performance: {
36
- iterations: 100_000,
37
- warmupRuns: 1000,
38
- },
39
-
40
- bundleAnalysis: {
41
- includeSourceMaps: false,
42
- analyzeDependencies: true,
43
- },
44
- };
45
-
46
- // Helper function to get import path for a specific directory
47
- export function getImportPath(dir: keyof BenchmarkConfig["sourceDirs"], module = "mod"): string {
48
- const config = defaultConfig;
49
- const basePath = config.sourceDirs[dir];
50
-
51
- switch (dir) {
52
- case "src":
53
- return `${basePath}/${module}.ts`;
54
- case "distNpmBin":
55
- return `${basePath}/${module}.js`;
56
- default:
57
- return `${basePath}/${module}.ts`;
58
- }
59
- }
60
-
61
- // Helper function to get file paths for analysis (both .js and .d.ts files)
62
- export function getFilePaths(
63
- dir: keyof BenchmarkConfig["sourceDirs"],
64
- module = "mod",
65
- ): { js?: string; dts?: string } {
66
- const config = defaultConfig;
67
- const basePath = config.sourceDirs[dir];
68
-
69
- switch (dir) {
70
- case "src":
71
- return { js: `${basePath}/${module}.ts` };
72
- case "distNpmBin":
73
- return {
74
- js: `${basePath}/${module}.js`,
75
- dts: `${basePath}/${module}.d.ts`,
76
- };
77
- default:
78
- return { js: `${basePath}/${module}.ts` };
79
- }
80
- }
81
-
82
- // Helper to check if directory is enabled
83
- export function isDirEnabled(dir: keyof BenchmarkConfig["sourceDirs"]): boolean {
84
- return defaultConfig.enabledDirs.includes(dir);
85
- }
86
-
87
- // Helper to get all enabled directories
88
- export function getEnabledDirs(): (keyof BenchmarkConfig["sourceDirs"])[] {
89
- return defaultConfig.enabledDirs;
90
- }
91
-
92
- // Export the config for easy access
93
- export const config = defaultConfig;
@@ -1,172 +0,0 @@
1
- // Performance benchmarks for relico optimizations
2
-
3
- import { dirname, resolve } from "path";
4
- import { performance } from "perf_hooks";
5
- import { fileURLToPath } from "url";
6
- import { config, getEnabledDirs, getImportPath } from "./config";
7
-
8
- // Constants
9
- const MILLISECONDS_PER_SECOND = 1000;
10
- const COLOR_LEVEL_BASIC = 1;
11
- const COLOR_LEVEL_TRUECOLOR = 3;
12
- const MULTILINE_TEST_SIZE = 50;
13
-
14
- // Get the directory where this benchmark file is located
15
- const __filename = fileURLToPath(import.meta.url);
16
- const __dirname = dirname(__filename);
17
-
18
- // Dynamic imports for different source directories
19
- async function importFromDir(dir: string) {
20
- try {
21
- const resolvedPath = resolve(__dirname, dir);
22
- const module = await import(resolvedPath);
23
- return module;
24
- } catch (error) {
25
- const errorMessage = error instanceof Error ? error.message : String(error);
26
- console.warn(`āš ļø Could not import from ${dir}:`, errorMessage);
27
- return null;
28
- }
29
- }
30
-
31
- interface ModuleExports {
32
- re: any;
33
- chain: any;
34
- setColorLevel: (level: number) => void;
35
- }
36
-
37
- // Run benchmarks for a specific module
38
- function runBenchmarks(module: ModuleExports) {
39
- const { re, chain, setColorLevel } = module;
40
- const { iterations, warmupRuns } = config.performance;
41
-
42
- function benchmark(name: string, fn: () => void, iterCount = iterations) {
43
- // Warmup runs
44
- for (let i = 0; i < warmupRuns; i++) {
45
- fn();
46
- }
47
-
48
- const start = performance.now();
49
- for (let i = 0; i < iterCount; i++) {
50
- fn();
51
- }
52
- const end = performance.now();
53
- const time = end - start;
54
- const opsPerSec = Math.round((iterCount * MILLISECONDS_PER_SECOND) / time);
55
- console.log(` ${name}: ${time.toFixed(2)}ms (${opsPerSec.toLocaleString()} ops/sec)`);
56
- }
57
-
58
- // Test basic color operations
59
- benchmark("Basic color access", () => {
60
- re.red("test");
61
- });
62
-
63
- benchmark("Chained colors", () => {
64
- re.bold.red.underline("test");
65
- });
66
-
67
- benchmark("Extended named colors", () => {
68
- re.orange("test");
69
- });
70
-
71
- benchmark("Bright color variants", () => {
72
- re.redBright("test");
73
- });
74
-
75
- benchmark("Chain function", () => {
76
- chain(re.bold, re.red, re.underline)("test");
77
- });
78
-
79
- benchmark("Background colors", () => {
80
- re.bgRed.white("test");
81
- });
82
-
83
- benchmark("Bright background colors", () => {
84
- re.bgRedBright.white("test");
85
- });
86
-
87
- benchmark("Complex style combinations", () => {
88
- re.bold.italic.underline.red("test");
89
- });
90
-
91
- benchmark("Style methods", () => {
92
- re.dim.strikethrough("test");
93
- });
94
-
95
- benchmark("Color level changes", () => {
96
- setColorLevel(COLOR_LEVEL_BASIC);
97
- re.red("test");
98
- setColorLevel(COLOR_LEVEL_TRUECOLOR); // Reset to truecolor
99
- });
100
-
101
- benchmark("Multiline text (small)", () => {
102
- re.red("line1\nline2\nline3");
103
- });
104
-
105
- benchmark("Multiline text (large)", () => {
106
- const largeText = new Array(MULTILINE_TEST_SIZE).fill("text").join("\n");
107
- re.red(largeText);
108
- });
109
-
110
- benchmark("Mixed background and foreground", () => {
111
- re.bgBlue.yellow.bold("test");
112
- });
113
-
114
- benchmark("All basic colors iteration", () => {
115
- const colors = ["red", "green", "blue", "yellow", "magenta", "cyan", "white", "black"];
116
- for (const color of colors) {
117
- re[color]("test");
118
- }
119
- });
120
-
121
- benchmark("Extended colors iteration", () => {
122
- const extendedColors = [
123
- "orange",
124
- "pink",
125
- "purple",
126
- "teal",
127
- "lime",
128
- "brown",
129
- "navy",
130
- "maroon",
131
- "olive",
132
- "silver",
133
- ];
134
- for (const color of extendedColors) {
135
- re[color]("test");
136
- }
137
- });
138
-
139
- console.log("\n šŸ“Š Bundle Size Test:");
140
- console.log(` Core exports imported: ${Object.keys({ re, chain, setColorLevel }).length}`);
141
- }
142
-
143
- // Test all enabled directories
144
- async function runBenchmarksForAllDirs() {
145
- const enabledDirs = getEnabledDirs();
146
-
147
- for (const dir of enabledDirs) {
148
- const importPath = getImportPath(dir);
149
- console.log(`\nšŸ” Testing ${dir.toUpperCase()} directory: ${importPath}`);
150
- console.log("=".repeat(60));
151
-
152
- const module = await importFromDir(importPath);
153
- if (!module) {
154
- continue;
155
- }
156
-
157
- // Run benchmarks for this directory
158
- runBenchmarks(module);
159
- }
160
- }
161
-
162
- // Main execution
163
- console.log("šŸš€ Relico Performance Benchmarks");
164
- console.log("=".repeat(50));
165
-
166
- runBenchmarksForAllDirs()
167
- .then(() => {
168
- console.log("\nāœ… All benchmarks completed!");
169
- })
170
- .catch((error) => {
171
- console.error("āŒ Benchmark error:", error);
172
- });
package/examples/core.ts DELETED
@@ -1,62 +0,0 @@
1
- import { chain, re, setColorLevel } from "~/mod";
2
-
3
- const COLOR_LEVEL_TRUECOLOR = 3;
4
-
5
- function main() {
6
- setColorLevel(COLOR_LEVEL_TRUECOLOR);
7
-
8
- console.log("--- Basic Color Examples ---");
9
- console.log(re.bold.red.underline("Hello"));
10
- console.log(chain(re.bold, re.red)("world"));
11
-
12
- // Additional color tests
13
- console.log("\n--- Named Color Examples ---");
14
- console.log(re.blue("Blue text"));
15
- console.log(re.green.bold("Bold green text"));
16
- console.log(re.yellow.underline("Yellow underlined text"));
17
- console.log(re.magenta.italic("Magenta italic text"));
18
- console.log(re.bgRed.white("White text on red background"));
19
- console.log(re.bgBlue.yellow("Yellow text on blue background"));
20
-
21
- console.log("\n--- Extended Named Colors ---");
22
- console.log(re.orange.bold("Orange text"));
23
- console.log(re.pink.underline("Pink text"));
24
- console.log(re.purple.italic("Purple text"));
25
- console.log(re.teal.bold("Teal text"));
26
- console.log(re.lime("Lime text"));
27
- console.log(re.brown("Brown text"));
28
- console.log(re.navy("Navy text"));
29
- console.log(re.maroon("Maroon text"));
30
- console.log(re.olive("Olive text"));
31
- console.log(re.silver("Silver text"));
32
-
33
- console.log("\n--- Bright Color Variants ---");
34
- console.log(re.redBright("Bright red text"));
35
- console.log(re.greenBright.bold("Bold bright green text"));
36
- console.log(re.blueBright.underline("Underlined bright blue text"));
37
- console.log(re.yellowBright.italic("Italic bright yellow text"));
38
-
39
- console.log("\n--- Background Colors ---");
40
- console.log(re.bgOrange.white("White text on orange background"));
41
- console.log(re.bgPink.black("Black text on pink background"));
42
- console.log(re.bgPurple.white("White text on purple background"));
43
- console.log(re.bgTeal.white("White text on teal background"));
44
-
45
- console.log("\n--- Bright Background Colors ---");
46
- console.log(re.bgRedBright.white("White text on bright red background"));
47
- console.log(re.bgGreenBright.black("Black text on bright green background"));
48
- console.log(re.bgBlueBright.white("White text on bright blue background"));
49
-
50
- console.log("\n--- Style Combinations ---");
51
- console.log(re.bold.italic.underline.red("Bold italic underlined red text"));
52
- console.log(re.dim.strikethrough.cyan("Dim strikethrough cyan text"));
53
- console.log(re.inverse.magenta("Inverse magenta text"));
54
- console.log(re.hidden("Hidden text (you might not see this)"));
55
-
56
- console.log("\n--- Chaining Examples ---");
57
- console.log(chain(re.bold, re.red, re.underline)("Chained formatting"));
58
- console.log(chain(re.italic, re.blue, re.bgYellow)("Blue italic on yellow background"));
59
- console.log(chain(re.dim, re.green)("Dim green text"));
60
- }
61
-
62
- main();