@promptctl/rich-js 0.24.1 → 0.25.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.
- package/README.md +7 -0
- package/dist/core/anchor.d.ts +5 -0
- package/dist/core/anchor.js +11 -4
- package/dist/core/animation.d.ts +175 -10
- package/dist/core/animation.js +283 -15
- package/dist/core/ansi.js +2 -2
- package/dist/core/box.d.ts +7 -7
- package/dist/core/cells.d.ts +23 -13
- package/dist/core/cells.js +58 -48
- package/dist/core/clock.d.ts +2 -2
- package/dist/core/clock.js +6 -4
- package/dist/core/color.d.ts +27 -10
- package/dist/core/color.js +24 -33
- package/dist/core/console.d.ts +28 -17
- package/dist/core/console.js +44 -39
- package/dist/core/easing.d.ts +30 -0
- package/dist/core/easing.js +65 -20
- package/dist/core/emoji.d.ts +1 -1
- package/dist/core/emoji.js +1 -2
- package/dist/core/export-html.js +2 -1
- package/dist/core/export-lines.js +3 -3
- package/dist/core/highlighter.d.ts +9 -8
- package/dist/core/highlighter.js +3 -2
- package/dist/core/json.js +2 -2
- package/dist/core/markup.js +16 -12
- package/dist/core/measure.js +2 -2
- package/dist/core/memo.d.ts +11 -2
- package/dist/core/memo.js +16 -0
- package/dist/core/oklch.js +17 -6
- package/dist/core/osc8.d.ts +1 -1
- package/dist/core/osc8.js +4 -5
- package/dist/core/paint.d.ts +2 -1
- package/dist/core/paint.js +4 -3
- package/dist/core/pattern.d.ts +21 -0
- package/dist/core/pattern.js +21 -0
- package/dist/core/pretty.js +9 -10
- package/dist/core/protocol.d.ts +100 -39
- package/dist/core/protocol.js +167 -21
- package/dist/core/render.d.ts +15 -2
- package/dist/core/render.js +25 -5
- package/dist/core/segment.d.ts +13 -5
- package/dist/core/segment.js +23 -9
- package/dist/core/spinnerData.d.ts +1 -1
- package/dist/core/state.d.ts +53 -0
- package/dist/core/state.js +82 -0
- package/dist/core/strip.d.ts +98 -29
- package/dist/core/strip.js +211 -150
- package/dist/core/style.d.ts +47 -14
- package/dist/core/style.js +57 -28
- package/dist/core/text.d.ts +5 -8
- package/dist/core/text.js +116 -124
- package/dist/core/timeline.d.ts +30 -5
- package/dist/core/timeline.js +43 -7
- package/dist/core/tween.d.ts +1 -1
- package/dist/core/tween.js +5 -3
- package/dist/core/view.d.ts +92 -0
- package/dist/core/view.js +83 -0
- package/dist/host/app.d.ts +49 -21
- package/dist/host/app.js +71 -37
- package/dist/host/input.js +3 -4
- package/dist/index.d.ts +24 -12
- package/dist/index.js +9 -4
- package/dist/node/traceback.js +4 -3
- package/dist/renderables/align.d.ts +2 -3
- package/dist/renderables/align.js +0 -3
- package/dist/renderables/change.d.ts +42 -0
- package/dist/renderables/change.js +112 -0
- package/dist/renderables/columns.d.ts +3 -4
- package/dist/renderables/columns.js +2 -7
- package/dist/renderables/constrain.d.ts +2 -3
- package/dist/renderables/constrain.js +0 -3
- package/dist/renderables/effect.d.ts +158 -63
- package/dist/renderables/effect.js +378 -155
- package/dist/renderables/effects.d.ts +122 -11
- package/dist/renderables/effects.js +238 -94
- package/dist/renderables/embed.d.ts +1 -1
- package/dist/renderables/embed.js +16 -8
- package/dist/renderables/flexStrip.d.ts +2 -3
- package/dist/renderables/flexStrip.js +0 -4
- package/dist/renderables/frames.d.ts +35 -54
- package/dist/renderables/frames.js +43 -58
- package/dist/renderables/glyph-effect.d.ts +158 -0
- package/dist/renderables/glyph-effect.js +237 -0
- package/dist/renderables/glyph-effects.d.ts +147 -0
- package/dist/renderables/glyph-effects.js +283 -0
- package/dist/renderables/group.d.ts +3 -4
- package/dist/renderables/group.js +0 -3
- package/dist/renderables/layout.d.ts +12 -12
- package/dist/renderables/layout.js +40 -46
- package/dist/renderables/lifecycle.d.ts +77 -0
- package/dist/renderables/lifecycle.js +132 -0
- package/dist/renderables/list-view.d.ts +4 -5
- package/dist/renderables/list-view.js +9 -13
- package/dist/renderables/live.d.ts +36 -21
- package/dist/renderables/live.js +88 -41
- package/dist/renderables/markdown-parse.d.ts +4 -4
- package/dist/renderables/markdown-parse.js +52 -46
- package/dist/renderables/markdown-url.js +11 -11
- package/dist/renderables/padding.d.ts +4 -5
- package/dist/renderables/padding.js +0 -3
- package/dist/renderables/panel.d.ts +14 -16
- package/dist/renderables/panel.js +6 -14
- package/dist/renderables/progress.d.ts +83 -34
- package/dist/renderables/progress.js +182 -95
- package/dist/renderables/progressBar.d.ts +22 -12
- package/dist/renderables/progressBar.js +32 -9
- package/dist/renderables/prompt.js +3 -2
- package/dist/renderables/python-space.js +2 -1
- package/dist/renderables/scroll.d.ts +50 -0
- package/dist/renderables/scroll.js +106 -0
- package/dist/renderables/spinner.d.ts +35 -14
- package/dist/renderables/spinner.js +65 -25
- package/dist/renderables/status.js +1 -1
- package/dist/renderables/syntax.d.ts +10 -9
- package/dist/renderables/syntax.js +3 -2
- package/dist/renderables/table.d.ts +34 -40
- package/dist/renderables/table.js +41 -63
- package/dist/renderables/traceback.d.ts +2 -2
- package/dist/renderables/traceback.js +6 -5
- package/dist/renderables/tree.d.ts +27 -25
- package/dist/renderables/tree.js +104 -58
- package/dist/renderables/viewport.d.ts +75 -44
- package/dist/renderables/viewport.js +145 -82
- package/dist/template-bindings/animation-funcs.d.ts +78 -9
- package/dist/template-bindings/animation-funcs.js +132 -14
- package/dist/template-bindings/index.d.ts +5 -5
- package/dist/template-bindings/index.js +5 -5
- package/dist/themes/ramp.d.ts +46 -3
- package/dist/themes/ramp.js +61 -4
- package/dist/themes/registry.js +5 -7
- package/dist/widgets/button.js +3 -2
- package/dist/widgets/checkbox.js +4 -3
- package/dist/widgets/dropdown.d.ts +3 -1
- package/dist/widgets/dropdown.js +20 -15
- package/dist/widgets/event-router.js +4 -2
- package/dist/widgets/focus-manager.d.ts +2 -0
- package/dist/widgets/focus-manager.js +6 -4
- package/dist/widgets/hit.d.ts +6 -0
- package/dist/widgets/hit.js +8 -1
- package/dist/widgets/observable.d.ts +23 -0
- package/dist/widgets/observable.js +43 -0
- package/dist/widgets/slider.d.ts +1 -1
- package/dist/widgets/slider.js +12 -3
- package/dist/widgets/static-item.d.ts +2 -3
- package/dist/widgets/static-item.js +0 -3
- package/dist/widgets/text-input.d.ts +28 -32
- package/dist/widgets/text-input.js +360 -346
- package/dist/widgets/themed-widget.js +2 -1
- package/dist/widgets/toggle.js +4 -3
- package/dist/widgets/types.d.ts +10 -4
- package/dist/widgets/types.js +8 -2
- package/dist/widgets/widget-app.d.ts +14 -4
- package/dist/widgets/widget-app.js +36 -7
- package/dist/widgets/widget-base.d.ts +2 -2
- package/dist/widgets/widget-base.js +29 -18
- package/package.json +8 -1
|
@@ -6,20 +6,20 @@ import { Style } from "../core/style.js";
|
|
|
6
6
|
import { Box } from "../core/box.js";
|
|
7
7
|
import { RichText } from "../core/text.js";
|
|
8
8
|
import type { PaddingDimensions } from "./padding.js";
|
|
9
|
-
import type {
|
|
9
|
+
import type { Renderable, Measurable, RenderOptions } from "../core/protocol.js";
|
|
10
10
|
/**
|
|
11
|
-
* A
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* content
|
|
20
|
-
*
|
|
11
|
+
* A border accessory. Strings render inline in the border style; a
|
|
12
|
+
* `RichText` accessory lays ONLY its wrapping `style` over the border's
|
|
13
|
+
* (per-range spans within the RichText are not preserved — the accessory is a
|
|
14
|
+
* small status indicator, not an arbitrary span carrier).
|
|
15
|
+
*
|
|
16
|
+
* [LAW:no-ambient-temporal-coupling] A function form is handed the rows the
|
|
17
|
+
* body drew this frame, so an accessory that mirrors the content's layout (a
|
|
18
|
+
* widget's scroll position) reads it off the frame it labels, not off state
|
|
19
|
+
* the content kept from an earlier one. A width that leaves the content no column does not render it,
|
|
20
|
+
* as Rich's does not, and the rows it is handed are then blank.
|
|
21
21
|
*/
|
|
22
|
-
export type BorderAccessory = string | RichText | (() => string | RichText | undefined);
|
|
22
|
+
export type BorderAccessory = string | RichText | ((body: readonly (readonly Segment[])[]) => string | RichText | undefined);
|
|
23
23
|
export interface PanelOptions {
|
|
24
24
|
box?: Box;
|
|
25
25
|
title?: string | RichText;
|
|
@@ -48,7 +48,7 @@ export interface PanelOptions {
|
|
|
48
48
|
width?: number;
|
|
49
49
|
padding?: PaddingDimensions;
|
|
50
50
|
}
|
|
51
|
-
export declare class Panel implements Renderable, Measurable
|
|
51
|
+
export declare class Panel implements Renderable, Measurable {
|
|
52
52
|
readonly renderable: Renderable;
|
|
53
53
|
readonly box: Box;
|
|
54
54
|
readonly title: string | RichText | undefined;
|
|
@@ -73,7 +73,6 @@ export declare class Panel implements Renderable, Measurable, Composite {
|
|
|
73
73
|
get padding(): readonly [number, number, number, number];
|
|
74
74
|
constructor(content: string | RichText | Renderable, options?: PanelOptions);
|
|
75
75
|
render(rawOptions: RenderOptions): Iterable<Segment>;
|
|
76
|
-
contents(): Iterable<Renderable>;
|
|
77
76
|
/**
|
|
78
77
|
* The body's rows, held to the region as Rich's `render_lines` holds them —
|
|
79
78
|
* padded below, cropped from the bottom — and each exactly `spanWidth`
|
|
@@ -82,8 +81,7 @@ export declare class Panel implements Renderable, Measurable, Composite {
|
|
|
82
81
|
* `Console.render` renders nothing under one column, so outside a region it
|
|
83
82
|
* draws no rows, padding rows included, and inside one the frame stands
|
|
84
83
|
* around empty rows. The render happens before either border is drawn,
|
|
85
|
-
* because a `bottomRightAccessory`
|
|
86
|
-
* populates.
|
|
84
|
+
* because a `bottomRightAccessory` function is handed the rows it drew.
|
|
87
85
|
*/
|
|
88
86
|
private _renderBody;
|
|
89
87
|
measure(rawOptions: RenderOptions): {
|
|
@@ -140,12 +140,7 @@ export class Panel {
|
|
|
140
140
|
yield new Segment(frame.right.repeat(geometry.right), border);
|
|
141
141
|
yield Segment.line();
|
|
142
142
|
}
|
|
143
|
-
yield* this._renderBottomBorder(options, box, geometry, border);
|
|
144
|
-
}
|
|
145
|
-
// The body is the one thing a panel draws through `render`: its title and
|
|
146
|
-
// subtitle are text it builds.
|
|
147
|
-
*contents() {
|
|
148
|
-
yield this._body;
|
|
143
|
+
yield* this._renderBottomBorder(options, box, geometry, border, bodyLines);
|
|
149
144
|
}
|
|
150
145
|
/**
|
|
151
146
|
* The body's rows, held to the region as Rich's `render_lines` holds them —
|
|
@@ -155,8 +150,7 @@ export class Panel {
|
|
|
155
150
|
* `Console.render` renders nothing under one column, so outside a region it
|
|
156
151
|
* draws no rows, padding rows included, and inside one the frame stands
|
|
157
152
|
* around empty rows. The render happens before either border is drawn,
|
|
158
|
-
* because a `bottomRightAccessory`
|
|
159
|
-
* populates.
|
|
153
|
+
* because a `bottomRightAccessory` function is handed the rows it drew.
|
|
160
154
|
*/
|
|
161
155
|
_renderBody(options, spanWidth) {
|
|
162
156
|
// Two border rows are the panel's own, and the vertical padding is the
|
|
@@ -230,10 +224,8 @@ export class Panel {
|
|
|
230
224
|
yield* borderRow(options, box.top, geometry, geometry.spanWidth, this._titleLabel, titleStyle, border, box.top.right.repeat(geometry.right));
|
|
231
225
|
yield Segment.line();
|
|
232
226
|
}
|
|
233
|
-
*_renderBottomBorder(options, box, geometry, border) {
|
|
234
|
-
|
|
235
|
-
// `BorderAccessory` owns what a thunk sees.
|
|
236
|
-
const accessory = this._resolveAccessory(this.bottomRightAccessory);
|
|
227
|
+
*_renderBottomBorder(options, box, geometry, border, body) {
|
|
228
|
+
const accessory = this._resolveAccessory(this.bottomRightAccessory, body);
|
|
237
229
|
const accessoryDisplay = accessory === undefined
|
|
238
230
|
? ""
|
|
239
231
|
: typeof accessory === "string"
|
|
@@ -253,11 +245,11 @@ export class Panel {
|
|
|
253
245
|
yield new Segment(afterAccessory, border);
|
|
254
246
|
yield Segment.line();
|
|
255
247
|
}
|
|
256
|
-
_resolveAccessory(a) {
|
|
248
|
+
_resolveAccessory(a, body) {
|
|
257
249
|
if (a === undefined)
|
|
258
250
|
return undefined;
|
|
259
251
|
if (typeof a === "function")
|
|
260
|
-
return a();
|
|
252
|
+
return a(body);
|
|
261
253
|
return a;
|
|
262
254
|
}
|
|
263
255
|
// --- Static factory ---
|
|
@@ -5,10 +5,11 @@ import type { Segment } from "../core/segment.js";
|
|
|
5
5
|
import { RichText } from "../core/text.js";
|
|
6
6
|
import { Console } from "../core/console.js";
|
|
7
7
|
import type { Style } from "../core/style.js";
|
|
8
|
-
import {
|
|
9
|
-
import { type Clock } from "../core/clock.js";
|
|
8
|
+
import type { Clock } from "../core/clock.js";
|
|
10
9
|
import { type ColumnOptions } from "./table.js";
|
|
11
|
-
import type {
|
|
10
|
+
import type { FrameHost, Renderable, RenderOptions } from "../core/protocol.js";
|
|
11
|
+
import { Animation } from "../core/animation.js";
|
|
12
|
+
import type { Timing } from "../core/easing.js";
|
|
12
13
|
export interface TaskOptions {
|
|
13
14
|
total?: number;
|
|
14
15
|
start?: boolean;
|
|
@@ -22,30 +23,31 @@ export interface TaskUpdateOptions {
|
|
|
22
23
|
refresh?: boolean;
|
|
23
24
|
}
|
|
24
25
|
export interface Task {
|
|
25
|
-
id: number;
|
|
26
|
-
description: string;
|
|
27
|
-
total: number | undefined;
|
|
28
|
-
completed: number;
|
|
29
|
-
visible: boolean;
|
|
30
|
-
/** When the task started, in seconds on its `Progress`'s clock; undefined until it has. */
|
|
31
|
-
startTime: number | undefined;
|
|
26
|
+
readonly id: number;
|
|
27
|
+
readonly description: string;
|
|
28
|
+
readonly total: number | undefined;
|
|
29
|
+
readonly completed: number;
|
|
32
30
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
* The count a bar shows, over its `Progress`'s clock: `completed` itself,
|
|
32
|
+
* or moving to it after each update when the `Progress` was given a `fill`
|
|
33
|
+
* timing. `completed` stays the count; only the bar draws this.
|
|
35
34
|
*/
|
|
36
|
-
|
|
35
|
+
readonly fill: Animation<number>;
|
|
36
|
+
readonly visible: boolean;
|
|
37
|
+
/** When the task started, in seconds on its `Progress`'s host's time; undefined until it has, as of the frame being drawn. */
|
|
38
|
+
readonly startTime: number | undefined;
|
|
37
39
|
/**
|
|
38
40
|
* Rich's `Task.elapsed`: seconds since the task started, as of the frame
|
|
39
|
-
* being drawn — `Progress`
|
|
41
|
+
* being drawn — `Progress` takes the time once a frame and hands columns
|
|
40
42
|
* the result, so no column reads a clock. Undefined until the task starts.
|
|
41
43
|
*/
|
|
42
|
-
elapsed: number | undefined;
|
|
44
|
+
readonly elapsed: number | undefined;
|
|
43
45
|
/**
|
|
44
46
|
* Rich's `Task.finished_time`: the elapsed time the first time an update
|
|
45
47
|
* finds a started task at its total, kept from then on, so a finished task
|
|
46
48
|
* stays finished however its count moves after.
|
|
47
49
|
*/
|
|
48
|
-
finishedTime: number | undefined;
|
|
50
|
+
readonly finishedTime: number | undefined;
|
|
49
51
|
/**
|
|
50
52
|
* Rich's `Task.speed`: steps a second over the updates that moved the task
|
|
51
53
|
* in the `SPEED_ESTIMATE_PERIOD` before its latest update — measured back from
|
|
@@ -53,7 +55,7 @@ export interface Task {
|
|
|
53
55
|
* speed it had. Undefined until the task has started and two such updates lie
|
|
54
56
|
* apart in time.
|
|
55
57
|
*/
|
|
56
|
-
speed: number | undefined;
|
|
58
|
+
readonly speed: number | undefined;
|
|
57
59
|
}
|
|
58
60
|
/**
|
|
59
61
|
* One cell of a `Progress` row, made for the task on that row. Not a
|
|
@@ -82,8 +84,16 @@ export declare class BarColumn implements ProgressColumn {
|
|
|
82
84
|
readonly barWidth: number;
|
|
83
85
|
readonly tableColumn: ColumnOptions;
|
|
84
86
|
constructor(barWidth?: number);
|
|
85
|
-
/**
|
|
86
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Rich's `BarColumn`: a task not yet started, or with no total to fill
|
|
89
|
+
* toward, pulses, and a pulse draws no fill. Otherwise the bar is the
|
|
90
|
+
* task's `fill` drawn at the frame's time, every cell stamped with when the
|
|
91
|
+
* fill next moves, so a host draws while it eases and the bar asks for
|
|
92
|
+
* nothing once it lands. Its colour is the task's: an ease that overshoots
|
|
93
|
+
* the total does not finish the bar, and one that dips back does not
|
|
94
|
+
* unfinish it.
|
|
95
|
+
*/
|
|
96
|
+
render(task: Task): Renderable;
|
|
87
97
|
}
|
|
88
98
|
/**
|
|
89
99
|
* Rich's `{task.percentage:>3.0f}%`: the percentage right-aligned in three
|
|
@@ -112,7 +122,7 @@ export declare class TimeRemainingColumn implements ProgressColumn {
|
|
|
112
122
|
}
|
|
113
123
|
export declare class TimeElapsedColumn implements ProgressColumn {
|
|
114
124
|
readonly tableColumn: ColumnOptions;
|
|
115
|
-
render(task: Task):
|
|
125
|
+
render(task: Task): Renderable;
|
|
116
126
|
}
|
|
117
127
|
export interface SpinnerColumnOptions {
|
|
118
128
|
/** The frame's style. Defaults to `progress.spinner`, a name its console's theme resolves. */
|
|
@@ -125,7 +135,7 @@ export interface SpinnerColumnOptions {
|
|
|
125
135
|
export declare class SpinnerColumn implements ProgressColumn {
|
|
126
136
|
readonly tableColumn: ColumnOptions;
|
|
127
137
|
private readonly _spinner;
|
|
128
|
-
private _finishedText;
|
|
138
|
+
private readonly _finishedText;
|
|
129
139
|
constructor(spinnerName?: string, options?: SpinnerColumnOptions);
|
|
130
140
|
render(task: Task): Renderable;
|
|
131
141
|
}
|
|
@@ -144,39 +154,77 @@ export declare class MofNCompleteColumn implements ProgressColumn {
|
|
|
144
154
|
constructor(options?: MofNCompleteColumnOptions);
|
|
145
155
|
render(task: Task): RichText;
|
|
146
156
|
}
|
|
147
|
-
|
|
157
|
+
/**
|
|
158
|
+
* How a `Progress` is set up. It is drawn by one host, and every time it
|
|
159
|
+
* keeps or draws at is that host's `frameTime`: by its own `Live`, which the
|
|
160
|
+
* options for that `Live` configure, or, given `drawnBy`, by another host —
|
|
161
|
+
* which then does all the drawing, so none of them apply.
|
|
162
|
+
*/
|
|
163
|
+
export type ProgressOptions = ProgressDisplayOptions & (OwnLiveOptions | DrawnByOptions);
|
|
164
|
+
interface ProgressDisplayOptions {
|
|
165
|
+
expand?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* How a bar's fill moves to a task's new count: eased over this timing
|
|
168
|
+
* from wherever it is when the count changes, so a bar advancing in bursts
|
|
169
|
+
* reads as motion. Unset, the bar jumps to the count, as Rich's does.
|
|
170
|
+
*/
|
|
171
|
+
fill?: Timing;
|
|
172
|
+
}
|
|
173
|
+
interface OwnLiveOptions {
|
|
174
|
+
drawnBy?: undefined;
|
|
175
|
+
console?: Console;
|
|
148
176
|
refreshPerSecond?: number;
|
|
149
177
|
autoRefresh?: boolean;
|
|
150
178
|
transient?: boolean;
|
|
151
|
-
expand?: boolean;
|
|
152
|
-
console?: Console;
|
|
153
179
|
/**
|
|
154
|
-
* What
|
|
155
|
-
* defaults to the platform's monotonic clock.
|
|
180
|
+
* What its own `Live` ticks on, and so what tasks are timed by — Rich's
|
|
181
|
+
* `get_time`; defaults to the platform's monotonic clock.
|
|
156
182
|
*/
|
|
157
183
|
clock?: Clock;
|
|
158
184
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
185
|
+
interface DrawnByOptions {
|
|
186
|
+
/**
|
|
187
|
+
* The host — a `Live`, an `App` — whose frames this `Progress` is drawn in:
|
|
188
|
+
* tasks are timed by its `frameTime`, so they hold while its timeline is
|
|
189
|
+
* paused and run back while it is reversed. Drawn in any other host's
|
|
190
|
+
* frame, the `Progress` throws.
|
|
191
|
+
*/
|
|
192
|
+
drawnBy: FrameHost;
|
|
193
|
+
console?: never;
|
|
194
|
+
refreshPerSecond?: never;
|
|
195
|
+
autoRefresh?: never;
|
|
196
|
+
transient?: never;
|
|
197
|
+
clock?: never;
|
|
198
|
+
}
|
|
199
|
+
export declare class Progress implements Renderable {
|
|
200
|
+
private readonly _columns;
|
|
201
|
+
private readonly _tasks;
|
|
202
|
+
private readonly _live;
|
|
203
|
+
private readonly _host;
|
|
204
|
+
/** A task's fill after its count changes at `now`, from the value it shows then. */
|
|
205
|
+
private readonly _refill;
|
|
166
206
|
readonly expand: boolean;
|
|
167
207
|
constructor(...columns: (ProgressColumn | ProgressOptions)[]);
|
|
208
|
+
/** The console its own `Live` prints above the bars through. */
|
|
168
209
|
get console(): Console;
|
|
169
210
|
/** Rich's `Progress.finished`: every task finished, and so true with none. */
|
|
170
211
|
get finished(): boolean;
|
|
171
212
|
static getDefaultColumns(): ProgressColumn[];
|
|
172
213
|
addTask(description: string, options?: TaskOptions): number;
|
|
214
|
+
private _task;
|
|
173
215
|
updateTask(taskId: number, options: TaskUpdateOptions): void;
|
|
174
216
|
startTask(taskId: number): void;
|
|
175
217
|
start(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Every bar settles at its count, so the frame drawn next — its own `Live`'s
|
|
220
|
+
* final one, handed back here, or the next of the host that draws it —
|
|
221
|
+
* shows where the work got to, not a bar caught mid-ease.
|
|
222
|
+
*/
|
|
176
223
|
stop(): void;
|
|
177
224
|
refresh(): void;
|
|
225
|
+
private _ownLive;
|
|
178
226
|
render(options: RenderOptions): Iterable<Segment>;
|
|
179
|
-
|
|
227
|
+
private _framed;
|
|
180
228
|
private _table;
|
|
181
229
|
}
|
|
182
230
|
export declare function track<T>(iterable: Iterable<T>, options?: {
|
|
@@ -184,3 +232,4 @@ export declare function track<T>(iterable: Iterable<T>, options?: {
|
|
|
184
232
|
total?: number;
|
|
185
233
|
console?: Console;
|
|
186
234
|
}): Iterable<T>;
|
|
235
|
+
export {};
|