termpainter 1.3.0 → 2.0.1

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.
Files changed (89) hide show
  1. package/README.md +192 -65
  2. package/dist/cjs/box.cjs +16 -3
  3. package/dist/cjs/box.d.cts +5 -1
  4. package/dist/cjs/box.d.ts +5 -1
  5. package/dist/cjs/box.d.ts.map +1 -1
  6. package/dist/cjs/box.js.map +1 -1
  7. package/dist/cjs/columns.cjs +30 -0
  8. package/dist/cjs/columns.d.cts +6 -0
  9. package/dist/cjs/columns.d.ts +6 -0
  10. package/dist/cjs/columns.d.ts.map +1 -0
  11. package/dist/cjs/columns.js.map +1 -0
  12. package/dist/cjs/env.cjs +3 -0
  13. package/dist/cjs/env.d.ts.map +1 -1
  14. package/dist/cjs/env.js.map +1 -1
  15. package/dist/cjs/icons.cjs +4 -0
  16. package/dist/cjs/icons.d.cts +1 -0
  17. package/dist/cjs/icons.d.ts +1 -0
  18. package/dist/cjs/icons.d.ts.map +1 -1
  19. package/dist/cjs/icons.js.map +1 -1
  20. package/dist/cjs/index.cjs +10 -1
  21. package/dist/cjs/index.d.cts +8 -0
  22. package/dist/cjs/index.d.ts +8 -0
  23. package/dist/cjs/index.d.ts.map +1 -1
  24. package/dist/cjs/index.js.map +1 -1
  25. package/dist/cjs/spinner.cjs +14 -4
  26. package/dist/cjs/spinner.d.cts +1 -0
  27. package/dist/cjs/spinner.d.ts +1 -0
  28. package/dist/cjs/spinner.d.ts.map +1 -1
  29. package/dist/cjs/spinner.js.map +1 -1
  30. package/dist/cjs/style.cjs +28 -7
  31. package/dist/cjs/style.d.cts +6 -0
  32. package/dist/cjs/style.d.ts +6 -0
  33. package/dist/cjs/style.d.ts.map +1 -1
  34. package/dist/cjs/style.js.map +1 -1
  35. package/dist/cjs/testmode.cjs +12 -0
  36. package/dist/cjs/testmode.d.cts +3 -0
  37. package/dist/cjs/testmode.d.ts +3 -0
  38. package/dist/cjs/testmode.d.ts.map +1 -0
  39. package/dist/cjs/testmode.js.map +1 -0
  40. package/dist/cjs/theme.cjs +45 -0
  41. package/dist/cjs/theme.d.cts +27 -0
  42. package/dist/cjs/theme.d.ts +27 -0
  43. package/dist/cjs/theme.d.ts.map +1 -0
  44. package/dist/cjs/theme.js.map +1 -0
  45. package/dist/cjs/truncate.cjs +27 -0
  46. package/dist/cjs/truncate.d.cts +2 -0
  47. package/dist/cjs/truncate.d.ts +2 -0
  48. package/dist/cjs/truncate.d.ts.map +1 -0
  49. package/dist/cjs/truncate.js.map +1 -0
  50. package/dist/esm/box.js +16 -3
  51. package/dist/esm/box.js.map +1 -1
  52. package/dist/esm/columns.js +27 -0
  53. package/dist/esm/columns.js.map +1 -0
  54. package/dist/esm/env.js +3 -0
  55. package/dist/esm/env.js.map +1 -1
  56. package/dist/esm/icons.js +3 -0
  57. package/dist/esm/icons.js.map +1 -1
  58. package/dist/esm/index.js +4 -0
  59. package/dist/esm/index.js.map +1 -1
  60. package/dist/esm/spinner.js +14 -4
  61. package/dist/esm/spinner.js.map +1 -1
  62. package/dist/esm/style.js +28 -7
  63. package/dist/esm/style.js.map +1 -1
  64. package/dist/esm/testmode.js +8 -0
  65. package/dist/esm/testmode.js.map +1 -0
  66. package/dist/esm/theme.js +40 -0
  67. package/dist/esm/theme.js.map +1 -0
  68. package/dist/esm/truncate.js +24 -0
  69. package/dist/esm/truncate.js.map +1 -0
  70. package/dist/types/box.d.ts +5 -1
  71. package/dist/types/box.d.ts.map +1 -1
  72. package/dist/types/columns.d.ts +6 -0
  73. package/dist/types/columns.d.ts.map +1 -0
  74. package/dist/types/env.d.ts.map +1 -1
  75. package/dist/types/icons.d.ts +1 -0
  76. package/dist/types/icons.d.ts.map +1 -1
  77. package/dist/types/index.d.ts +8 -0
  78. package/dist/types/index.d.ts.map +1 -1
  79. package/dist/types/spinner.d.ts +1 -0
  80. package/dist/types/spinner.d.ts.map +1 -1
  81. package/dist/types/style.d.ts +6 -0
  82. package/dist/types/style.d.ts.map +1 -1
  83. package/dist/types/testmode.d.ts +3 -0
  84. package/dist/types/testmode.d.ts.map +1 -0
  85. package/dist/types/theme.d.ts +27 -0
  86. package/dist/types/theme.d.ts.map +1 -0
  87. package/dist/types/truncate.d.ts +2 -0
  88. package/dist/types/truncate.d.ts.map +1 -0
  89. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # termpainter
2
2
 
3
- tired of staring at walls of plain `console.log`? termpainter gives your terminal output actual structure. colors, boxes, badges, tables, timestamps. zero dependencies, works in Node 18+ and Bun.
3
+ Build clean, structured CLI output with zero dependencies.
4
+
5
+ termpainter gives you semantic styles, boxes, tables, spinners, layouts and more. works in Node 18+ and Bun. full TypeScript support.
4
6
  ```sh
5
7
  npm install termpainter
6
8
  ```
@@ -9,9 +11,77 @@ npm install termpainter
9
11
 
10
12
  ---
11
13
 
14
+ ## real world examples
15
+
16
+ ### deploy pipeline
17
+ ```ts
18
+ import { style, box, columns } from 'termpainter'
19
+
20
+ console.log(box(
21
+ style.group('Deploy', [
22
+ style.success('Dependencies installed'),
23
+ style.success('TypeScript compiled'),
24
+ style.success('22/22 tests passed'),
25
+ style.success('Bundle created (10.5 kB)'),
26
+ ]),
27
+ { color: 'green', title: 'CI/CD' }
28
+ ))
29
+
30
+ console.log(columns(
31
+ style.group('Services', [
32
+ style.success('API'),
33
+ style.success('Auth'),
34
+ style.error('Database'),
35
+ style.warn('Cache'),
36
+ ]),
37
+ style.group('Stats', [
38
+ style.info('Uptime: 3d 2h'),
39
+ style.info('Memory: 512 MB'),
40
+ style.warn('CPU: 87%'),
41
+ style.info('Port: 3000'),
42
+ ])
43
+ ))
44
+ ```
45
+
46
+ <img src="https://raw.githubusercontent.com/abd105/termpainter/main/assets/example-deploy.png" width="500" alt="deploy pipeline example" />
47
+
48
+ ### structured logging
49
+ ```ts
50
+ import { style } from 'termpainter'
51
+
52
+ style.success('User created', { id: 847, role: 'admin', plan: 'pro' })
53
+ style.error('Request failed', { status: 503, path: '/api/checkout', retries: 3 })
54
+ style.warn('Rate limit approaching', { limit: 1000, current: 847, reset: '60s' })
55
+ style.info('Deploy started', { env: 'production', version: 'v2.0.0', region: 'us-east-1' })
56
+ ```
57
+
58
+ <img src="https://raw.githubusercontent.com/abd105/termpainter/main/assets/example-logs.png" width="400" alt="structured logging example" />
59
+
60
+ ### CLI status dashboard
61
+ ```ts
62
+ import { style, badge, columns } from 'termpainter'
63
+
64
+ console.log(columns(
65
+ style.table({ Status: 'Running', Uptime: '3d 2h', Memory: '512 MB', CPU: '12%' }),
66
+ style.table({ Region: 'us-east-1', Version: 'v2.0.0', Node: '22.x', Port: '3000' })
67
+ ))
68
+
69
+ console.log(
70
+ badge('production', 'green') + ' ' +
71
+ badge('v2.0.0', 'cyan') + ' ' +
72
+ badge('0 deps', 'magenta') + ' ' +
73
+ badge('TypeScript', 'blue')
74
+ )
75
+ ```
76
+
77
+ <img src="https://raw.githubusercontent.com/abd105/termpainter/main/assets/example-dashboard.png" width="500" alt="status dashboard example" />
78
+
79
+ ---
80
+
12
81
  ## usage
13
82
  ```ts
14
- import { style, badge, box, paint, spin, strip, setIcons, setSilent, isInteractive } from 'termpainter'
83
+ import { style, badge, box, paint, spin, strip, columns, truncate,
84
+ setIcons, setSilent, setTheme, resetTheme, setTestMode, isInteractive } from 'termpainter'
15
85
  ```
16
86
 
17
87
  ### styles
@@ -29,14 +99,12 @@ style.highlight('termpainter') // cyan
29
99
 
30
100
  ### structured log output
31
101
 
32
- any `style.*` method accepts an optional second argument a plain object whose keys and values are printed below the message, indented and with keys in cyan.
102
+ any `style.*` method accepts an optional second argument. a plain object whose keys and values are printed below the message, indented with keys in cyan.
33
103
  ```ts
34
104
  style.info('User created', { id: 123, role: 'admin' })
35
105
  // ℹ User created
36
106
  // id 123
37
107
  // role admin
38
-
39
- style.error('Request failed', { status: 503, path: '/api/data' })
40
108
  ```
41
109
 
42
110
  ### debug
@@ -51,11 +119,25 @@ DEBUG=1 node app.js # shows debug output
51
119
  node app.js # debug lines are invisible
52
120
  ```
53
121
 
122
+ ### list
123
+
124
+ bulleted list. each item can be a plain string or a pre-styled string.
125
+ ```ts
126
+ style.list(['Build started', 'Running tests', 'Deploying'])
127
+ // • Build started
128
+ // • Running tests
129
+ // • Deploying
130
+
131
+ style.list([style.success('Lint passed'), style.warn('Coverage at 74%')])
132
+
133
+ style.list(items, { bullet: '-', color: 'gray', indent: 2 })
134
+ ```
135
+
54
136
  ### badges
55
137
 
56
138
  inline labels. good for status, versions, environments.
57
139
  ```ts
58
- badge('v1.0.0', 'cyan')
140
+ badge('v2.0.0', 'cyan')
59
141
  badge('PASS', 'green')
60
142
  badge('FAIL', 'red')
61
143
  badge('production', 'green')
@@ -64,11 +146,17 @@ badge('offline', 'red')
64
146
 
65
147
  ### boxes
66
148
 
67
- draws a clean unicode border around anything. multiline works fine. fully composable pass styled strings directly.
149
+ draws a clean unicode border around anything. multiline works fine. fully composable. supports an optional title in the top border.
68
150
  ```ts
69
151
  box('Deploy complete\n3 services restarted\nAll checks passed', 'green')
70
152
  box('Critical error\nProcess exited with code 1', 'red')
71
153
  box(style.success('done')) // styled content inside a box
154
+
155
+ box('Deploy complete\n3 services restarted', { color: 'green', title: 'Deploy' })
156
+ // ╭ Deploy ──────────────────╮
157
+ // │ Deploy complete │
158
+ // │ 3 services restarted │
159
+ // ╰──────────────────────────╯
72
160
  ```
73
161
 
74
162
  ### divider
@@ -101,15 +189,6 @@ style.timestamp('Deploy complete', 'green') // timestamp in green
101
189
  style.timestamp('Connection failed', 'red') // timestamp in red
102
190
  ```
103
191
 
104
- ### paint
105
-
106
- low level, for when you need something the presets don't cover.
107
- ```ts
108
- paint('custom text', { color: 'magenta', bold: true })
109
- paint('highlighted', { color: 'white', bg: 'blue' })
110
- paint('soft note', { color: 'gray', italic: true, dim: true })
111
- ```
112
-
113
192
  ### group
114
193
 
115
194
  groups a list of already-styled lines under a labeled header.
@@ -121,27 +200,39 @@ style.group('Deploy', [
121
200
  // ▶ Deploy
122
201
  // ℹ Building
123
202
  // ✔ Done
203
+ ```
124
204
 
125
- style.group('Checks', [
126
- style.success('Lint passed'),
127
- style.warn('Coverage at 74%'),
128
- style.error('Tests failed'),
129
- ])
205
+ ### columns
206
+
207
+ renders two strings side by side, ANSI-aware. falls back to two lines in non-interactive environments.
208
+ ```ts
209
+ columns('Left content', 'Right content')
210
+ columns(style.success('Build passed'), style.info('Tests: 22/22'))
211
+ columns(badge('production', 'green'), badge('v2.0.0', 'cyan'))
212
+ columns(left, right, { width: 100, gap: 6 })
213
+ ```
214
+
215
+ ### truncate
216
+
217
+ truncates a string to a maximum visible length and appends `...`. uses `strip()` internally so ANSI codes don't count toward the length.
218
+ ```ts
219
+ truncate('very long string that overflows', 20)
220
+ // => 'very long string tha...'
221
+
222
+ truncate(style.success('Build complete'), 10)
130
223
  ```
131
224
 
132
225
  ### spinner
133
226
 
134
- animated terminal spinner. returns a handle with `succeed` and `fail` to stop it. no external dependencies. automatically degrades to a single printed line when not running in a TTY (CI, piped output).
227
+ animated terminal spinner. returns a handle with `succeed`, `fail`, and `update`. no external dependencies. automatically degrades to static output when not in a TTY.
135
228
  ```ts
136
229
  const s = spin('Deploying...')
137
230
 
138
- // later, when done:
139
- s.succeed('Deploy complete') // stops spinner, shows style.success
140
- s.fail('Deploy failed') // stops spinner, shows style.error
231
+ s.update('Still working...')
232
+ s.update('Almost done...')
141
233
 
142
- // optional: reuse the original message
143
- s.succeed()
144
- s.fail()
234
+ s.succeed('Deploy complete')
235
+ s.fail('Deploy failed')
145
236
  ```
146
237
 
147
238
  ### strip
@@ -154,57 +245,87 @@ const raw = strip(style.success('Build complete'))
154
245
  fs.appendFileSync('app.log', strip(style.info('Server started')) + '\n')
155
246
  ```
156
247
 
157
- ### silent mode
248
+ ### paint
158
249
 
159
- suppress all output globally. every function returns an empty string and produces no side effects. useful for tests, CI, and benchmarks.
250
+ low level, for when you need something the presets don't cover.
160
251
  ```ts
161
- import { setSilent } from 'termpainter'
162
-
163
- setSilent(true)
164
-
165
- style.success('done') // ''
166
- badge('v1.0.0', 'cyan') // ''
167
- box('hello') // ''
168
-
169
- setSilent(false) // restore normal output
252
+ paint('custom text', { color: 'magenta', bold: true })
253
+ paint('highlighted', { color: 'white', bg: 'blue' })
254
+ paint('soft note', { color: 'gray', italic: true, dim: true })
170
255
  ```
171
256
 
172
- ### isInteractive
257
+ ### themes
173
258
 
174
- returns `true` if stdout is an interactive TTY. useful for conditionally using spinners or dynamic layouts.
259
+ globally override colors and icons for all `style.*` methods. all keys are optional. call `resetTheme()` to restore defaults.
175
260
  ```ts
176
- import { isInteractive } from 'termpainter'
261
+ setTheme({
262
+ success: { color: 'cyan', icon: '✓' },
263
+ error: { color: 'magenta', icon: '✕' },
264
+ warn: { color: 'yellow' },
265
+ info: { color: 'blue', icon: '>' },
266
+ })
177
267
 
178
- if (isInteractive()) {
179
- const s = spin('Loading...')
180
- // ...
181
- } else {
182
- console.log(style.muted('Loading...'))
183
- }
268
+ style.success('done') // ✓ done (cyan, custom icon)
269
+ style.error('oops') // oops (magenta)
270
+
271
+ resetTheme() // back to defaults
184
272
  ```
185
273
 
186
274
  ### custom icons
187
275
 
188
276
  override the default icons for any or all style methods. unspecified keys fall back to defaults.
189
277
  ```ts
190
- import { setIcons } from 'termpainter'
191
-
192
278
  setIcons({ success: '✓', error: '✕' })
193
279
 
194
- style.success('done') // ✓ done (custom icon)
195
- style.warn('careful') // ⚠ careful (default icon unchanged)
280
+ style.success('done') // ✓ done
281
+ style.warn('careful') // ⚠ careful (default unchanged)
196
282
  ```
197
283
 
198
284
  available keys: `success`, `error`, `warn`, `info`, `debug`
199
285
 
286
+ ### silent mode
287
+
288
+ suppress all output globally. every function returns an empty string and produces no side effects. useful for tests, CI, and benchmarks.
289
+ ```ts
290
+ setSilent(true)
291
+
292
+ style.success('done') // ''
293
+ badge('v2.0.0', 'cyan') // ''
294
+ box('hello') // ''
295
+
296
+ setSilent(false) // restore normal output
297
+ ```
298
+
299
+ ### test mode
300
+
301
+ makes output deterministic for snapshot testing. `style.timestamp()` omits the time prefix, `spin()` renders statically, `isInteractive()` returns `false`.
302
+ ```ts
303
+ setTestMode(true)
304
+
305
+ style.timestamp('Server started') // 'Server started' (no [HH:MM:SS])
306
+ const s = spin('Loading...') // prints once, no animation
307
+ s.succeed('Done')
308
+
309
+ setTestMode(false)
310
+ ```
311
+
312
+ ### isInteractive
313
+
314
+ returns `true` if stdout is a TTY. always `false` in test mode.
315
+ ```ts
316
+ if (isInteractive()) {
317
+ const s = spin('Loading...')
318
+ } else {
319
+ console.log(style.muted('Loading...'))
320
+ }
321
+ ```
322
+
200
323
  ---
201
324
 
202
325
  ## color support
203
326
 
204
327
  termpainter automatically strips all ANSI codes when `NO_COLOR` is set, when running in CI, or when output is piped. your logs won't be full of broken escape sequences.
205
328
  ```ts
206
- import { isColorEnabled } from 'termpainter'
207
-
208
329
  isColorEnabled() // true in an interactive terminal, false everywhere else
209
330
  ```
210
331
 
@@ -218,26 +339,32 @@ isColorEnabled() // true in an interactive terminal, false everywhere else
218
339
  | `style.success(msg, meta?)` | green, prepends ✔ |
219
340
  | `style.warn(msg, meta?)` | yellow, prepends ⚠ |
220
341
  | `style.info(msg, meta?)` | blue, prepends ℹ |
221
- | `style.debug(msg, meta?)` | gray+dim, 🔍 prefix, only when `DEBUG` is set |
342
+ | `style.debug(msg, meta?)` | gray+dim, 🔍 prefix, only when DEBUG is set |
222
343
  | `style.muted(msg)` | gray, dimmed |
223
344
  | `style.bold(msg)` | bold white |
224
345
  | `style.highlight(msg)` | cyan |
225
346
  | `style.divider(color?)` | 40 char horizontal rule, default gray |
226
347
  | `style.table(data, color?)` | aligned key-value table, keys in cyan |
227
- | `style.timestamp(msg, color?)` | prepends [HH:MM:SS], default gray |
348
+ | `style.timestamp(msg, color?)` | prepends [HH:MM:SS], omitted in test mode |
349
+ | `style.group(label, lines[])` | labeled indented section |
350
+ | `style.list(items, options?)` | bulleted list, options: bullet, color, indent |
228
351
  | `badge(text, color?)` | [text] in chosen color, default white |
229
- | `box(text, color?)` | unicode border box, multiline and ANSI-aware |
230
- | `style.group(label, lines[])` | label in cyan, lines indented 2 spaces |
231
- | `spin(msg)` | animated spinner, returns `{ succeed(msg?), fail(msg?) }` |
232
- | `strip(str)` | removes all ANSI escape codes from a string |
233
- | `setIcons(icons)` | override icons for error, success, warn, info, debug |
234
- | `setSilent(mode)` | suppress all output globally when `true` |
235
- | `isInteractive()` | returns `true` if stdout is a TTY |
352
+ | `box(text, color or options?)` | unicode border box with optional title |
353
+ | `columns(left, right, options?)` | side by side output, options: width, gap |
354
+ | `truncate(str, maxLength)` | truncate preserving ANSI codes |
355
+ | `spin(msg)` | animated spinner, returns succeed, fail, update |
356
+ | `strip(str)` | removes all ANSI escape codes |
236
357
  | `paint(text, options?)` | raw ANSI composer |
237
- | `isColorEnabled()` | returns true if colors are active |
358
+ | `setTheme(theme)` | override colors and icons globally |
359
+ | `resetTheme()` | restore default theme |
360
+ | `setIcons(icons)` | override icons for success, error, warn, info, debug |
361
+ | `setSilent(bool)` | suppress all output globally |
362
+ | `setTestMode(bool)` | deterministic output for snapshot testing |
363
+ | `isColorEnabled()` | true if colors are active |
364
+ | `isInteractive()` | true if stdout is a TTY, false in test mode |
238
365
 
239
366
  ---
240
367
 
241
368
  ## license
242
369
 
243
- MIT © Abdullah Hashmi
370
+ MIT © Abdullah Hashmi
package/dist/cjs/box.cjs CHANGED
@@ -5,13 +5,26 @@ const paint_js_1 = require('./paint.cjs');
5
5
  const codes_js_1 = require('./codes.cjs');
6
6
  const env_js_1 = require('./env.cjs');
7
7
  const silent_js_1 = require('./silent.cjs');
8
- function box(text, color = 'white') {
8
+ function box(text, options) {
9
9
  if ((0, silent_js_1.isSilent)())
10
10
  return '';
11
+ const color = (typeof options === 'string' ? options : options?.color) ?? 'white';
12
+ const title = typeof options === 'object' ? options.title : undefined;
11
13
  const lines = text.split('\n');
12
14
  const width = Math.max(...lines.map((l) => (0, paint_js_1.strip)(l).length));
15
+ function buildTop(colorCode) {
16
+ const inner = width + 2; // total dashes without title
17
+ if (title) {
18
+ const titleSection = ` ${title} `;
19
+ const dashes = Math.max(0, inner - titleSection.length);
20
+ const raw = `╭${titleSection}${'─'.repeat(dashes)}╮`;
21
+ return colorCode ? `${colorCode}${raw}${codes_js_1.RESET}` : raw;
22
+ }
23
+ const raw = `╭${'─'.repeat(inner)}╮`;
24
+ return colorCode ? `${colorCode}${raw}${codes_js_1.RESET}` : raw;
25
+ }
13
26
  if (!(0, env_js_1.isColorEnabled)()) {
14
- const top = `╭${'─'.repeat(width + 2)}╮`;
27
+ const top = buildTop();
15
28
  const bottom = `╰${'─'.repeat(width + 2)}╯`;
16
29
  const middle = lines.map((line) => {
17
30
  const padding = ' '.repeat(width - (0, paint_js_1.strip)(line).length);
@@ -20,7 +33,7 @@ function box(text, color = 'white') {
20
33
  return [top, ...middle, bottom].join('\n');
21
34
  }
22
35
  const c = paint_js_1.fgMap[color];
23
- const top = `${c}╭${'─'.repeat(width + 2)}╮${codes_js_1.RESET}`;
36
+ const top = buildTop(c);
24
37
  const bottom = `${c}╰${'─'.repeat(width + 2)}╯${codes_js_1.RESET}`;
25
38
  const middle = lines.map((line) => {
26
39
  const padding = ' '.repeat(width - (0, paint_js_1.strip)(line).length);
@@ -1,3 +1,7 @@
1
1
  import { type Color } from './paint.js';
2
- export declare function box(text: string, color?: Color): string;
2
+ export interface BoxOptions {
3
+ color?: Color;
4
+ title?: string;
5
+ }
6
+ export declare function box(text: string, options?: Color | BoxOptions): string;
3
7
  //# sourceMappingURL=box.d.ts.map
package/dist/cjs/box.d.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  import { type Color } from './paint.js';
2
- export declare function box(text: string, color?: Color): string;
2
+ export interface BoxOptions {
3
+ color?: Color;
4
+ title?: string;
5
+ }
6
+ export declare function box(text: string, options?: Color | BoxOptions): string;
3
7
  //# sourceMappingURL=box.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,YAAY,CAAC;AAKtD,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,KAAe,GAAG,MAAM,CAwBhE"}
1
+ {"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,YAAY,CAAC;AAKtD,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,CAwCtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"box.js","sourceRoot":"","sources":["../../src/box.ts"],"names":[],"mappings":";;AAKA,kBAwBC;AA7BD,yCAAsD;AACtD,yCAAmC;AACnC,qCAA0C;AAC1C,2CAAuC;AAEvC,SAAgB,GAAG,CAAC,IAAY,EAAE,QAAe,OAAO;IACtD,IAAI,IAAA,oBAAQ,GAAE;QAAE,OAAO,EAAE,CAAC;IAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,gBAAK,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7D,IAAI,CAAC,IAAA,uBAAc,GAAE,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC;QACzC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,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CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.columns = columns;
4
+ const paint_js_1 = require('./paint.cjs');
5
+ const env_js_1 = require('./env.cjs');
6
+ const silent_js_1 = require('./silent.cjs');
7
+ function columns(left, right, options = {}) {
8
+ if ((0, silent_js_1.isSilent)())
9
+ return '';
10
+ if (!(0, env_js_1.isInteractive)()) {
11
+ return `${left}\n${right}`;
12
+ }
13
+ const totalWidth = options.width ?? 80;
14
+ const gap = options.gap ?? 4;
15
+ const colWidth = Math.floor((totalWidth - gap) / 2);
16
+ const gapStr = ' '.repeat(gap);
17
+ const leftLines = left.split('\n');
18
+ const rightLines = right.split('\n');
19
+ const lineCount = Math.max(leftLines.length, rightLines.length);
20
+ const result = [];
21
+ for (let i = 0; i < lineCount; i++) {
22
+ const l = leftLines[i] ?? '';
23
+ const r = rightLines[i] ?? '';
24
+ const visible = (0, paint_js_1.strip)(l).length;
25
+ const padding = visible < colWidth ? ' '.repeat(colWidth - visible) : '';
26
+ result.push(`${l}${padding}${gapStr}${r}`);
27
+ }
28
+ return result.join('\n');
29
+ }
30
+ //# sourceMappingURL=columns.js.map
@@ -0,0 +1,6 @@
1
+ export interface ColumnsOptions {
2
+ width?: number;
3
+ gap?: number;
4
+ }
5
+ export declare function columns(left: string, right: string, options?: ColumnsOptions): string;
6
+ //# sourceMappingURL=columns.d.ts.map
@@ -0,0 +1,6 @@
1
+ export interface ColumnsOptions {
2
+ width?: number;
3
+ gap?: number;
4
+ }
5
+ export declare function columns(left: string, right: string, options?: ColumnsOptions): string;
6
+ //# sourceMappingURL=columns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../src/columns.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,OAAO,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C,CAAC,IAAI,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAA,gBAAK,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAChC,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
package/dist/cjs/env.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isInteractive = isInteractive;
4
4
  exports.isColorEnabled = isColorEnabled;
5
+ const testmode_js_1 = require('./testmode.cjs');
5
6
  /**
6
7
  * Returns true if ANSI color codes should be emitted.
7
8
  * Colors are disabled when any of the following are true:
@@ -10,6 +11,8 @@ exports.isColorEnabled = isColorEnabled;
10
11
  * - process.stdout.isTTY is false/undefined (output is being piped)
11
12
  */
12
13
  function isInteractive() {
14
+ if ((0, testmode_js_1.isTestMode)())
15
+ return false;
13
16
  return process.stdout.isTTY === true;
14
17
  }
15
18
  function isColorEnabled() {
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAgB,cAAc,IAAI,OAAO,CAKxC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAED,wBAAgB,cAAc,IAAI,OAAO,CAKxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":";;AAOA,sCAEC;AAED,wCAKC;AAhBD;;;;;;GAMG;AACH,SAAgB,aAAa;IAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC;AACvC,CAAC;AAED,SAAgB,cAAc;IAC5B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACrD,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC/C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":";;AASA,sCAGC;AAED,wCAKC;AAnBD,+CAA2C;AAE3C;;;;;;GAMG;AACH,SAAgB,aAAa;IAC3B,IAAI,IAAA,wBAAU,GAAE;QAAE,OAAO,KAAK,CAAC;IAC/B,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC;AACvC,CAAC;AAED,SAAgB,cAAc;IAC5B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACrD,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC/C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setIcons = setIcons;
4
4
  exports.getIcons = getIcons;
5
+ exports.resetIcons = resetIcons;
5
6
  const defaults = {
6
7
  error: '✖',
7
8
  success: '✔',
@@ -16,4 +17,7 @@ function setIcons(icons) {
16
17
  function getIcons() {
17
18
  return current;
18
19
  }
20
+ function resetIcons() {
21
+ current = { ...defaults };
22
+ }
19
23
  //# sourceMappingURL=icons.js.map
@@ -7,4 +7,5 @@ export interface Icons {
7
7
  }
8
8
  export declare function setIcons(icons: Partial<Icons>): void;
9
9
  export declare function getIcons(): Icons;
10
+ export declare function resetIcons(): void;
10
11
  //# sourceMappingURL=icons.d.ts.map
@@ -7,4 +7,5 @@ export interface Icons {
7
7
  }
8
8
  export declare function setIcons(icons: Partial<Icons>): void;
9
9
  export declare function getIcons(): Icons;
10
+ export declare function resetIcons(): void;
10
11
  //# sourceMappingURL=icons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/icons.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAYD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAEpD;AAED,wBAAgB,QAAQ,IAAI,KAAK,CAEhC"}
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/icons.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAYD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAEpD;AAED,wBAAgB,QAAQ,IAAI,KAAK,CAEhC;AAED,wBAAgB,UAAU,IAAI,IAAI,CAEjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/icons.ts"],"names":[],"mappings":";;AAkBA,4BAEC;AAED,4BAEC;AAhBD,MAAM,QAAQ,GAAU;IACtB,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,IAAI,OAAO,GAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;AAErC,SAAgB,QAAQ,CAAC,KAAqB;IAC5C,OAAO,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC;AACtC,CAAC;AAED,SAAgB,QAAQ;IACtB,OAAO,OAAO,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/icons.ts"],"names":[],"mappings":";;AAkBA,4BAEC;AAED,4BAEC;AAED,gCAEC;AApBD,MAAM,QAAQ,GAAU;IACtB,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,IAAI,OAAO,GAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;AAErC,SAAgB,QAAQ,CAAC,KAAqB;IAC5C,OAAO,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC;AACtC,CAAC;AAED,SAAgB,QAAQ;IACtB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.isInteractive = exports.isColorEnabled = exports.setSilent = exports.setIcons = exports.spin = exports.box = exports.badge = exports.style = exports.strip = exports.paint = void 0;
17
+ exports.isInteractive = exports.isColorEnabled = exports.setTestMode = exports.resetTheme = exports.setTheme = exports.setSilent = exports.setIcons = exports.truncate = exports.columns = exports.spin = exports.box = exports.badge = exports.style = exports.strip = exports.paint = void 0;
18
18
  var paint_js_1 = require('./paint.cjs');
19
19
  Object.defineProperty(exports, "paint", { enumerable: true, get: function () { return paint_js_1.paint; } });
20
20
  Object.defineProperty(exports, "strip", { enumerable: true, get: function () { return paint_js_1.strip; } });
@@ -26,10 +26,19 @@ var box_js_1 = require('./box.cjs');
26
26
  Object.defineProperty(exports, "box", { enumerable: true, get: function () { return box_js_1.box; } });
27
27
  var spinner_js_1 = require('./spinner.cjs');
28
28
  Object.defineProperty(exports, "spin", { enumerable: true, get: function () { return spinner_js_1.spin; } });
29
+ var columns_js_1 = require('./columns.cjs');
30
+ Object.defineProperty(exports, "columns", { enumerable: true, get: function () { return columns_js_1.columns; } });
31
+ var truncate_js_1 = require('./truncate.cjs');
32
+ Object.defineProperty(exports, "truncate", { enumerable: true, get: function () { return truncate_js_1.truncate; } });
29
33
  var icons_js_1 = require('./icons.cjs');
30
34
  Object.defineProperty(exports, "setIcons", { enumerable: true, get: function () { return icons_js_1.setIcons; } });
31
35
  var silent_js_1 = require('./silent.cjs');
32
36
  Object.defineProperty(exports, "setSilent", { enumerable: true, get: function () { return silent_js_1.setSilent; } });
37
+ var theme_js_1 = require('./theme.cjs');
38
+ Object.defineProperty(exports, "setTheme", { enumerable: true, get: function () { return theme_js_1.setTheme; } });
39
+ Object.defineProperty(exports, "resetTheme", { enumerable: true, get: function () { return theme_js_1.resetTheme; } });
40
+ var testmode_js_1 = require('./testmode.cjs');
41
+ Object.defineProperty(exports, "setTestMode", { enumerable: true, get: function () { return testmode_js_1.setTestMode; } });
33
42
  var env_js_1 = require('./env.cjs');
34
43
  Object.defineProperty(exports, "isColorEnabled", { enumerable: true, get: function () { return env_js_1.isColorEnabled; } });
35
44
  Object.defineProperty(exports, "isInteractive", { enumerable: true, get: function () { return env_js_1.isInteractive; } });
@@ -1,13 +1,21 @@
1
1
  export { paint, strip } from './paint.js';
2
2
  export type { PaintOptions, Color } from './paint.js';
3
3
  export { style } from './style.js';
4
+ export type { ListOptions } from './style.js';
4
5
  export { badge } from './badge.js';
5
6
  export { box } from './box.js';
7
+ export type { BoxOptions } from './box.js';
6
8
  export { spin } from './spinner.js';
7
9
  export type { SpinnerHandle } from './spinner.js';
10
+ export { columns } from './columns.js';
11
+ export type { ColumnsOptions } from './columns.js';
12
+ export { truncate } from './truncate.js';
8
13
  export { setIcons } from './icons.js';
9
14
  export type { Icons } from './icons.js';
10
15
  export { setSilent } from './silent.js';
16
+ export { setTheme, resetTheme } from './theme.js';
17
+ export type { Theme, ThemeEntry } from './theme.js';
18
+ export { setTestMode } from './testmode.js';
11
19
  export { isColorEnabled, isInteractive } from './env.js';
12
20
  export * from './codes.js';
13
21
  //# sourceMappingURL=index.d.ts.map