@visulima/tui-kit 1.0.0 → 1.0.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/CHANGELOG.md +18 -0
- package/dist/accordion.d.ts +25 -32
- package/dist/alert.d.ts +9 -13
- package/dist/animate-presence.d.ts +9 -11
- package/dist/approval-prompt.d.ts +28 -38
- package/dist/area-chart.d.ts +29 -39
- package/dist/badge.d.ts +8 -11
- package/dist/bar-chart.d.ts +29 -38
- package/dist/big-text.d.ts +42 -52
- package/dist/blink-dot.d.ts +16 -21
- package/dist/breadcrumb.d.ts +11 -15
- package/dist/button.d.ts +18 -25
- package/dist/calendar.d.ts +31 -43
- package/dist/card.d.ts +22 -32
- package/dist/checkbox-group.d.ts +21 -30
- package/dist/checkbox.d.ts +19 -27
- package/dist/code.d.ts +24 -31
- package/dist/collapsible.d.ts +21 -30
- package/dist/color-picker.d.ts +29 -41
- package/dist/command-block.d.ts +19 -27
- package/dist/command-palette.d.ts +36 -45
- package/dist/confirm-dialog.d.ts +35 -47
- package/dist/confirm-input.d.ts +17 -23
- package/dist/console-overlay.d.ts +28 -35
- package/dist/content-switcher.d.ts +22 -30
- package/dist/controlled-scroll-view.d.ts +1 -1
- package/dist/data-grid.d.ts +18 -24
- package/dist/date-picker.d.ts +27 -38
- package/dist/definition-list.d.ts +16 -22
- package/dist/dialog.d.ts +58 -74
- package/dist/diff-view.d.ts +41 -54
- package/dist/digits.d.ts +13 -17
- package/dist/directory-tree.d.ts +20 -27
- package/dist/divider.d.ts +20 -28
- package/dist/drawer.d.ts +24 -32
- package/dist/file-change.d.ts +18 -24
- package/dist/file-picker-entry.d.ts +1 -1
- package/dist/form.d.ts +34 -41
- package/dist/gauge.d.ts +40 -51
- package/dist/gradient.d.ts +21 -25
- package/dist/grid.d.ts +19 -25
- package/dist/heading.d.ts +12 -17
- package/dist/heatmap.d.ts +27 -37
- package/dist/help.d.ts +27 -34
- package/dist/histogram.d.ts +27 -37
- package/dist/image.d.ts +11 -14
- package/dist/index.d.ts +6 -6
- package/dist/json.d.ts +23 -30
- package/dist/kbd.d.ts +14 -18
- package/dist/line-chart.d.ts +40 -49
- package/dist/link.d.ts +24 -28
- package/dist/loading-indicator.d.ts +11 -15
- package/dist/log.d.ts +14 -19
- package/dist/markdown.d.ts +22 -27
- package/dist/masked-input.d.ts +23 -31
- package/dist/menu.d.ts +32 -40
- package/dist/message-bubble.d.ts +16 -23
- package/dist/model-badge.d.ts +16 -22
- package/dist/model-selector.d.ts +19 -26
- package/dist/multi-progress.d.ts +22 -29
- package/dist/multi-select.d.ts +25 -35
- package/dist/notification-badge.d.ts +21 -28
- package/dist/number-input.d.ts +38 -52
- package/dist/operation-tree.d.ts +22 -25
- package/dist/option-list.d.ts +17 -23
- package/dist/ordered-list.d.ts +9 -11
- package/dist/packem_shared/{controlled-scroll-view.d-vF4wevEJ.d.ts → controlled-scroll-view.d-D3kZZzjI.d.ts} +8 -19
- package/dist/packem_shared/file-picker.d-CH7pccC7.d.ts +92 -0
- package/dist/packem_shared/{scroll-bar-box.d-DSBbBsRc.d.ts → scroll-bar-box.d-CpTYEcTZ.d.ts} +1 -18
- package/dist/packem_shared/{scroll-list.d-BP0UZSY4.d.ts → scroll-list.d-CPCF0RwC.d.ts} +1 -1
- package/dist/packem_shared/scroll-view.d-GZcgAHl4.d.ts +98 -0
- package/dist/packem_shared/{use-tree-view.d-dXTKoDPM.d.ts → use-tree-view.d-DeMQ6G2r.d.ts} +115 -151
- package/dist/paginator.d.ts +28 -38
- package/dist/paragraph.d.ts +15 -21
- package/dist/path-input.d.ts +29 -40
- package/dist/pie-chart.d.ts +21 -27
- package/dist/placeholder.d.ts +26 -34
- package/dist/popover.d.ts +20 -27
- package/dist/progress-bar.d.ts +25 -33
- package/dist/progress-circle.d.ts +27 -36
- package/dist/qr-code.d.ts +21 -27
- package/dist/radio-group.d.ts +30 -41
- package/dist/scatter-plot.d.ts +5 -16
- package/dist/scroll-bar-box.d.ts +1 -1
- package/dist/scroll-list.d.ts +2 -2
- package/dist/scroll-view.d.ts +1 -1
- package/dist/search-input.d.ts +23 -32
- package/dist/select-input-indicator.d.ts +15 -19
- package/dist/select-input-item.d.ts +18 -24
- package/dist/select-input.d.ts +49 -62
- package/dist/shimmer-text.d.ts +24 -30
- package/dist/sidebar.d.ts +21 -28
- package/dist/slider.d.ts +50 -66
- package/dist/sparkline.d.ts +19 -25
- package/dist/spinner.d.ts +7 -9
- package/dist/status-line.d.ts +14 -20
- package/dist/status-message.d.ts +7 -10
- package/dist/stepper.d.ts +18 -24
- package/dist/stopwatch.d.ts +24 -31
- package/dist/streaming-text.d.ts +20 -27
- package/dist/switch.d.ts +23 -32
- package/dist/tab.d.ts +8 -10
- package/dist/table.d.ts +40 -41
- package/dist/tabs.d.ts +50 -61
- package/dist/tag-input.d.ts +30 -42
- package/dist/tag.d.ts +14 -19
- package/dist/text-input.d.ts +21 -29
- package/dist/textarea.d.ts +32 -43
- package/dist/thinking-block.d.ts +25 -34
- package/dist/time-picker.d.ts +27 -37
- package/dist/timer.d.ts +28 -37
- package/dist/toast.d.ts +20 -28
- package/dist/token-usage.d.ts +23 -30
- package/dist/tool-call.d.ts +14 -19
- package/dist/tooltip.d.ts +19 -25
- package/dist/transition.d.ts +40 -48
- package/dist/tree-select.d.ts +25 -35
- package/dist/tree-view-entry.d.ts +1 -1
- package/dist/unordered-list.d.ts +12 -15
- package/dist/use-linked-scroll.d.ts +27 -27
- package/package.json +6 -6
- package/dist/packem_shared/file-picker.d-Cie6aAMD.d.ts +0 -104
- package/dist/packem_shared/scroll-view.d-BqKpI-F-.d.ts +0 -119
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## @visulima/tui-kit [1.0.2](https://github.com/visulima/visulima/compare/%40visulima%2Ftui-kit%401.0.1...%40visulima%2Ftui-kit%401.0.2) (2026-08-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Dependencies
|
|
5
|
+
|
|
6
|
+
* **@visulima/ansi:** upgraded to 4.1.0
|
|
7
|
+
* **@visulima/colorize:** upgraded to 2.1.0
|
|
8
|
+
* **@visulima/spinner:** upgraded to 1.0.1
|
|
9
|
+
* **@visulima/tui:** upgraded to 3.0.0
|
|
10
|
+
* **@visulima/tabular:** upgraded to 4.1.0
|
|
11
|
+
|
|
12
|
+
## @visulima/tui-kit [1.0.1](https://github.com/visulima/visulima/compare/%40visulima%2Ftui-kit%401.0.0...%40visulima%2Ftui-kit%401.0.1) (2026-07-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* **@visulima/tui:** upgraded to 2.0.1
|
|
18
|
+
|
|
1
19
|
## @visulima/tui-kit 1.0.0 (2026-07-27)
|
|
2
20
|
|
|
3
21
|
|
package/dist/accordion.d.ts
CHANGED
|
@@ -3,57 +3,50 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type AccordionItem = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Content rendered when the item is expanded.
|
|
7
|
+
*/
|
|
8
8
|
readonly content: ReactNode;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* Unique identifier.
|
|
11
|
+
*/
|
|
12
12
|
readonly id: string;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Header label.
|
|
15
|
+
*/
|
|
16
16
|
readonly title: ReactNode;
|
|
17
17
|
};
|
|
18
18
|
type Props = {
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Accent color for the focused header.
|
|
21
|
+
* @default "blue"
|
|
22
|
+
*/
|
|
23
23
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* When true, multiple panels can be open at once.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
28
|
readonly allowMultiple?: boolean;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* Auto-focus the first item on mount.
|
|
31
|
+
*/
|
|
32
32
|
readonly autoFocus?: boolean;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
* Initially open item ids.
|
|
35
|
+
*/
|
|
36
36
|
readonly defaultExpanded?: ReadonlyArray<string>;
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
* Disable interaction.
|
|
39
|
+
*/
|
|
40
40
|
readonly isDisabled?: boolean;
|
|
41
41
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
* List of panels.
|
|
43
|
+
*/
|
|
44
44
|
readonly items: ReadonlyArray<AccordionItem>;
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
|
-
* Keyboard-navigable accordion. Use arrow keys to move between panels and
|
|
48
|
-
* Enter / Space to toggle.
|
|
49
|
-
* @returns A `ReactElement` rendering the accordion column.
|
|
50
|
-
*/
|
|
51
|
-
declare function Accordion({
|
|
52
|
-
accentColor,
|
|
53
|
-
allowMultiple,
|
|
54
|
-
autoFocus,
|
|
55
|
-
defaultExpanded,
|
|
56
|
-
isDisabled,
|
|
57
|
-
items
|
|
58
|
-
}: Props): ReactElement;
|
|
47
|
+
* Keyboard-navigable accordion. Use arrow keys to move between panels and
|
|
48
|
+
* Enter / Space to toggle.
|
|
49
|
+
* @returns A `ReactElement` rendering the accordion column.
|
|
50
|
+
*/
|
|
51
|
+
declare function Accordion({ accentColor, allowMultiple, autoFocus, defaultExpanded, isDisabled, items }: Props): ReactElement;
|
|
59
52
|
export { Accordion, AccordionItem, type Props as AccordionProps, Props, Accordion as default };
|
package/dist/alert.d.ts
CHANGED
|
@@ -3,24 +3,20 @@ import { V as Variant } from "./packem_shared/variant-config.d-D5NnrrQK.js";
|
|
|
3
3
|
type AlertVariant = Variant;
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Alert message content.
|
|
7
|
+
*/
|
|
8
8
|
readonly children: ReactNode;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* Optional heading displayed above the message.
|
|
11
|
+
*/
|
|
12
12
|
readonly title?: string;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Determines the border color and icon.
|
|
15
|
+
*/
|
|
16
16
|
readonly variant: AlertVariant;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* Renders a bordered alert box with a variant-specific icon, optional title, and message.
|
|
20
|
-
*/
|
|
21
|
-
declare function Alert({
|
|
22
|
-
children,
|
|
23
|
-
title,
|
|
24
|
-
variant
|
|
25
|
-
}: Props): ReactElement;
|
|
19
|
+
* Renders a bordered alert box with a variant-specific icon, optional title, and message.
|
|
20
|
+
*/
|
|
21
|
+
declare function Alert({ children, title, variant }: Props): ReactElement;
|
|
26
22
|
export { Alert, type Props as AlertProps, AlertVariant, Props, Alert as default };
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { ReactNode, ReactElement } from 'react';
|
|
2
2
|
type Props = {
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
* Keyed children. Any child that accepts a `show: boolean` prop and calls
|
|
5
|
+
* `onExit` when its exit transition finishes (such as `<Transition />`) is
|
|
6
|
+
* orchestrated automatically. Other children render as-is.
|
|
7
|
+
*/
|
|
8
8
|
readonly children: ReactNode;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Orchestrates enter / exit animations for keyed children. Wrap a dynamic
|
|
12
|
-
* list of `<Transition />` (or any component accepting `show` + `onExit`) to
|
|
13
|
-
* keep outgoing children mounted until their exit animation finishes.
|
|
14
|
-
*/
|
|
15
|
-
declare function AnimatePresence({
|
|
16
|
-
children
|
|
17
|
-
}: Props): ReactElement;
|
|
11
|
+
* Orchestrates enter / exit animations for keyed children. Wrap a dynamic
|
|
12
|
+
* list of `<Transition />` (or any component accepting `show` + `onExit`) to
|
|
13
|
+
* keep outgoing children mounted until their exit animation finishes.
|
|
14
|
+
*/
|
|
15
|
+
declare function AnimatePresence({ children }: Props): ReactElement;
|
|
18
16
|
export { AnimatePresence, type Props as AnimatePresenceProps, Props, AnimatePresence as default };
|
|
@@ -5,61 +5,51 @@ type ApprovalRisk = "high" | "low" | "medium";
|
|
|
5
5
|
type ApprovalDecision = "allow-always" | "allow-once" | "deny";
|
|
6
6
|
type Props = {
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
* Accent color for the highlighted option letters. Overrides the risk color.
|
|
9
|
+
*/
|
|
10
10
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
* Auto-focus the prompt on mount. Set to `false` if a parent already
|
|
13
|
+
* owns focus and routes input to this component.
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
16
|
readonly autoFocus?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
* Optional body rendered between the header and the prompt line (e.g. a
|
|
19
|
+
* rendered diff or command preview).
|
|
20
|
+
*/
|
|
21
21
|
readonly children?: ReactNode;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
* Accessible description of what approving will do.
|
|
24
|
+
*/
|
|
25
25
|
readonly description?: string;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
* Disable input; use when a parent manages focus and input routing.
|
|
28
|
+
*/
|
|
29
29
|
readonly isDisabled?: boolean;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
* Resolution callback. Called once the user answers.
|
|
32
|
+
*/
|
|
33
33
|
readonly onDecision: (decision: ApprovalDecision) => void;
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
* Params shown as a compact key=value preview.
|
|
36
|
+
*/
|
|
37
37
|
readonly params?: Readonly<Record<string, unknown>>;
|
|
38
38
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
* Severity badge; controls the border color.
|
|
40
|
+
* @default "medium"
|
|
41
|
+
*/
|
|
42
42
|
readonly risk?: ApprovalRisk;
|
|
43
43
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
* Name of the tool / action under review.
|
|
45
|
+
*/
|
|
46
46
|
readonly tool: string;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
|
-
* Three-way approval prompt for tool calls. Resolves via `onDecision`:
|
|
50
|
-
* `y` / Enter → allow-once, `a` → allow-always, `n` / Esc → deny.
|
|
51
|
-
* @returns A bordered `ReactElement` containing the risk banner, params
|
|
52
|
-
* preview, optional body, and the prompt line.
|
|
53
|
-
*/
|
|
54
|
-
declare function ApprovalPrompt({
|
|
55
|
-
accentColor,
|
|
56
|
-
autoFocus,
|
|
57
|
-
children,
|
|
58
|
-
description,
|
|
59
|
-
isDisabled,
|
|
60
|
-
onDecision,
|
|
61
|
-
params,
|
|
62
|
-
risk,
|
|
63
|
-
tool
|
|
64
|
-
}: Props): ReactElement;
|
|
49
|
+
* Three-way approval prompt for tool calls. Resolves via `onDecision`:
|
|
50
|
+
* `y` / Enter → allow-once, `a` → allow-always, `n` / Esc → deny.
|
|
51
|
+
* @returns A bordered `ReactElement` containing the risk banner, params
|
|
52
|
+
* preview, optional body, and the prompt line.
|
|
53
|
+
*/
|
|
54
|
+
declare function ApprovalPrompt({ accentColor, autoFocus, children, description, isDisabled, onDecision, params, risk, tool }: Props): ReactElement;
|
|
65
55
|
export { ApprovalDecision, ApprovalPrompt, type Props as ApprovalPromptProps, ApprovalRisk, Props, ApprovalPrompt as default };
|
package/dist/area-chart.d.ts
CHANGED
|
@@ -5,62 +5,52 @@ import { LineSeries } from "./line-chart.js";
|
|
|
5
5
|
import '@visulima/tui/canvas';
|
|
6
6
|
type Props = {
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
* Axis label color.
|
|
9
|
+
* @default "gray"
|
|
10
|
+
*/
|
|
11
11
|
readonly axisColor?: LiteralUnion<AnsiColors, string>;
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
* Density of the shaded fill below each line.
|
|
14
|
+
* - `light` → `░`
|
|
15
|
+
* - `medium` → `▒` (default)
|
|
16
|
+
* - `heavy` → `▓`
|
|
17
|
+
*/
|
|
18
18
|
readonly fillDensity?: "heavy" | "light" | "medium";
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Chart body height in character rows.
|
|
21
|
+
* @default 10
|
|
22
|
+
*/
|
|
23
23
|
readonly height?: number;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Upper bound for the y-axis.
|
|
26
|
+
*/
|
|
27
27
|
readonly maxY?: number;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
* Lower bound for the y-axis.
|
|
30
|
+
*/
|
|
31
31
|
readonly minY?: number;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
* Fallback palette.
|
|
34
|
+
*/
|
|
35
35
|
readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Series to plot.
|
|
38
|
+
*/
|
|
39
39
|
readonly series: ReadonlyArray<LineSeries>;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
* Render the legend below the plot.
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
44
|
readonly showLegend?: boolean;
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
* Chart body width in character columns.
|
|
47
|
+
* @default 40
|
|
48
|
+
*/
|
|
49
49
|
readonly width?: number;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
|
-
* Area chart: line chart with the area between the line and the baseline
|
|
53
|
-
* filled with shaded blocks.
|
|
54
|
-
*/
|
|
55
|
-
declare function AreaChart({
|
|
56
|
-
axisColor,
|
|
57
|
-
fillDensity,
|
|
58
|
-
height,
|
|
59
|
-
maxY,
|
|
60
|
-
minY,
|
|
61
|
-
palette,
|
|
62
|
-
series,
|
|
63
|
-
showLegend,
|
|
64
|
-
width
|
|
65
|
-
}: Props): ReactElement;
|
|
52
|
+
* Area chart: line chart with the area between the line and the baseline
|
|
53
|
+
* filled with shaded blocks.
|
|
54
|
+
*/
|
|
55
|
+
declare function AreaChart({ axisColor, fillDensity, height, maxY, minY, palette, series, showLegend, width }: Props): ReactElement;
|
|
66
56
|
export { AreaChart, type Props as AreaChartProps, Props, AreaChart as default };
|
package/dist/badge.d.ts
CHANGED
|
@@ -3,20 +3,17 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Label content. Strings are automatically uppercased.
|
|
7
|
+
*/
|
|
8
8
|
readonly children: ReactNode;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
* Background color for the badge.
|
|
11
|
+
* @default "magenta"
|
|
12
|
+
*/
|
|
13
13
|
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Renders an uppercase colored label badge, useful for status indicators.
|
|
17
|
-
*/
|
|
18
|
-
declare function Badge({
|
|
19
|
-
children,
|
|
20
|
-
color
|
|
21
|
-
}: Props): ReactElement;
|
|
16
|
+
* Renders an uppercase colored label badge, useful for status indicators.
|
|
17
|
+
*/
|
|
18
|
+
declare function Badge({ children, color }: Props): ReactElement;
|
|
22
19
|
export { Badge, type Props as BadgeProps, Props, Badge as default };
|
package/dist/bar-chart.d.ts
CHANGED
|
@@ -3,65 +3,56 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type BarDatum = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Per-bar color override. Falls back to the chart-level palette.
|
|
7
|
+
*/
|
|
8
8
|
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
9
9
|
readonly label?: string;
|
|
10
10
|
readonly value: number;
|
|
11
11
|
};
|
|
12
12
|
type Props = {
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Bars to render.
|
|
15
|
+
*/
|
|
16
16
|
readonly data: ReadonlyArray<BarDatum>;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
* Total height of the plot area in character rows.
|
|
19
|
+
* @default 10
|
|
20
|
+
*/
|
|
21
21
|
readonly height?: number;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
* Optional upper bound for the axis. When omitted the chart uses the
|
|
24
|
+
* largest value in `data`.
|
|
25
|
+
*/
|
|
26
26
|
readonly max?: number;
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
* Orientation of the bars.
|
|
29
|
+
* @default "vertical"
|
|
30
|
+
*/
|
|
31
31
|
readonly orientation?: "horizontal" | "vertical";
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
* Fallback palette cycled through when a bar does not provide its own color.
|
|
34
|
+
* @default ["cyan", "magenta", "yellow", "green", "blue", "red"]
|
|
35
|
+
*/
|
|
36
36
|
readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
* Render labels underneath vertical bars (or to the left of horizontal bars).
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
41
|
readonly showLabels?: boolean;
|
|
42
42
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
* Render numeric values next to each bar.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
46
|
readonly showValues?: boolean;
|
|
47
47
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
* Total width of the plot area in character columns. Defaults to
|
|
49
|
+
* `data.length * 3` for vertical charts, or `24` for horizontal.
|
|
50
|
+
*/
|
|
51
51
|
readonly width?: number;
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
|
-
* Bar chart rendered on top of `Canvas`. Uses fractional block glyphs for
|
|
55
|
-
* sub-cell precision (▁▂▃▄▅▆▇█ vertical, ▏▎▍▌▋▊▉█ horizontal).
|
|
56
|
-
*/
|
|
57
|
-
declare function BarChart({
|
|
58
|
-
data,
|
|
59
|
-
height,
|
|
60
|
-
max: maxOverride,
|
|
61
|
-
orientation,
|
|
62
|
-
palette,
|
|
63
|
-
showLabels,
|
|
64
|
-
showValues,
|
|
65
|
-
width: widthOverride
|
|
66
|
-
}: Props): ReactElement;
|
|
54
|
+
* Bar chart rendered on top of `Canvas`. Uses fractional block glyphs for
|
|
55
|
+
* sub-cell precision (▁▂▃▄▅▆▇█ vertical, ▏▎▍▌▋▊▉█ horizontal).
|
|
56
|
+
*/
|
|
57
|
+
declare function BarChart({ data, height, max: maxOverride, orientation, palette, showLabels, showValues, width: widthOverride }: Props): ReactElement;
|
|
67
58
|
export { BarChart, type Props as BarChartProps, BarDatum, Props, BarChart as default };
|
package/dist/big-text.d.ts
CHANGED
|
@@ -1,81 +1,71 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Available CFonts font faces.
|
|
4
|
-
*/
|
|
3
|
+
* Available CFonts font faces.
|
|
4
|
+
*/
|
|
5
5
|
type Font = "3d" | "block" | "chrome" | "grid" | "huge" | "pallet" | "shade" | "simple" | "simple3d" | "simpleBlock" | "slick" | "tiny";
|
|
6
6
|
/**
|
|
7
|
-
* Horizontal text alignment.
|
|
8
|
-
*/
|
|
7
|
+
* Horizontal text alignment.
|
|
8
|
+
*/
|
|
9
9
|
type Align = "center" | "left" | "right";
|
|
10
10
|
/**
|
|
11
|
-
* Terminal background color names supported by CFonts.
|
|
12
|
-
*/
|
|
11
|
+
* Terminal background color names supported by CFonts.
|
|
12
|
+
*/
|
|
13
13
|
type BackgroundColor = "black" | "blue" | "cyan" | "green" | "magenta" | "red" | "transparent" | "white" | "yellow";
|
|
14
14
|
type Props = {
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Horizontal alignment of the text.
|
|
17
|
+
* @default "left"
|
|
18
|
+
*/
|
|
19
19
|
readonly align?: Align;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
* Background color.
|
|
22
|
+
* @default "transparent"
|
|
23
|
+
*/
|
|
24
24
|
readonly backgroundColor?: BackgroundColor;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
* Colors to use for the font. Accepts color names, hex values, or `"system"` for terminal default.
|
|
27
|
+
* @default ["system"]
|
|
28
|
+
*/
|
|
29
29
|
readonly colors?: string[];
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
* Font face to use.
|
|
32
|
+
* @default "block"
|
|
33
|
+
* @see https://github.com/dominikwilkowski/cfonts#supported-fonts
|
|
34
|
+
*/
|
|
35
35
|
readonly font?: Font;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
* Letter spacing.
|
|
38
|
+
* @default 1
|
|
39
|
+
*/
|
|
40
40
|
readonly letterSpacing?: number;
|
|
41
41
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
* Line height.
|
|
43
|
+
* @default 1
|
|
44
|
+
*/
|
|
45
45
|
readonly lineHeight?: number;
|
|
46
46
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
* Maximum character length per line. `0` means no limit.
|
|
48
|
+
* @default 0
|
|
49
|
+
*/
|
|
50
50
|
readonly maxLength?: number;
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
* Whether to add an empty line on top and at the bottom of the output.
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
55
|
readonly space?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
* The text to render in a large font.
|
|
58
|
+
*/
|
|
59
59
|
readonly text: string;
|
|
60
60
|
};
|
|
61
61
|
/**
|
|
62
|
-
* Render large terminal text using CFonts.
|
|
63
|
-
* @example
|
|
64
|
-
* ```tsx
|
|
65
|
-
* import { BigText } from "@visulima/tui/ink";
|
|
66
|
-
*
|
|
67
|
-
* <BigText text="Hello" font="block" />
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
declare function BigText({
|
|
71
|
-
align,
|
|
72
|
-
backgroundColor,
|
|
73
|
-
colors,
|
|
74
|
-
font,
|
|
75
|
-
letterSpacing,
|
|
76
|
-
lineHeight,
|
|
77
|
-
maxLength,
|
|
78
|
-
space,
|
|
79
|
-
text
|
|
80
|
-
}: Props): ReactElement;
|
|
62
|
+
* Render large terminal text using CFonts.
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* import { BigText } from "@visulima/tui/ink";
|
|
66
|
+
*
|
|
67
|
+
* <BigText text="Hello" font="block" />
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare function BigText({ align, backgroundColor, colors, font, letterSpacing, lineHeight, maxLength, space, text }: Props): ReactElement;
|
|
81
71
|
export { type Align, type BackgroundColor, BigText, type Align as BigTextAlign, type BackgroundColor as BigTextBackgroundColor, type Font as BigTextFont, type Props as BigTextProps, type Font, type Props, BigText as default };
|
package/dist/blink-dot.d.ts
CHANGED
|
@@ -3,34 +3,29 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Glyph rendered as the blinking dot.
|
|
7
|
+
* @default "●" (filled bullet)
|
|
8
|
+
*/
|
|
9
9
|
readonly character?: string;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Dot color.
|
|
12
|
+
* @default "red"
|
|
13
|
+
*/
|
|
14
14
|
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Milliseconds per blink cycle. The dot is visible for half the cycle.
|
|
17
|
+
* @default 800
|
|
18
|
+
*/
|
|
19
19
|
readonly interval?: number;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
* When false, the dot stays solid (no animation).
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
24
|
readonly isActive?: boolean;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
|
-
* Steady or blinking indicator dot. Pair with `StatusLine` or next to a
|
|
28
|
-
* label to show a "live" / "recording" status.
|
|
29
|
-
*/
|
|
30
|
-
declare function BlinkDot({
|
|
31
|
-
character,
|
|
32
|
-
color,
|
|
33
|
-
interval,
|
|
34
|
-
isActive
|
|
35
|
-
}: Props): ReactElement;
|
|
27
|
+
* Steady or blinking indicator dot. Pair with `StatusLine` or next to a
|
|
28
|
+
* label to show a "live" / "recording" status.
|
|
29
|
+
*/
|
|
30
|
+
declare function BlinkDot({ character, color, interval, isActive }: Props): ReactElement;
|
|
36
31
|
export { BlinkDot, type Props as BlinkDotProps, Props, BlinkDot as default };
|