@trazum/cli 2.7.12 → 3.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 (47) hide show
  1. package/README.md +4 -2
  2. package/assets/trazum-statusline.sh +131 -0
  3. package/dist/git.d.ts +38 -0
  4. package/dist/git.d.ts.map +1 -1
  5. package/dist/git.js +54 -0
  6. package/dist/git.js.map +1 -1
  7. package/dist/i18n/en.d.ts.map +1 -1
  8. package/dist/i18n/en.js +170 -3
  9. package/dist/i18n/en.js.map +1 -1
  10. package/dist/i18n/es.d.ts.map +1 -1
  11. package/dist/i18n/es.js +174 -3
  12. package/dist/i18n/es.js.map +1 -1
  13. package/dist/i18n/types.d.ts +84 -0
  14. package/dist/i18n/types.d.ts.map +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +670 -262
  17. package/dist/index.js.map +1 -1
  18. package/dist/proactive.d.ts +344 -0
  19. package/dist/proactive.d.ts.map +1 -0
  20. package/dist/proactive.js +1079 -0
  21. package/dist/proactive.js.map +1 -0
  22. package/dist/style.d.ts +305 -26
  23. package/dist/style.d.ts.map +1 -1
  24. package/dist/style.js +449 -47
  25. package/dist/style.js.map +1 -1
  26. package/dist/watch-notify.d.ts +82 -0
  27. package/dist/watch-notify.d.ts.map +1 -0
  28. package/dist/watch-notify.js +118 -0
  29. package/dist/watch-notify.js.map +1 -0
  30. package/dist/watch-run.d.ts +7 -0
  31. package/dist/watch-run.d.ts.map +1 -1
  32. package/dist/watch-run.js.map +1 -1
  33. package/dist/weekly.d.ts +32 -0
  34. package/dist/weekly.d.ts.map +1 -0
  35. package/dist/weekly.js +119 -0
  36. package/dist/weekly.js.map +1 -0
  37. package/package.json +3 -2
  38. package/src/git.ts +77 -0
  39. package/src/i18n/en.ts +198 -3
  40. package/src/i18n/es.ts +202 -3
  41. package/src/i18n/types.ts +130 -0
  42. package/src/index.ts +715 -302
  43. package/src/proactive.ts +1319 -0
  44. package/src/style.ts +502 -54
  45. package/src/watch-notify.ts +152 -0
  46. package/src/watch-run.ts +7 -0
  47. package/src/weekly.ts +133 -0
package/dist/style.js CHANGED
@@ -1,19 +1,30 @@
1
1
  /**
2
- * The CLI's presentation layer — the 1.75 arc.
3
- *
4
- * Six painters, one measurer, one table renderer, one proportion bar, one
5
- * heading rule. Everything here decorates figures the prose already states;
6
- * the chapter-four guard strips the paint and asserts nothing was lost and
7
- * nothing was hiding in it.
8
- *
9
- * Colour is on for a TTY unless `NO_COLOR` says otherwise, and on anywhere
10
- * when `FORCE_COLOR=1` — the door the guard itself walks through, since a
11
- * test that wants to see what colour does runs under a pipe. A plain pipe
12
- * stays plain: every `trazum ... | grep` in somebody's script is owed the
13
- * bytes their script was written against.
2
+ * The one module that draws the CLI's terminal reports (#758).
3
+ *
4
+ * The commands hand it rows and sentences; it decides the colour, the width
5
+ * and the order a report is read in, so two commands cannot drift apart
6
+ * again. DESIGN.md, "Terminal", states the rules this file implements.
7
+ *
8
+ * **Colour depth comes from the terminal.** True colour where it says it has
9
+ * it (`COLORTERM`), the chosen nearest of the 256 where `TERM` says 256, the
10
+ * 16 otherwise, and nothing at all where `NO_COLOR` is set or stdout is not a
11
+ * terminal. `FORCE_COLOR` outranks all of that, with the levels other tools
12
+ * give it (1 the 16, 2 the 256, 3 true colour, 0 none): it is the door the
13
+ * tests and the drawing scripts walk through, since they run under a pipe. A
14
+ * plain pipe stays plain: every `trazum ... | grep` in somebody's script is
15
+ * owed the bytes their script was written against.
16
+ *
17
+ * **Colour never carries a meaning alone.** Every state has a word or a mark
18
+ * (`!`, `?`, `→`, `OK`, `OVER`) that a pipe carries too, and the paint only
19
+ * repeats it. The chapter-four guard in `style.test.js` strips the paint and
20
+ * asserts nothing was lost and nothing was hiding in it.
21
+ *
22
+ * **Width comes from the window**, between 60 and 76 columns: a table fits by
23
+ * narrowing its bars and then its names, never by wrapping a figure away from
24
+ * its label.
14
25
  */
15
26
  /**
16
- * The variables the decision below reads.
27
+ * The variables the decisions below read: colour depth and width.
17
28
  *
18
29
  * Exported for the same reason `LOCALE_ENV_VARS` is: the test suite has to
19
30
  * neutralise the machine before asserting on output, and a list of what to
@@ -21,20 +32,156 @@
21
32
  * drifted once already, in the other direction: `env.mjs` set `NO_COLOR` and
22
33
  * left `FORCE_COLOR` alone, so a contributor whose shell exports `FORCE_COLOR`
23
34
  * ran the whole CLI suite against painted output and twenty-nine tests failed.
35
+ * `COLUMNS` is here because a shell that exports it would otherwise narrow
36
+ * every report a test reads.
24
37
  */
25
- export const COLOUR_ENV_VARS = ['FORCE_COLOR', 'NO_COLOR'];
26
- const forced = process.env.FORCE_COLOR === '1';
27
- export const useColor = forced || (process.stdout.isTTY === true && process.env.NO_COLOR === undefined);
28
- export const c = {
29
- bold: (s) => (useColor ? `\u001b[1m${s}\u001b[22m` : s),
30
- dim: (s) => (useColor ? `\u001b[2m${s}\u001b[22m` : s),
31
- green: (s) => (useColor ? `\u001b[32m${s}\u001b[39m` : s),
32
- red: (s) => (useColor ? `\u001b[31m${s}\u001b[39m` : s),
33
- yellow: (s) => (useColor ? `\u001b[33m${s}\u001b[39m` : s),
34
- cyan: (s) => (useColor ? `\u001b[36m${s}\u001b[39m` : s),
38
+ export const TERMINAL_ENV_VARS = ['FORCE_COLOR', 'NO_COLOR', 'COLORTERM', 'TERM', 'COLUMNS'];
39
+ /**
40
+ * The depth for an environment and a stdout, as a pure function so each of
41
+ * the four answers can be asked for directly.
42
+ */
43
+ export function colourDepth(env, isTTY) {
44
+ const force = env.FORCE_COLOR;
45
+ if (force !== undefined) {
46
+ if (force === '0' || force === 'false')
47
+ return 'none';
48
+ if (force === '2')
49
+ return '256';
50
+ if (force === '3')
51
+ return 'truecolor';
52
+ return '16';
53
+ }
54
+ if (env.NO_COLOR !== undefined)
55
+ return 'none';
56
+ if (!isTTY || env.TERM === 'dumb')
57
+ return 'none';
58
+ const colorterm = (env.COLORTERM ?? '').toLowerCase();
59
+ if (colorterm === 'truecolor' || colorterm === '24bit')
60
+ return 'truecolor';
61
+ if ((env.TERM ?? '').includes('256'))
62
+ return '256';
63
+ return '16';
64
+ }
65
+ export const depth = colourDepth(process.env, process.stdout.isTTY === true);
66
+ export const useColor = depth !== 'none';
67
+ /**
68
+ * The brand's colours, from DESIGN.md's token table, at each depth.
69
+ *
70
+ * Ink and paper are the reader's: a terminal's foreground and ground are
71
+ * whatever its owner chose, and the CLI cannot see which, so it never paints
72
+ * a foreground that reads on only one of them. The brand's ink appears as the
73
+ * type inside the mark, on the acid ground, which reads on a light terminal
74
+ * and a dark one alike. The 256 values are the nearest of the fixed cube and
75
+ * grey ramp (16 to 255) by distance in RGB, worked out in
76
+ * `terminal-report.test.js`; the first 16 are left out because every theme
77
+ * redefines them.
78
+ *
79
+ * **The accent is not the page's accent text.** The page knows its ground and
80
+ * changes the accent with it (#526014 on paper, the acid on the dark canvas);
81
+ * a terminal cannot tell its own ground, so its accent is one colour that has
82
+ * to hold on both. #526014 measured 2.37:1 on the dark canvas, and the bars
83
+ * and arrows went dull where the old cyan read. #70831b is the same olive,
84
+ * same hue and saturation, at the lightness that keeps 3.5:1 or more on
85
+ * paper, white and the two dark grounds; `terminal-report.test.js` computes it.
86
+ */
87
+ export const PALETTE = {
88
+ ink: { hex: '#20231e', c256: 234, c16: 30 },
89
+ acid: { hex: '#dce94d', c256: 185, c16: 43 },
90
+ accent: { hex: '#70831b', c256: 64, c16: 36 },
35
91
  };
36
- /** The report's text column. Headings rule out to it; nothing else needs it. */
92
+ const rgb = (hex) => [1, 3, 5].map((at) => Number.parseInt(hex.slice(at, at + 2), 16)).join(';');
93
+ /** An SGR foreground (or, with `ground`, background) for a palette colour at a depth. */
94
+ function sgr(colour, at, ground = false) {
95
+ if (at === 'truecolor')
96
+ return `${ground ? 48 : 38};2;${rgb(colour.hex)}`;
97
+ if (at === '256')
98
+ return `${ground ? 48 : 38};5;${colour.c256}`;
99
+ return String(colour.c16);
100
+ }
101
+ /**
102
+ * The painters, for a depth. Exported as a factory so the tests can paint at a
103
+ * depth the machine running them does not have.
104
+ *
105
+ * Success, caution and error stay the terminal's own green, yellow and red at
106
+ * every depth: its theme already tunes those to its ground, which the CLI
107
+ * cannot see. The accent (what points: the share bars and the lever arrows)
108
+ * is the brand's at 256 and true colour and cyan in the 16, the one colour of
109
+ * the 16 no state uses. The mark is the acid ground with ink type and bold,
110
+ * and a report puts it on one figure: the one that answers its question.
111
+ */
112
+ export function painters(at) {
113
+ const wrap = (open, close) => (s) => at === 'none' || s === '' ? s : `\u001b[${open}m${s}\u001b[${close}m`;
114
+ const accent = wrap(sgr(PALETTE.accent, at), '39');
115
+ return {
116
+ bold: wrap('1', '22'),
117
+ dim: wrap('2', '22'),
118
+ green: wrap('32', '39'),
119
+ red: wrap('31', '39'),
120
+ yellow: wrap('33', '39'),
121
+ accent,
122
+ /** The name every caller used for what points; the accent now. */
123
+ cyan: accent,
124
+ mark: wrap(`1;${sgr(PALETTE.ink, at)};${sgr(PALETTE.acid, at, true)}`, '22;39;49'),
125
+ };
126
+ }
127
+ export const c = painters(depth);
128
+ /**
129
+ * The painters for standard error, which is a terminal or not on its own: the
130
+ * bill's notes on what it read are dimmed on a terminal and left plain in a
131
+ * pipe or a file.
132
+ */
133
+ export const cErr = painters(colourDepth(process.env, process.stderr.isTTY === true));
134
+ /** The report's text column when nothing says how wide the window is. */
37
135
  export const REPORT_WIDTH = 74;
136
+ /** The narrowest and widest a report is drawn, the indent included. */
137
+ export const MIN_COLUMNS = 60;
138
+ export const MAX_COLUMNS = 76;
139
+ /**
140
+ * How wide a report is drawn: the window's width when there is a window (or
141
+ * `COLUMNS` says what it is), held between 60 and 76 columns. 76 is the
142
+ * widest line the reports printed before they knew the window, so a wide
143
+ * terminal gets the layout it always had.
144
+ *
145
+ * `window` is false when nothing said how wide: a pipe or a file. Then the
146
+ * report keeps the layout it always printed there, line for line, because a
147
+ * script reading it has no window to fit and was written against those bytes;
148
+ * a name in a table is never cut for a reader with no window.
149
+ */
150
+ export function columnsFor(env, ttyColumns) {
151
+ const asked = ttyColumns !== undefined && ttyColumns > 0 ? ttyColumns : Number.parseInt(env.COLUMNS ?? '', 10);
152
+ if (!Number.isFinite(asked) || asked <= 0)
153
+ return { columns: MAX_COLUMNS, window: false };
154
+ return { columns: Math.min(MAX_COLUMNS, Math.max(MIN_COLUMNS, asked)), window: true };
155
+ }
156
+ const measured = columnsFor(process.env, process.stdout.isTTY === true ? process.stdout.columns : undefined);
157
+ export const COLUMNS = measured.columns;
158
+ export const WINDOW = measured.window;
159
+ /**
160
+ * A paragraph wrapped to `width` characters, its later lines under `indent`.
161
+ *
162
+ * Every paragraph of every command goes through here. With no window it cuts
163
+ * where it always cut; with one it also keeps the line, indent included,
164
+ * inside the window, so prose reflows down to 60 columns. Unpainted text in:
165
+ * the caller paints the result.
166
+ */
167
+ export function wrap(text, width, indent, columns = WINDOW ? COLUMNS : null) {
168
+ const room = columns === null ? width : Math.min(width, Math.max(20, columns - indent.length));
169
+ const words = text.split(/\s+/);
170
+ const lines = [];
171
+ let line = '';
172
+ for (const word of words) {
173
+ if (line.length + word.length + 1 > room) {
174
+ lines.push(line);
175
+ line = word;
176
+ }
177
+ else {
178
+ line = line ? `${line} ${word}` : word;
179
+ }
180
+ }
181
+ if (line)
182
+ lines.push(line);
183
+ return lines.join(`\n${indent}`);
184
+ }
38
185
  const ANSI = /\u001b\[[0-9;]*m/g;
39
186
  /**
40
187
  * A string's width as a terminal draws it — the ANSI codes not counted.
@@ -50,39 +197,124 @@ export function padCell(s, width, align) {
50
197
  const gap = Math.max(0, width - visibleWidth(s));
51
198
  return align === 'right' ? ' '.repeat(gap) + s : s + ' '.repeat(gap);
52
199
  }
200
+ /** A word that states a figure: it holds a digit. */
201
+ const FIGURE = /\d/;
53
202
  /**
54
- * The one table renderer, for the eleven layouts that each rebuilt it.
203
+ * A paragraph as lines no wider than `width`, a word never split.
55
204
  *
56
- * Widths come from the content, headers print dimmed, and cells may arrive
57
- * painted — the measurement ignores the paint. Returns lines; the caller
58
- * owns the `console.log` and the indent, because some tables live inside a
59
- * bullet and some at the margin.
205
+ * A figure is held to the word after it, so `126 calls` or `$5.21 projected`
206
+ * never ends one line and starts the next. Unpainted text in, unpainted
207
+ * lines out: the caller paints a line once it is cut.
60
208
  */
61
- export function table(columns, rows, indent = ' ') {
62
- const widths = columns.map((col, i) => Math.max(visibleWidth(col.header), ...rows.map((row) => visibleWidth(row[i] ?? ''))));
63
- const lines = [];
64
- if (columns.some((col) => col.header !== '')) {
65
- lines.push(indent +
66
- columns.map((col, i) => padCell(c.dim(col.header), widths[i] ?? 0, col.align)).join(' ').trimEnd());
209
+ export function wrapText(text, width) {
210
+ const words = text.split(/\s+/).filter((word) => word !== '');
211
+ const units = [];
212
+ for (let i = 0; i < words.length; i++) {
213
+ let unit = words[i];
214
+ if (FIGURE.test(unit) && i + 1 < words.length && unit.length + 1 + words[i + 1].length <= width) {
215
+ unit = `${unit} ${words[++i]}`;
216
+ }
217
+ units.push(unit);
67
218
  }
68
- for (const row of rows) {
69
- lines.push(indent + columns.map((col, i) => padCell(row[i] ?? '', widths[i] ?? 0, col.align)).join(' ').trimEnd());
219
+ const lines = [];
220
+ let line = '';
221
+ for (const unit of units) {
222
+ if (line !== '' && line.length + unit.length + 1 > width) {
223
+ lines.push(line);
224
+ line = unit;
225
+ }
226
+ else {
227
+ line = line === '' ? unit : `${line} ${unit}`;
228
+ }
70
229
  }
230
+ if (line !== '')
231
+ lines.push(line);
71
232
  return lines;
72
233
  }
234
+ const isBar = (cell) => typeof cell === 'object' && cell !== null;
73
235
  /**
74
236
  * A share the line already states, readable from further away: `███░░░░░░░`.
75
- *
76
- * The bar is content, not paint — it prints in a pipe too, so the stripped
77
- * and plain outputs stay byte-identical. It never carries information the
78
- * text does not: the percentage beside it is the number, the bar is the
79
- * glance. Clamped, because a share over 1 is the caller's bug and a bar
80
- * wider than asked would make it the layout's.
237
+ * Clamped, because a share over 1 is the caller's bug and a bar wider than
238
+ * asked would make it the layout's.
81
239
  */
82
- export function bar(share, width = 10) {
240
+ export function bar(share, width = 10, paint = c) {
83
241
  const clamped = Math.max(0, Math.min(1, share));
84
242
  const filled = Math.round(clamped * width);
85
- return c.cyan('█'.repeat(filled)) + c.dim('░'.repeat(width - filled));
243
+ return paint.accent('█'.repeat(filled)) + paint.dim('░'.repeat(width - filled));
244
+ }
245
+ const BAR_WIDTHS = [10, 5, 0];
246
+ const ELLIPSIS = '…';
247
+ /** A name cut to `width` characters, saying it was cut. Unpainted names only. */
248
+ function cut(text, width) {
249
+ if (visibleWidth(text) <= width)
250
+ return text;
251
+ if (text !== text.replace(ANSI, ''))
252
+ return text;
253
+ return `${text.slice(0, Math.max(1, width - 1))}${ELLIPSIS}`;
254
+ }
255
+ /**
256
+ * A path cut from its start to `room` characters, `…` saying so: the end of a
257
+ * path is the part that names the file. Untouched when it fits, or when there
258
+ * is no window to fit (`room` infinite).
259
+ */
260
+ export function fitPath(path, room) {
261
+ if (!Number.isFinite(room) || path.length <= room)
262
+ return path;
263
+ const keep = Math.max(11, room) - 1;
264
+ return `${ELLIPSIS}${path.slice(path.length - keep)}`;
265
+ }
266
+ /**
267
+ * The one table renderer.
268
+ *
269
+ * Widths come from the content, headers print dimmed, and cells may arrive
270
+ * painted — the measurement ignores the paint. When the table is wider than
271
+ * `width` it narrows its bars (ten cells, then five, then none) and then cuts
272
+ * its first left-aligned column, the name, with an ellipsis. A figure is never
273
+ * cut and a row never wraps, so every figure stays on the line of its label.
274
+ * Returns lines; the caller owns the indent, because some tables live inside a
275
+ * bullet and some at the margin.
276
+ */
277
+ export function table(columns, rows, indent = ' ', width = Number.POSITIVE_INFINITY, paint = c) {
278
+ const draw = (barWidth, nameWidth) => {
279
+ const text = rows.map((row) => columns.map((_, i) => {
280
+ const cell = row[i];
281
+ if (isBar(cell))
282
+ return barWidth === 0 ? '' : bar(cell.bar, barWidth, paint);
283
+ const value = cell ?? '';
284
+ return nameWidth !== null && i === nameColumn ? cut(value, nameWidth) : value;
285
+ }));
286
+ const shown = columns.map((col, i) => {
287
+ const barColumn = rows.some((row) => isBar(row[i]));
288
+ return !(barColumn && barWidth === 0) || col.header !== '';
289
+ });
290
+ const widths = columns.map((col, i) => Math.max(visibleWidth(col.header), ...text.map((row) => visibleWidth(row[i] ?? ''))));
291
+ const join = (cells) => indent +
292
+ cells
293
+ .map((cell, i) => (shown[i] ? padCell(cell, widths[i] ?? 0, columns[i].align) : null))
294
+ .filter((cell) => cell !== null)
295
+ .join(' ')
296
+ .trimEnd();
297
+ const lines = [];
298
+ if (columns.some((col) => col.header !== ''))
299
+ lines.push(join(columns.map((col) => paint.dim(col.header))));
300
+ for (const row of text)
301
+ lines.push(join(row));
302
+ return lines;
303
+ };
304
+ const nameColumn = columns.findIndex((col) => col.align === 'left');
305
+ const fits = (lines) => lines.every((line) => visibleWidth(line) <= width);
306
+ const hasBars = rows.some((row) => row.some(isBar));
307
+ let lines = [];
308
+ for (const barWidth of hasBars ? BAR_WIDTHS : [0]) {
309
+ lines = draw(barWidth, null);
310
+ if (fits(lines))
311
+ return lines;
312
+ }
313
+ if (nameColumn === -1)
314
+ return lines;
315
+ const over = Math.max(...lines.map(visibleWidth)) - width;
316
+ const longest = Math.max(visibleWidth(columns[nameColumn].header), ...rows.map((row) => (isBar(row[nameColumn]) ? 0 : visibleWidth(row[nameColumn] ?? ''))));
317
+ return draw(0, Math.max(8, longest - over));
86
318
  }
87
319
  /**
88
320
  * A section heading an eye can stop on: the text bold, the line completed
@@ -92,8 +324,178 @@ export function bar(share, width = 10) {
92
324
  *
93
325
  * The rule is content (it survives the strip); the weight is paint.
94
326
  */
95
- export function sectionHeading(text, width = REPORT_WIDTH) {
327
+ export function sectionHeading(text, width = WINDOW ? COLUMNS - 2 : REPORT_WIDTH, paint = c) {
96
328
  const room = Math.max(0, width - visibleWidth(text) - 1);
97
- return `${c.bold(text)} ${c.dim('─'.repeat(room))}`.trimEnd();
329
+ return `${paint.bold(text)} ${paint.dim('─'.repeat(room))}`.trimEnd();
330
+ }
331
+ const MARKS = {
332
+ caution: '!',
333
+ error: '✗',
334
+ good: '✓',
335
+ point: '→',
336
+ aside: '·',
337
+ question: '?',
338
+ };
339
+ /**
340
+ * A report, drawn in one order: the question and the figure that answers it,
341
+ * then the breakdown, then the notes and what to do next. A reader who stops
342
+ * after the first three lines has the answer.
343
+ *
344
+ * The commands hand it sentences and rows; it wraps them to the window,
345
+ * paints them at the terminal's depth and puts the one mark on the figure the
346
+ * headline names. Nothing here computes a figure: every number arrives as
347
+ * text the command already formatted.
348
+ */
349
+ export class Report {
350
+ width;
351
+ paint;
352
+ window;
353
+ out = [];
354
+ marked = false;
355
+ constructor(width = COLUMNS, paint = c,
356
+ /** Whether a window is known; tables are fitted to one only then. */
357
+ window = WINDOW) {
358
+ this.width = width;
359
+ this.paint = paint;
360
+ this.window = window;
361
+ }
362
+ tone(text, tone) {
363
+ switch (tone) {
364
+ case 'dim':
365
+ return this.paint.dim(text);
366
+ case 'bold':
367
+ return this.paint.bold(text);
368
+ case 'caution':
369
+ return this.paint.yellow(text);
370
+ case 'good':
371
+ return this.paint.green(text);
372
+ case 'error':
373
+ return this.paint.red(text);
374
+ default:
375
+ return text;
376
+ }
377
+ }
378
+ /** The state's mark, painted in the state's colour. */
379
+ markOf(state) {
380
+ const glyph = MARKS[state];
381
+ switch (state) {
382
+ case 'caution':
383
+ case 'question':
384
+ return this.paint.yellow(glyph);
385
+ case 'error':
386
+ return this.paint.red(glyph);
387
+ case 'good':
388
+ return this.paint.green(glyph);
389
+ case 'point':
390
+ return this.paint.accent(glyph);
391
+ default:
392
+ return this.paint.dim(glyph);
393
+ }
394
+ }
395
+ blank() {
396
+ this.out.push('');
397
+ return this;
398
+ }
399
+ /**
400
+ * The question, as a heading ruled out to the width, and the line that
401
+ * answers it with `figure` marked. The mark goes on one figure per report:
402
+ * a second headline draws its figure bold instead.
403
+ */
404
+ headline(question, answer, figure) {
405
+ this.heading(question);
406
+ return this.answer(answer, figure);
407
+ }
408
+ /** The answering line on its own, under a heading drawn elsewhere. */
409
+ answer(answer, figure, indent = ' ') {
410
+ const lines = wrapText(answer, this.width - indent.length);
411
+ const at = figure === undefined ? -1 : (lines[0] ?? '').indexOf(figure);
412
+ lines.forEach((line, index) => {
413
+ if (index === 0 && figure !== undefined && at !== -1) {
414
+ const painted = this.marked ? this.paint.bold(figure) : this.paint.mark(figure);
415
+ this.marked = true;
416
+ this.out.push(`${indent}${this.paint.bold(line.slice(0, at))}${painted}${this.paint.bold(line.slice(at + figure.length))}`);
417
+ }
418
+ else {
419
+ this.out.push(`${indent}${this.paint.bold(line)}`);
420
+ }
421
+ });
422
+ return this;
423
+ }
424
+ /** A section heading with its rule. */
425
+ heading(text) {
426
+ this.out.push(sectionHeading(text, this.width - 2, this.paint));
427
+ return this;
428
+ }
429
+ /** A bold title on its own line, no rule: a subsection. */
430
+ title(text, indent = '') {
431
+ this.out.push(`${indent}${this.paint.bold(text)}`);
432
+ return this;
433
+ }
434
+ /** A paragraph, wrapped to the window under `indent`. */
435
+ text(text, options = {}) {
436
+ const indent = options.indent ?? ' ';
437
+ const first = options.first ?? indent;
438
+ const tone = options.tone ?? 'plain';
439
+ wrapText(text, this.width - Math.max(visibleWidth(first), indent.length)).forEach((line, index) => {
440
+ this.out.push(`${index === 0 ? first : indent}${this.tone(line, tone)}`);
441
+ });
442
+ return this;
443
+ }
444
+ /**
445
+ * A note with its mark: `! sentence`, the wrapped lines hanging under the
446
+ * sentence. The mark carries the state; the sentence keeps the reader's
447
+ * colour unless `tone` says otherwise.
448
+ */
449
+ note(state, text, options = {}) {
450
+ const indent = options.indent ?? ' ';
451
+ return this.text(text, {
452
+ first: `${indent}${this.markOf(state)} `,
453
+ indent: `${indent} `,
454
+ tone: options.tone ?? 'plain',
455
+ });
456
+ }
457
+ /** Rows under columns, fitted to the window. */
458
+ table(columns, rows, indent = ' ') {
459
+ this.out.push(...table(columns, rows, indent, this.window ? this.width : Number.POSITIVE_INFINITY, this.paint));
460
+ return this;
461
+ }
462
+ /** Whether a composed line fits the window; always, when there is none. */
463
+ fits(line) {
464
+ return !this.window || visibleWidth(line) <= this.width;
465
+ }
466
+ /**
467
+ * The room left on a line after `lead`, for a cell that can be cut to fit:
468
+ * infinite when no window is known, so a pipe never loses a character.
469
+ */
470
+ room(lead) {
471
+ return this.window ? Math.max(12, this.width - visibleWidth(lead)) : Number.POSITIVE_INFINITY;
472
+ }
473
+ /**
474
+ * Shares drawn as a bar before the line that states them: `███░░░ Input
475
+ * $3.51 27.6%`. A table of two columns, so a narrow window narrows the bar
476
+ * and never the line.
477
+ */
478
+ shares(rows, indent = ' ') {
479
+ return this.table([
480
+ { header: '', align: 'left' },
481
+ { header: '', align: 'left' },
482
+ ], rows.map((row) => [{ bar: row.share }, row.text]), indent);
483
+ }
484
+ /**
485
+ * A line the caller composed. For the few lines whose layout is the
486
+ * content (a diff, a column of rule tags); they are not wrapped.
487
+ */
488
+ line(text) {
489
+ this.out.push(text);
490
+ return this;
491
+ }
492
+ lines() {
493
+ return [...this.out];
494
+ }
495
+ print(write = (line) => console.log(line)) {
496
+ for (const line of this.out)
497
+ write(line);
498
+ this.out.length = 0;
499
+ }
98
500
  }
99
501
  //# sourceMappingURL=style.js.map
package/dist/style.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,UAAU,CAAU,CAAC;AAEpE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;AAExG,MAAM,CAAC,MAAM,CAAC,GAAG;IACf,IAAI,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