@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
|
@@ -3,30 +3,26 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Color of the indicator when selected.
|
|
7
|
+
* @default "blue"
|
|
8
|
+
*/
|
|
9
9
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* Whether the parent SelectInput has focus.
|
|
12
|
+
* When `false`, the indicator is dimmed even if the item is selected.
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
15
|
readonly isFocused?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
* Whether this indicator's item is currently selected.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
20
|
readonly isSelected?: boolean;
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
|
-
* Renders a pointer indicator next to the selected item, or a blank space otherwise.
|
|
24
|
-
* When unfocused, the indicator is rendered with `dimColor` to visually distinguish
|
|
25
|
-
* the active select input from inactive ones.
|
|
26
|
-
*/
|
|
27
|
-
declare function SelectInputIndicator({
|
|
28
|
-
accentColor,
|
|
29
|
-
isFocused,
|
|
30
|
-
isSelected
|
|
31
|
-
}: Props): ReactElement;
|
|
23
|
+
* Renders a pointer indicator next to the selected item, or a blank space otherwise.
|
|
24
|
+
* When unfocused, the indicator is rendered with `dimColor` to visually distinguish
|
|
25
|
+
* the active select input from inactive ones.
|
|
26
|
+
*/
|
|
27
|
+
declare function SelectInputIndicator({ accentColor, isFocused, isSelected }: Props): ReactElement;
|
|
32
28
|
export { Props, SelectInputIndicator, type Props as SelectInputIndicatorProps, SelectInputIndicator as default };
|
|
@@ -3,39 +3,33 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Color of the label when selected.
|
|
7
|
+
* @default "blue"
|
|
8
|
+
*/
|
|
9
9
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* Color of the label when not selected.
|
|
12
|
+
*/
|
|
13
13
|
readonly defaultColor?: LiteralUnion<AnsiColors, string>;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
* Whether the parent SelectInput has focus.
|
|
16
|
+
* When `false`, the selected item is dimmed.
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
19
|
readonly isFocused?: boolean;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
* Whether this item is currently selected.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
24
|
readonly isSelected?: boolean;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
* Text label to display for this item.
|
|
27
|
+
*/
|
|
28
28
|
readonly label: string;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
* Renders an item label, using `accentColor` when selected and `defaultColor` otherwise.
|
|
32
|
-
* When unfocused, selected items are rendered with `dimColor`.
|
|
33
|
-
*/
|
|
34
|
-
declare function SelectInputItem({
|
|
35
|
-
accentColor,
|
|
36
|
-
defaultColor,
|
|
37
|
-
isFocused,
|
|
38
|
-
isSelected,
|
|
39
|
-
label
|
|
40
|
-
}: Props): ReactElement;
|
|
31
|
+
* Renders an item label, using `accentColor` when selected and `defaultColor` otherwise.
|
|
32
|
+
* When unfocused, selected items are rendered with `dimColor`.
|
|
33
|
+
*/
|
|
34
|
+
declare function SelectInputItem({ accentColor, defaultColor, isFocused, isSelected, label }: Props): ReactElement;
|
|
41
35
|
export { Props, SelectInputItem, type Props as SelectInputItemProps, SelectInputItem as default };
|
package/dist/select-input.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { Props as Props$1 } from "./select-input-indicator.js";
|
|
|
5
5
|
import { Props as Props$2 } from "./select-input-item.js";
|
|
6
6
|
type Item<V> = {
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
* Called automatically when this item is selected (via Enter or number key).
|
|
9
|
+
* Fires after `onSelect`. Useful for defining per-item behavior inline.
|
|
10
|
+
*/
|
|
11
11
|
readonly action?: () => void;
|
|
12
12
|
readonly key?: string;
|
|
13
13
|
readonly label: string;
|
|
@@ -15,96 +15,83 @@ type Item<V> = {
|
|
|
15
15
|
};
|
|
16
16
|
type SeparatorItem = {
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* Marks this entry as a non-focusable separator line.
|
|
19
|
+
*/
|
|
20
20
|
readonly isSeparator: true;
|
|
21
21
|
readonly key?: string;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
* Custom separator text. Defaults to `"───"`.
|
|
24
|
+
*/
|
|
25
25
|
readonly label?: string;
|
|
26
26
|
};
|
|
27
27
|
type SelectInputEntry<V> = Item<V> | SeparatorItem;
|
|
28
28
|
type Props<V> = {
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
* Color used for the selected item and indicator.
|
|
31
|
+
* @default "blue"
|
|
32
|
+
*/
|
|
33
33
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
* Color used for unselected items.
|
|
36
|
+
*/
|
|
37
37
|
readonly defaultColor?: LiteralUnion<AnsiColors, string>;
|
|
38
38
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
* Controlled selected index. When provided, the component becomes controlled
|
|
40
|
+
* and `initialIndex` is ignored. Update this value in the `onHighlight` callback
|
|
41
|
+
* to track selection externally. If the index points to a separator, the nearest
|
|
42
|
+
* selectable item is highlighted instead.
|
|
43
|
+
*/
|
|
44
44
|
readonly index?: number;
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
* Custom component to override the default indicator component.
|
|
47
|
+
*/
|
|
48
48
|
readonly indicatorComponent?: FC<Props$1>;
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
* Index of initially-selected item in `items` array.
|
|
51
|
+
* Ignored when `index` is provided.
|
|
52
|
+
* When omitted (`undefined`), no item is highlighted until the user presses a key.
|
|
53
|
+
* If the index points to a separator, the nearest selectable item is used.
|
|
54
|
+
*/
|
|
55
55
|
readonly initialIndex?: number;
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
* Whether the input is focused. Useful for when there are multiple
|
|
58
|
+
* inputs on the screen and you need to control which one captures input.
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
61
|
readonly isFocused?: boolean;
|
|
62
62
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
* Custom component to override the default item component.
|
|
64
|
+
*/
|
|
65
65
|
readonly itemComponent?: FC<Props$2>;
|
|
66
66
|
/** @default [] */
|
|
67
67
|
readonly items?: ReadonlyArray<SelectInputEntry<V>>;
|
|
68
68
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
* Number of visible items. Useful if the list is long and you want
|
|
70
|
+
* to limit the display with a scrolling window.
|
|
71
|
+
*/
|
|
72
72
|
readonly limit?: number;
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
* Called when the user highlights a new item via arrow keys or `j`/`k`.
|
|
75
|
+
* The second argument is the index of the highlighted item in the visible list.
|
|
76
|
+
*/
|
|
77
77
|
readonly onHighlight?: (item: Item<V>, index: number) => void;
|
|
78
78
|
/**
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
* Called when the user selects an item via Enter or a number key (1-9).
|
|
80
|
+
*/
|
|
81
81
|
readonly onSelect?: (item: Item<V>) => void;
|
|
82
82
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
* Whether to reset the selection when items change.
|
|
84
|
+
* Set to `false` to preserve the current selection across item updates.
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
87
|
readonly resetOnItemsChange?: boolean;
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
|
-
* A select input component for terminal UIs.
|
|
91
|
-
*
|
|
92
|
-
* Renders a list of items with an indicator showing the currently highlighted item.
|
|
93
|
-
* Users can navigate with arrow keys or `j`/`k`, select with Enter, or jump to an
|
|
94
|
-
* item by pressing a number key (1-9).
|
|
95
|
-
*/
|
|
96
|
-
declare function SelectInput<V>({
|
|
97
|
-
accentColor,
|
|
98
|
-
defaultColor,
|
|
99
|
-
index,
|
|
100
|
-
indicatorComponent,
|
|
101
|
-
initialIndex,
|
|
102
|
-
isFocused,
|
|
103
|
-
itemComponent,
|
|
104
|
-
items,
|
|
105
|
-
limit: customLimit,
|
|
106
|
-
onHighlight,
|
|
107
|
-
onSelect,
|
|
108
|
-
resetOnItemsChange
|
|
109
|
-
}: Props<V>): ReactElement;
|
|
90
|
+
* A select input component for terminal UIs.
|
|
91
|
+
*
|
|
92
|
+
* Renders a list of items with an indicator showing the currently highlighted item.
|
|
93
|
+
* Users can navigate with arrow keys or `j`/`k`, select with Enter, or jump to an
|
|
94
|
+
* item by pressing a number key (1-9).
|
|
95
|
+
*/
|
|
96
|
+
declare function SelectInput<V>({ accentColor, defaultColor, index, indicatorComponent, initialIndex, isFocused, itemComponent, items, limit: customLimit, onHighlight, onSelect, resetOnItemsChange }: Props<V>): ReactElement;
|
|
110
97
|
export { Item, Props, SelectInput, SelectInputEntry, type Item as SelectInputItemType, type Props as SelectInputProps, type SeparatorItem as SelectInputSeparator, SeparatorItem, SelectInput as default };
|
package/dist/shimmer-text.d.ts
CHANGED
|
@@ -3,45 +3,39 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Width of the highlighted band in characters.
|
|
7
|
+
* @default 3
|
|
8
|
+
*/
|
|
9
9
|
readonly bandWidth?: number;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* Base color of the non-highlighted text.
|
|
12
|
+
*/
|
|
13
13
|
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
* Highlight color of the sweeping band.
|
|
16
|
+
* @default "white"
|
|
17
|
+
*/
|
|
18
18
|
readonly highlightColor?: LiteralUnion<AnsiColors, string>;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Milliseconds between frames of the shimmer.
|
|
21
|
+
* @default 60
|
|
22
|
+
*/
|
|
23
23
|
readonly interval?: number;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Text to render with a shimmer sweep.
|
|
26
|
+
*/
|
|
27
27
|
readonly text: string;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* Text with an animated highlight band that sweeps across the characters.
|
|
31
|
-
* Perfect for "generating…" states.
|
|
32
|
-
* @param props Component props.
|
|
33
|
-
* @param props.bandWidth Number of characters in the bright band.
|
|
34
|
-
* @param props.color Color applied to characters outside the band.
|
|
35
|
-
* @param props.highlightColor Color applied to characters inside the band.
|
|
36
|
-
* @param props.interval Milliseconds between frames.
|
|
37
|
-
* @param props.text Content to shimmer.
|
|
38
|
-
* @returns A single `Text` element composed of per-character `Text` children.
|
|
39
|
-
*/
|
|
40
|
-
declare function ShimmerText({
|
|
41
|
-
bandWidth,
|
|
42
|
-
color,
|
|
43
|
-
highlightColor,
|
|
44
|
-
interval,
|
|
45
|
-
text
|
|
46
|
-
}: Props): ReactElement;
|
|
30
|
+
* Text with an animated highlight band that sweeps across the characters.
|
|
31
|
+
* Perfect for "generating…" states.
|
|
32
|
+
* @param props Component props.
|
|
33
|
+
* @param props.bandWidth Number of characters in the bright band.
|
|
34
|
+
* @param props.color Color applied to characters outside the band.
|
|
35
|
+
* @param props.highlightColor Color applied to characters inside the band.
|
|
36
|
+
* @param props.interval Milliseconds between frames.
|
|
37
|
+
* @param props.text Content to shimmer.
|
|
38
|
+
* @returns A single `Text` element composed of per-character `Text` children.
|
|
39
|
+
*/
|
|
40
|
+
declare function ShimmerText({ bandWidth, color, highlightColor, interval, text }: Props): ReactElement;
|
|
47
41
|
export { Props, ShimmerText, type Props as ShimmerTextProps, ShimmerText as default };
|
package/dist/sidebar.d.ts
CHANGED
|
@@ -3,45 +3,38 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Main content, filling the remaining width.
|
|
7
|
+
*/
|
|
8
8
|
readonly children: ReactNode;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
* Draw a border/rule between the sidebar and the content.
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
13
|
readonly divider?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
* Color of the divider rule.
|
|
16
|
+
* @default "gray"
|
|
17
|
+
*/
|
|
18
18
|
readonly dividerColor?: LiteralUnion<AnsiColors, string>;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Which side the sidebar sits on.
|
|
21
|
+
* @default "left"
|
|
22
|
+
*/
|
|
23
23
|
readonly side?: "left" | "right";
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Sidebar content.
|
|
26
|
+
*/
|
|
27
27
|
readonly sidebar: ReactNode;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
* Fixed sidebar width in cells.
|
|
30
|
+
* @default 24
|
|
31
|
+
*/
|
|
32
32
|
readonly width?: number;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
|
-
* A two-pane layout: a fixed-width sidebar and a flexible content area, with an
|
|
36
|
-
* optional vertical divider rule between them. The sidebar can sit on either
|
|
37
|
-
* side.
|
|
38
|
-
*/
|
|
39
|
-
declare function Sidebar({
|
|
40
|
-
children,
|
|
41
|
-
divider,
|
|
42
|
-
dividerColor,
|
|
43
|
-
side,
|
|
44
|
-
sidebar,
|
|
45
|
-
width
|
|
46
|
-
}: Props): ReactElement;
|
|
35
|
+
* A two-pane layout: a fixed-width sidebar and a flexible content area, with an
|
|
36
|
+
* optional vertical divider rule between them. The sidebar can sit on either
|
|
37
|
+
* side.
|
|
38
|
+
*/
|
|
39
|
+
declare function Sidebar({ children, divider, dividerColor, side, sidebar, width }: Props): ReactElement;
|
|
47
40
|
export { Props, Sidebar, type Props as SidebarProps, Sidebar as default };
|
package/dist/slider.d.ts
CHANGED
|
@@ -3,101 +3,85 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Accent color for the filled portion of the track and thumb.
|
|
7
|
+
* @default "green"
|
|
8
|
+
*/
|
|
9
9
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Color for the empty portion of the track.
|
|
12
|
+
* @default "gray"
|
|
13
|
+
*/
|
|
14
14
|
readonly defaultColor?: LiteralUnion<AnsiColors, string>;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Initial value when uncontrolled.
|
|
17
|
+
* @default 0
|
|
18
|
+
*/
|
|
19
19
|
readonly defaultValue?: number;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
* Character used for the empty portion of the track.
|
|
22
|
+
* @default "░"
|
|
23
|
+
*/
|
|
24
24
|
readonly emptyCharacter?: string;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
* Character used for the filled portion of the track.
|
|
27
|
+
* @default "█"
|
|
28
|
+
*/
|
|
29
29
|
readonly filledCharacter?: string;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
* When true, all input is ignored and the slider is dimmed.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
34
|
readonly isDisabled?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
* When true, the component responds to keyboard input.
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
39
|
readonly isFocused?: boolean;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
* Maximum value.
|
|
42
|
+
* @default 100
|
|
43
|
+
*/
|
|
44
44
|
readonly max?: number;
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
* Minimum value.
|
|
47
|
+
* @default 0
|
|
48
|
+
*/
|
|
49
49
|
readonly min?: number;
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
* Fires whenever the value changes.
|
|
52
|
+
*/
|
|
53
53
|
readonly onChange?: (value: number) => void;
|
|
54
54
|
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
* Layout direction of the slider.
|
|
56
|
+
* @default "horizontal"
|
|
57
|
+
*/
|
|
58
58
|
readonly orientation?: "horizontal" | "vertical";
|
|
59
59
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
* Increment size for arrow key presses.
|
|
61
|
+
* @default 1
|
|
62
|
+
*/
|
|
63
63
|
readonly step?: number;
|
|
64
64
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
* Character used to indicate the current position.
|
|
66
|
+
* @default "●"
|
|
67
|
+
*/
|
|
68
68
|
readonly thumbCharacter?: string;
|
|
69
69
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
* Controlled value. When provided, `defaultValue` is ignored.
|
|
71
|
+
*/
|
|
72
72
|
readonly value?: number;
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
* Width of the slider track in columns (horizontal) or rows (vertical).
|
|
75
|
+
* @default 20
|
|
76
|
+
*/
|
|
77
77
|
readonly width?: number;
|
|
78
78
|
};
|
|
79
79
|
/**
|
|
80
|
-
* A keyboard-driven slider / range input.
|
|
81
|
-
*
|
|
82
|
-
* ```tsx
|
|
83
|
-
* <Slider defaultValue={50} min={0} max={100} onChange={setValue} />
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
declare function Slider({
|
|
87
|
-
accentColor,
|
|
88
|
-
defaultColor,
|
|
89
|
-
defaultValue,
|
|
90
|
-
emptyCharacter,
|
|
91
|
-
filledCharacter,
|
|
92
|
-
isDisabled,
|
|
93
|
-
isFocused,
|
|
94
|
-
max,
|
|
95
|
-
min,
|
|
96
|
-
onChange,
|
|
97
|
-
orientation,
|
|
98
|
-
step,
|
|
99
|
-
thumbCharacter,
|
|
100
|
-
value: controlledValue,
|
|
101
|
-
width
|
|
102
|
-
}: Props): ReactElement;
|
|
80
|
+
* A keyboard-driven slider / range input.
|
|
81
|
+
*
|
|
82
|
+
* ```tsx
|
|
83
|
+
* <Slider defaultValue={50} min={0} max={100} onChange={setValue} />
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare function Slider({ accentColor, defaultColor, defaultValue, emptyCharacter, filledCharacter, isDisabled, isFocused, max, min, onChange, orientation, step, thumbCharacter, value: controlledValue, width }: Props): ReactElement;
|
|
103
87
|
export { Props, Slider, type Props as SliderProps, Slider as default };
|
package/dist/sparkline.d.ts
CHANGED
|
@@ -3,40 +3,34 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Color applied to the chart glyphs.
|
|
7
|
+
*/
|
|
8
8
|
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* Data points to plot. Values may be any real numbers.
|
|
11
|
+
*/
|
|
12
12
|
readonly data: ReadonlyArray<number>;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
* Render with shade glyphs (`░▒▓█`) instead of vertical bars, for a
|
|
15
|
+
* textured, monochrome-friendly look.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
18
|
readonly dither?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Optional fixed maximum for the vertical scale.
|
|
21
|
+
* When omitted the maximum data value is used.
|
|
22
|
+
*/
|
|
23
23
|
readonly max?: number;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* Optional fixed minimum for the vertical scale.
|
|
26
|
+
* When omitted the minimum data value is used.
|
|
27
|
+
*/
|
|
28
28
|
readonly min?: number;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
* Inline bar chart using Unicode block glyphs.
|
|
32
|
-
* @returns A `ReactElement` containing the glyph string, or `null` when
|
|
33
|
-
* `data` is empty.
|
|
34
|
-
*/
|
|
35
|
-
declare function Sparkline({
|
|
36
|
-
color,
|
|
37
|
-
data,
|
|
38
|
-
dither,
|
|
39
|
-
max,
|
|
40
|
-
min
|
|
41
|
-
}: Props): ReactElement | null;
|
|
31
|
+
* Inline bar chart using Unicode block glyphs.
|
|
32
|
+
* @returns A `ReactElement` containing the glyph string, or `null` when
|
|
33
|
+
* `data` is empty.
|
|
34
|
+
*/
|
|
35
|
+
declare function Sparkline({ color, data, dither, max, min }: Props): ReactElement | null;
|
|
42
36
|
export { Props, Sparkline, type Props as SparklineProps, Sparkline as default };
|
package/dist/spinner.d.ts
CHANGED
|
@@ -2,16 +2,14 @@ import { SpinnerName } from '@visulima/spinner';
|
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
* Type of a spinner.
|
|
6
|
+
* Accepts any preset from `@visulima/spinner` (cli-spinners + custom frame sets).
|
|
7
|
+
* @default "dots"
|
|
8
|
+
*/
|
|
9
9
|
readonly type?: SpinnerName;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* Spinner component that renders an animated loading indicator.
|
|
13
|
-
*/
|
|
14
|
-
declare function Spinner({
|
|
15
|
-
type
|
|
16
|
-
}: Props): ReactElement;
|
|
12
|
+
* Spinner component that renders an animated loading indicator.
|
|
13
|
+
*/
|
|
14
|
+
declare function Spinner({ type }: Props): ReactElement;
|
|
17
15
|
export { Props, Spinner, type Props as SpinnerProps, Spinner as default };
|