@reliverse/relico 1.4.0 → 1.4.2
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.
- package/README.md +19 -15
- package/package.json +12 -28
- /package/{bin → dist}/mod.d.ts +0 -0
- /package/{bin → dist}/mod.js +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Reliverse Relico
|
|
2
2
|
|
|
3
|
-
> @reliverse/
|
|
3
|
+
> @reliverse/dler-colors is a themeable, chainable, typed, truecolor-powered terminal styling toolkit — built for humans, not just terminals. It makes your CLI output beautiful, accessible, and expressive — with developer-first ergonomics, smart config, and blazing-fast performance.
|
|
4
4
|
|
|
5
|
-
[sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/Pb8uKbwpsJ) — [repo](https://github.com/reliverse/relico) — [npm](https://npmjs.com/@reliverse/
|
|
5
|
+
[sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/Pb8uKbwpsJ) — [repo](https://github.com/reliverse/relico) — [npm](https://npmjs.com/@reliverse/dler-colors)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
‼️Attention! The latest implementation of `@reliverse/relico` now lives in the framework repository for building libraries — `@reliverse/dler`. Please use [@reliverse/dler-colors](https://github.com/reliverse/dler/tree/main/packages/colors) instead of `@reliverse/relico`.
|
|
6
10
|
|
|
7
11
|
## Why Relico?
|
|
8
12
|
|
|
@@ -24,7 +28,7 @@ Because terminal styling shouldn't feel like duct tape. **Relico** brings design
|
|
|
24
28
|
## Installation
|
|
25
29
|
|
|
26
30
|
```bash
|
|
27
|
-
bun add @reliverse/
|
|
31
|
+
bun add @reliverse/dler-colors
|
|
28
32
|
# bun • pnpm • yarn • npm
|
|
29
33
|
```
|
|
30
34
|
|
|
@@ -91,7 +95,7 @@ The readme will be updated soon.
|
|
|
91
95
|
**If you're end-user OR developer, create `relico.config.ts` in your root**:
|
|
92
96
|
|
|
93
97
|
```ts
|
|
94
|
-
import { defineConfig } from "@reliverse/
|
|
98
|
+
import { defineConfig } from "@reliverse/dler-colors";
|
|
95
99
|
|
|
96
100
|
export default defineConfig({
|
|
97
101
|
colorLevel: 3, // 0 = off, 1 = basic, 2 = 256, 3 = truecolor
|
|
@@ -108,7 +112,7 @@ export default defineConfig({
|
|
|
108
112
|
**If you're developer, initialize in your app (optional)**:
|
|
109
113
|
|
|
110
114
|
```ts
|
|
111
|
-
import { initUserConfig, re } from "@reliverse/
|
|
115
|
+
import { initUserConfig, re } from "@reliverse/dler-colors";
|
|
112
116
|
|
|
113
117
|
// Use this to override Relico's
|
|
114
118
|
// default settings for your app
|
|
@@ -120,7 +124,7 @@ console.log(re.info("Custom config loaded!"));
|
|
|
120
124
|
## API Sneak Peek
|
|
121
125
|
|
|
122
126
|
```ts
|
|
123
|
-
import { re, rgb } from "@reliverse/
|
|
127
|
+
import { re, rgb } from "@reliverse/dler-colors";
|
|
124
128
|
|
|
125
129
|
console.log(re.red("Red!"));
|
|
126
130
|
console.log(re.bold(re.green("Bold green")));
|
|
@@ -171,7 +175,7 @@ console.log(boldRed("This text is bold and red"));
|
|
|
171
175
|
### Want to Get Only Certain Colors?
|
|
172
176
|
|
|
173
177
|
```ts
|
|
174
|
-
import type { DefaultColorKeys } from "@reliverse/
|
|
178
|
+
import type { DefaultColorKeys } from "@reliverse/dler-colors";
|
|
175
179
|
const brandColors: DefaultColorKeys[] = ["magentaBright", "maroon"];
|
|
176
180
|
```
|
|
177
181
|
|
|
@@ -180,7 +184,7 @@ const brandColors: DefaultColorKeys[] = ["magentaBright", "maroon"];
|
|
|
180
184
|
Relico detects your terminal's capability:
|
|
181
185
|
|
|
182
186
|
```ts
|
|
183
|
-
import { colorSupport } from "@reliverse/
|
|
187
|
+
import { colorSupport } from "@reliverse/dler-colors";
|
|
184
188
|
|
|
185
189
|
console.log(colorSupport.terminalName); // iTerm2, Windows Terminal, etc.
|
|
186
190
|
console.log(colorSupport.level); // 0, 1, 2, or 3
|
|
@@ -196,7 +200,7 @@ console.log(colorSupport.level); // 0, 1, 2, or 3
|
|
|
196
200
|
### Custom RGB + Hex
|
|
197
201
|
|
|
198
202
|
```ts
|
|
199
|
-
import { rgb, bgHex, hex } from "@reliverse/
|
|
203
|
+
import { rgb, bgHex, hex } from "@reliverse/dler-colors";
|
|
200
204
|
|
|
201
205
|
console.log(rgb(255, 105, 180)("Hot pink"));
|
|
202
206
|
console.log(bgHex("#1e90ff")("Dodger blue background"));
|
|
@@ -205,7 +209,7 @@ console.log(bgHex("#1e90ff")("Dodger blue background"));
|
|
|
205
209
|
### Gradients & Rainbow
|
|
206
210
|
|
|
207
211
|
```ts
|
|
208
|
-
import { gradient, multiGradient, rainbow } from "@reliverse/
|
|
212
|
+
import { gradient, multiGradient, rainbow } from "@reliverse/dler-colors";
|
|
209
213
|
|
|
210
214
|
console.log(rainbow("🎉 Woohoo!"));
|
|
211
215
|
console.log(gradient("From red to blue", "#ff0000", "#0000ff"));
|
|
@@ -218,7 +222,7 @@ This function allows you to combine multiple color formatters into a single form
|
|
|
218
222
|
## Basic Usage
|
|
219
223
|
|
|
220
224
|
```typescript
|
|
221
|
-
import { re, chain } from "@reliverse/
|
|
225
|
+
import { re, chain } from "@reliverse/dler-colors";
|
|
222
226
|
|
|
223
227
|
// Create a custom style that combines bold and red text
|
|
224
228
|
const boldRed = chain(re.bold, re.red);
|
|
@@ -236,7 +240,7 @@ console.log(importantError("CRITICAL ERROR: System failure"));
|
|
|
236
240
|
## Creating Theme Combinations
|
|
237
241
|
|
|
238
242
|
```typescript
|
|
239
|
-
import { re, chain } from "@reliverse/
|
|
243
|
+
import { re, chain } from "@reliverse/dler-colors";
|
|
240
244
|
|
|
241
245
|
// Create themed message styles
|
|
242
246
|
const successStyle = chain(re.bold, re.green);
|
|
@@ -254,7 +258,7 @@ console.log(warnStyle("⚠ API rate limit approaching"));
|
|
|
254
258
|
## Custom RGB Combinations
|
|
255
259
|
|
|
256
260
|
```typescript
|
|
257
|
-
import { re, rgb, bgRgb, chain } from "@reliverse/
|
|
261
|
+
import { re, rgb, bgRgb, chain } from "@reliverse/dler-colors";
|
|
258
262
|
|
|
259
263
|
// Create a custom color scheme with RGB values
|
|
260
264
|
const customHeader = chain(
|
|
@@ -278,7 +282,7 @@ console.log(danger("Danger: High voltage detected!"));
|
|
|
278
282
|
The `chain()` function automatically handles multiline text to prevent style leakage:
|
|
279
283
|
|
|
280
284
|
```typescript
|
|
281
|
-
import { re, chain } from "@reliverse/
|
|
285
|
+
import { re, chain } from "@reliverse/dler-colors";
|
|
282
286
|
|
|
283
287
|
const highlight = chain(re.bgYellow, re.black, re.bold);
|
|
284
288
|
|
|
@@ -293,7 +297,7 @@ console.log(highlight(multilineText));
|
|
|
293
297
|
## Creating a Simple Logger
|
|
294
298
|
|
|
295
299
|
```typescript
|
|
296
|
-
import { re, chain } from "@reliverse/
|
|
300
|
+
import { re, chain } from "@reliverse/dler-colors";
|
|
297
301
|
|
|
298
302
|
// Create logger styles
|
|
299
303
|
const styles = {
|
package/package.json
CHANGED
|
@@ -1,37 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"dependencies": {},
|
|
3
|
-
"description": "@reliverse/relico is a themeable, chainable, typed, truecolor-powered, modern terminal styling toolkit. Designed to make your CLI output colorful, accessible, and human-friendly. It gives you a flexible way to apply colors and styles — with reliability and a smart developer experience baked in. Built for humans, not just terminals.",
|
|
4
|
-
"homepage": "https://docs.reliverse.org/cli",
|
|
5
|
-
"license": "MIT",
|
|
6
2
|
"name": "@reliverse/relico",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"version": "1.4.0",
|
|
9
3
|
"author": "reliverse",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"reliverse"
|
|
16
|
-
],
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/reliverse/relico.git"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {},
|
|
4
|
+
"version": "1.4.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "@reliverse/relico is a themeable, chainable, typed, truecolor-powered, modern terminal styling toolkit. Designed to make your CLI output colorful, accessible, and human-friendly. It gives you a flexible way to apply colors and styles — with reliability and a smart developer experience baked in. Built for humans, not just terminals.",
|
|
22
7
|
"exports": {
|
|
23
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/mod.d.ts",
|
|
10
|
+
"default": "./dist/mod.js"
|
|
11
|
+
}
|
|
24
12
|
},
|
|
25
13
|
"files": [
|
|
26
|
-
"
|
|
27
|
-
"package.json"
|
|
28
|
-
"README.md",
|
|
29
|
-
"LICENSE",
|
|
30
|
-
"LICENSES"
|
|
14
|
+
"dist",
|
|
15
|
+
"package.json"
|
|
31
16
|
],
|
|
32
|
-
"main": "./bin/mod.js",
|
|
33
|
-
"module": "./bin/mod.js",
|
|
34
17
|
"publishConfig": {
|
|
35
18
|
"access": "public"
|
|
36
|
-
}
|
|
37
|
-
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT"
|
|
21
|
+
}
|
/package/{bin → dist}/mod.d.ts
RENAMED
|
File without changes
|
/package/{bin → dist}/mod.js
RENAMED
|
File without changes
|