@visulima/tui-kit 1.0.0 → 1.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.
- package/CHANGELOG.md +7 -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 +2 -2
- 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/dist/command-block.d.ts
CHANGED
|
@@ -2,46 +2,38 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
2
2
|
type CommandStatus = "error" | "idle" | "running" | "success";
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
* Shell command rendered in the header.
|
|
6
|
+
*/
|
|
7
7
|
readonly command: string;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Optional working directory shown after the command name.
|
|
10
|
+
*/
|
|
11
11
|
readonly cwd?: string;
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* Duration in ms; shown when finished.
|
|
14
|
+
*/
|
|
15
15
|
readonly durationMs?: number;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Exit code of the completed command.
|
|
18
|
+
*/
|
|
19
19
|
readonly exitCode?: number;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Max output rows rendered before truncation. Use `Infinity` to disable.
|
|
22
|
+
*/
|
|
23
23
|
readonly maxOutputRows?: number;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Command output. Either a string (rendered as-is) or arbitrary children.
|
|
26
|
+
*/
|
|
27
27
|
readonly output?: ReactNode;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
* Lifecycle state. Controls the header icon and color.
|
|
30
|
+
* @default "idle"
|
|
31
|
+
*/
|
|
32
32
|
readonly status?: CommandStatus;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
|
-
* Renders a shell command with its output and a status header. Designed for
|
|
36
|
-
* coding-agent UIs that stream terminal operations.
|
|
37
|
-
*/
|
|
38
|
-
declare function CommandBlock({
|
|
39
|
-
command,
|
|
40
|
-
cwd,
|
|
41
|
-
durationMs,
|
|
42
|
-
exitCode,
|
|
43
|
-
maxOutputRows,
|
|
44
|
-
output,
|
|
45
|
-
status
|
|
46
|
-
}: Props): ReactElement;
|
|
35
|
+
* Renders a shell command with its output and a status header. Designed for
|
|
36
|
+
* coding-agent UIs that stream terminal operations.
|
|
37
|
+
*/
|
|
38
|
+
declare function CommandBlock({ command, cwd, durationMs, exitCode, maxOutputRows, output, status }: Props): ReactElement;
|
|
47
39
|
export { CommandBlock, type Props as CommandBlockProps, CommandStatus, Props, CommandBlock as default };
|
|
@@ -3,80 +3,71 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type CommandEntry = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Optional description rendered under the label.
|
|
7
|
+
*/
|
|
8
8
|
readonly description?: string;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* Optional hotkey rendered on the right.
|
|
11
|
+
*/
|
|
12
12
|
readonly hotkey?: string;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Optional icon rendered before the label.
|
|
15
|
+
*/
|
|
16
16
|
readonly icon?: ReactNode;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* Stable identifier returned by `onSelect`.
|
|
19
|
+
*/
|
|
20
20
|
readonly id: string;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
* Optional keywords to boost matching (not displayed).
|
|
23
|
+
*/
|
|
24
24
|
readonly keywords?: ReadonlyArray<string>;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
* Label shown in the list (and used as the primary match target).
|
|
27
|
+
*/
|
|
28
28
|
readonly label: string;
|
|
29
29
|
};
|
|
30
30
|
type Props = {
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
* Accent color for the border and focused row.
|
|
33
|
+
* @default "cyan"
|
|
34
|
+
*/
|
|
35
35
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Auto-focus the palette on mount.
|
|
38
|
+
*/
|
|
39
39
|
readonly autoFocus?: boolean;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
* Available commands to search.
|
|
42
|
+
*/
|
|
43
43
|
readonly commands: ReadonlyArray<CommandEntry>;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
* Empty-state text when nothing matches.
|
|
46
|
+
* @default "No results"
|
|
47
|
+
*/
|
|
48
48
|
readonly emptyText?: string;
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
* Max rows rendered in the list.
|
|
51
|
+
* @default 8
|
|
52
|
+
*/
|
|
53
53
|
readonly limit?: number;
|
|
54
54
|
/**
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
* Called when the user presses Escape.
|
|
56
|
+
*/
|
|
57
57
|
readonly onCancel?: () => void;
|
|
58
58
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
* Called when the user picks a command with Enter.
|
|
60
|
+
*/
|
|
61
61
|
readonly onSelect: (id: string, query: string) => void;
|
|
62
62
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
* Placeholder inside the search field.
|
|
64
|
+
* @default "Type a command or search..."
|
|
65
|
+
*/
|
|
66
66
|
readonly placeholder?: string;
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
* Ctrl-P style fuzzy command finder. Features a search input, ranked results,
|
|
70
|
-
* keyboard navigation, and Esc to cancel.
|
|
71
|
-
*/
|
|
72
|
-
declare function CommandPalette({
|
|
73
|
-
accentColor,
|
|
74
|
-
autoFocus,
|
|
75
|
-
commands,
|
|
76
|
-
emptyText,
|
|
77
|
-
limit,
|
|
78
|
-
onCancel,
|
|
79
|
-
onSelect,
|
|
80
|
-
placeholder
|
|
81
|
-
}: Props): ReactElement;
|
|
69
|
+
* Ctrl-P style fuzzy command finder. Features a search input, ranked results,
|
|
70
|
+
* keyboard navigation, and Esc to cancel.
|
|
71
|
+
*/
|
|
72
|
+
declare function CommandPalette({ accentColor, autoFocus, commands, emptyText, limit, onCancel, onSelect, placeholder }: Props): ReactElement;
|
|
82
73
|
export { CommandEntry, CommandPalette, type Props as CommandPaletteProps, Props, CommandPalette as default };
|
package/dist/confirm-dialog.d.ts
CHANGED
|
@@ -2,74 +2,62 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
2
2
|
type ConfirmTone = "danger" | "info" | "warning";
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
* Auto-focus the dialog on mount. Set `false` if a parent already owns
|
|
6
|
+
* focus and routes input here.
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
9
|
readonly autoFocus?: boolean;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Label for the cancel button.
|
|
12
|
+
* @default "Cancel"
|
|
13
|
+
*/
|
|
14
14
|
readonly cancelLabel?: string;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* Body content (rendered between title and buttons).
|
|
17
|
+
*/
|
|
18
18
|
readonly children?: ReactNode;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Label for the confirm button.
|
|
21
|
+
* @default "Confirm"
|
|
22
|
+
*/
|
|
23
23
|
readonly confirmLabel?: string;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* Default button when opening the dialog.
|
|
26
|
+
* @default "confirm"
|
|
27
|
+
*/
|
|
28
28
|
readonly defaultFocus?: "cancel" | "confirm";
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* Disable input.
|
|
31
|
+
*/
|
|
32
32
|
readonly isDisabled?: boolean;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
* Fired when the user declines.
|
|
35
|
+
*/
|
|
36
36
|
readonly onCancel: () => void;
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
* Fired when the user confirms.
|
|
39
|
+
*/
|
|
40
40
|
readonly onConfirm: () => void;
|
|
41
41
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
* Heading rendered at the top of the dialog.
|
|
43
|
+
*/
|
|
44
44
|
readonly title?: string;
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
* Controls the border color.
|
|
47
|
+
* @default "info"
|
|
48
|
+
*/
|
|
49
49
|
readonly tone?: ConfirmTone;
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
* Dialog width.
|
|
52
|
+
*/
|
|
53
53
|
readonly width?: number;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
|
-
* Full-width modal-style confirm/cancel prompt. Unlike `ConfirmInput`, this
|
|
57
|
-
* renders a visible two-button UI: ← / → to toggle focus, Enter to activate,
|
|
58
|
-
* y/n as shortcuts, Esc to cancel.
|
|
59
|
-
* @returns A bordered `ReactElement` with optional title, body, and two
|
|
60
|
-
* buttons (cancel / confirm).
|
|
61
|
-
*/
|
|
62
|
-
declare function ConfirmDialog({
|
|
63
|
-
autoFocus,
|
|
64
|
-
cancelLabel,
|
|
65
|
-
children,
|
|
66
|
-
confirmLabel,
|
|
67
|
-
defaultFocus,
|
|
68
|
-
isDisabled,
|
|
69
|
-
onCancel,
|
|
70
|
-
onConfirm,
|
|
71
|
-
title,
|
|
72
|
-
tone,
|
|
73
|
-
width
|
|
74
|
-
}: Props): ReactElement;
|
|
56
|
+
* Full-width modal-style confirm/cancel prompt. Unlike `ConfirmInput`, this
|
|
57
|
+
* renders a visible two-button UI: ← / → to toggle focus, Enter to activate,
|
|
58
|
+
* y/n as shortcuts, Esc to cancel.
|
|
59
|
+
* @returns A bordered `ReactElement` with optional title, body, and two
|
|
60
|
+
* buttons (cancel / confirm).
|
|
61
|
+
*/
|
|
62
|
+
declare function ConfirmDialog({ autoFocus, cancelLabel, children, confirmLabel, defaultFocus, isDisabled, onCancel, onConfirm, title, tone, width }: Props): ReactElement;
|
|
75
63
|
export { ConfirmDialog, type Props as ConfirmDialogProps, ConfirmTone, Props, ConfirmDialog as default };
|
package/dist/confirm-input.d.ts
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
type Props = {
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
* The default action when pressing Enter without typing Y or N.
|
|
5
|
+
* @default "confirm"
|
|
6
|
+
*/
|
|
7
7
|
readonly defaultChoice?: "cancel" | "confirm";
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
* Whether the input is disabled.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
12
|
readonly isDisabled?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Called when the user cancels (presses N).
|
|
15
|
+
*/
|
|
16
16
|
readonly onCancel: () => void;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* Called when the user confirms (presses Y).
|
|
19
|
+
*/
|
|
20
20
|
readonly onConfirm: () => void;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
* Whether pressing Enter submits the default choice.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
25
|
readonly submitOnEnter?: boolean;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* Renders a Y/N confirmation prompt. Shows "Y/n" when default is confirm,
|
|
29
|
-
* or "y/N" when default is cancel.
|
|
30
|
-
*/
|
|
31
|
-
declare function ConfirmInput({
|
|
32
|
-
defaultChoice,
|
|
33
|
-
isDisabled,
|
|
34
|
-
onCancel,
|
|
35
|
-
onConfirm,
|
|
36
|
-
submitOnEnter
|
|
37
|
-
}: Props): ReactElement;
|
|
28
|
+
* Renders a Y/N confirmation prompt. Shows "Y/n" when default is confirm,
|
|
29
|
+
* or "y/N" when default is cancel.
|
|
30
|
+
*/
|
|
31
|
+
declare function ConfirmInput({ defaultChoice, isDisabled, onCancel, onConfirm, submitOnEnter }: Props): ReactElement;
|
|
38
32
|
export { ConfirmInput, type Props as ConfirmInputProps, Props, ConfirmInput as default };
|
|
@@ -3,52 +3,45 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
type ConsoleOverlayDock = "bottom" | "top";
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Dock position within the parent container.
|
|
7
|
+
* @default "bottom"
|
|
8
|
+
*/
|
|
9
9
|
readonly dock?: ConsoleOverlayDock;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Which console levels to capture.
|
|
12
|
+
* @default ["log", "info", "warn", "error", "debug"]
|
|
13
|
+
*/
|
|
14
14
|
readonly filter?: ReadonlyArray<ConsoleLevel>;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Visible height in rows.
|
|
17
|
+
* @default 8
|
|
18
|
+
*/
|
|
19
19
|
readonly height?: number;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
* Maximum entries to keep in the buffer.
|
|
22
|
+
* @default 200
|
|
23
|
+
*/
|
|
24
24
|
readonly maxEntries?: number;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
* Show the log level label.
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
29
|
readonly showLevel?: boolean;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
* Show timestamps on each entry.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
34
|
readonly showTimestamp?: boolean;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* A dockable console overlay that captures and displays console output.
|
|
38
|
-
*
|
|
39
|
-
* ```tsx
|
|
40
|
-
* <Box flexDirection="column" height="100%">
|
|
41
|
-
* <Box flexGrow={1}>{mainContent}</Box>
|
|
42
|
-
* <ConsoleOverlay dock="bottom" height={6} />
|
|
43
|
-
* </Box>
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
declare function ConsoleOverlay({
|
|
47
|
-
dock,
|
|
48
|
-
filter,
|
|
49
|
-
height,
|
|
50
|
-
maxEntries,
|
|
51
|
-
showLevel,
|
|
52
|
-
showTimestamp
|
|
53
|
-
}: Props): ReactElement;
|
|
37
|
+
* A dockable console overlay that captures and displays console output.
|
|
38
|
+
*
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <Box flexDirection="column" height="100%">
|
|
41
|
+
* <Box flexGrow={1}>{mainContent}</Box>
|
|
42
|
+
* <ConsoleOverlay dock="bottom" height={6} />
|
|
43
|
+
* </Box>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function ConsoleOverlay({ dock, filter, height, maxEntries, showLevel, showTimestamp }: Props): ReactElement;
|
|
54
47
|
export { ConsoleOverlay, ConsoleOverlayDock, type Props as ConsoleOverlayProps, Props, ConsoleOverlay as default };
|
|
@@ -9,49 +9,41 @@ type ContentSwitcherOption = {
|
|
|
9
9
|
};
|
|
10
10
|
type Props = {
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
* Accent color for the selected segment.
|
|
13
|
+
* @default "blue"
|
|
14
|
+
*/
|
|
15
15
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Auto-focus the switcher on mount.
|
|
18
|
+
*/
|
|
19
19
|
readonly autoFocus?: boolean;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Initial selected id (uncontrolled).
|
|
22
|
+
*/
|
|
23
23
|
readonly defaultValue?: string;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Disable input.
|
|
26
|
+
*/
|
|
27
27
|
readonly isDisabled?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
* Called when the selection changes.
|
|
30
|
+
*/
|
|
31
31
|
readonly onChange?: (id: string) => void;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
* Segments to toggle between.
|
|
34
|
+
*/
|
|
35
35
|
readonly options: ReadonlyArray<ContentSwitcherOption>;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Controlled selected id.
|
|
38
|
+
*/
|
|
39
39
|
readonly value?: string;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* Segmented control that flips between mutually exclusive content. More
|
|
43
|
-
* compact than `Tabs`: the selected segment is highlighted as a pill, and
|
|
44
|
-
* only the active segment's content is rendered.
|
|
45
|
-
* @returns A `ReactElement` with a segmented header row and the active
|
|
46
|
-
* panel's content beneath it.
|
|
47
|
-
*/
|
|
48
|
-
declare function ContentSwitcher({
|
|
49
|
-
accentColor,
|
|
50
|
-
autoFocus,
|
|
51
|
-
defaultValue,
|
|
52
|
-
isDisabled,
|
|
53
|
-
onChange,
|
|
54
|
-
options,
|
|
55
|
-
value
|
|
56
|
-
}: Props): ReactElement;
|
|
42
|
+
* Segmented control that flips between mutually exclusive content. More
|
|
43
|
+
* compact than `Tabs`: the selected segment is highlighted as a pill, and
|
|
44
|
+
* only the active segment's content is rendered.
|
|
45
|
+
* @returns A `ReactElement` with a segmented header row and the active
|
|
46
|
+
* panel's content beneath it.
|
|
47
|
+
*/
|
|
48
|
+
declare function ContentSwitcher({ accentColor, autoFocus, defaultValue, isDisabled, onChange, options, value }: Props): ReactElement;
|
|
57
49
|
export { ContentSwitcher, ContentSwitcherOption, type Props as ContentSwitcherProps, Props, ContentSwitcher as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as ControlledScrollView, type a as ControlledScrollViewProps, type b as ControlledScrollViewRef } from "./packem_shared/controlled-scroll-view.d-
|
|
1
|
+
export { C as ControlledScrollView, type a as ControlledScrollViewProps, type b as ControlledScrollViewRef } from "./packem_shared/controlled-scroll-view.d-D3kZZzjI.js";
|
|
2
2
|
import '@visulima/tui/components/box';
|
|
3
3
|
import 'react';
|
package/dist/data-grid.d.ts
CHANGED
|
@@ -6,44 +6,38 @@ type DataGridColumn<Row> = {
|
|
|
6
6
|
readonly header: string;
|
|
7
7
|
readonly key: keyof Row & string;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Render a cell to a string. Defaults to `String(row[key])`.
|
|
10
|
+
*/
|
|
11
11
|
readonly render?: (row: Row) => string;
|
|
12
12
|
readonly width?: number;
|
|
13
13
|
};
|
|
14
14
|
type Props<Row extends Record<string, unknown>> = {
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Accent color for the cursor row and active sort column.
|
|
17
|
+
* @default "blue"
|
|
18
|
+
*/
|
|
19
19
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Auto-focus for keyboard navigation.
|
|
22
|
+
*/
|
|
23
23
|
readonly autoFocus?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Column definitions in display order.
|
|
26
|
+
*/
|
|
27
27
|
readonly columns: ReadonlyArray<DataGridColumn<Row>>;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
* The rows to display.
|
|
30
|
+
*/
|
|
31
31
|
readonly data: ReadonlyArray<Row>;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
* Fires with the row under the cursor when Enter is pressed.
|
|
34
|
+
*/
|
|
35
35
|
readonly onSelect?: (row: Row) => void;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
* A navigable, sortable table. ↑/↓ move the row cursor, ←/→ move the column
|
|
39
|
-
* cursor, `s` sorts by the cursor column (toggling direction), and Enter fires
|
|
40
|
-
* `onSelect` with the current row. Column widths default to the widest cell.
|
|
41
|
-
*/
|
|
42
|
-
declare function DataGrid<Row extends Record<string, unknown>>({
|
|
43
|
-
accentColor,
|
|
44
|
-
autoFocus,
|
|
45
|
-
columns,
|
|
46
|
-
data,
|
|
47
|
-
onSelect
|
|
48
|
-
}: Props<Row>): ReactElement;
|
|
38
|
+
* A navigable, sortable table. ↑/↓ move the row cursor, ←/→ move the column
|
|
39
|
+
* cursor, `s` sorts by the cursor column (toggling direction), and Enter fires
|
|
40
|
+
* `onSelect` with the current row. Column widths default to the widest cell.
|
|
41
|
+
*/
|
|
42
|
+
declare function DataGrid<Row extends Record<string, unknown>>({ accentColor, autoFocus, columns, data, onSelect }: Props<Row>): ReactElement;
|
|
49
43
|
export { DataGrid, DataGridColumn, type Props as DataGridProps, Props, DataGrid as default };
|
package/dist/date-picker.d.ts
CHANGED
|
@@ -3,63 +3,52 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Accent color used by the inner calendar when open.
|
|
7
|
+
* @default "blue"
|
|
8
|
+
*/
|
|
9
9
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* Auto-focus the picker on mount.
|
|
12
|
+
*/
|
|
13
13
|
readonly autoFocus?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* Initial selected date when uncontrolled.
|
|
16
|
+
*/
|
|
17
17
|
readonly defaultValue?: Date;
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
* Override the way the selected date is rendered in the input row.
|
|
20
|
+
*/
|
|
21
21
|
readonly formatValue?: (date: Date) => string;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
* Disable the picker.
|
|
24
|
+
*/
|
|
25
25
|
readonly isDisabled?: boolean;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
* Upper bound for selectable dates.
|
|
28
|
+
*/
|
|
29
29
|
readonly maxDate?: Date;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
* Lower bound for selectable dates.
|
|
32
|
+
*/
|
|
33
33
|
readonly minDate?: Date;
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
* Fired when the user commits a date with Enter.
|
|
36
|
+
*/
|
|
37
37
|
readonly onChange?: (date: Date) => void;
|
|
38
38
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
* Placeholder rendered when no date is selected.
|
|
40
|
+
* @default "Pick a date"
|
|
41
|
+
*/
|
|
42
42
|
readonly placeholder?: string;
|
|
43
43
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
* Controlled selected date.
|
|
45
|
+
*/
|
|
46
46
|
readonly value?: Date;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
|
-
* Compact date input. Shows the currently-selected date; Enter / Space opens
|
|
50
|
-
* the inline `Calendar` for navigation. Enter inside the calendar commits the
|
|
51
|
-
* date and closes the picker.
|
|
52
|
-
*/
|
|
53
|
-
declare function DatePicker({
|
|
54
|
-
accentColor,
|
|
55
|
-
autoFocus,
|
|
56
|
-
defaultValue,
|
|
57
|
-
formatValue,
|
|
58
|
-
isDisabled,
|
|
59
|
-
maxDate,
|
|
60
|
-
minDate,
|
|
61
|
-
onChange,
|
|
62
|
-
placeholder,
|
|
63
|
-
value
|
|
64
|
-
}: Props): ReactElement;
|
|
49
|
+
* Compact date input. Shows the currently-selected date; Enter / Space opens
|
|
50
|
+
* the inline `Calendar` for navigation. Enter inside the calendar commits the
|
|
51
|
+
* date and closes the picker.
|
|
52
|
+
*/
|
|
53
|
+
declare function DatePicker({ accentColor, autoFocus, defaultValue, formatValue, isDisabled, maxDate, minDate, onChange, placeholder, value }: Props): ReactElement;
|
|
65
54
|
export { DatePicker, type Props as DatePickerProps, Props, DatePicker as default };
|