@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
|
@@ -8,37 +8,31 @@ type DefinitionItem = {
|
|
|
8
8
|
};
|
|
9
9
|
type Props = {
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Spacing between term and description columns.
|
|
12
|
+
* @default 2
|
|
13
|
+
*/
|
|
14
14
|
readonly columnGap?: number;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* Entries to render.
|
|
17
|
+
*/
|
|
18
18
|
readonly items: ReadonlyArray<DefinitionItem>;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Inline items display on the same row; stacked items display with the term above the description.
|
|
21
|
+
* @default "inline"
|
|
22
|
+
*/
|
|
23
23
|
readonly layout?: "inline" | "stacked";
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* Color applied to the term.
|
|
26
|
+
* @default "cyan"
|
|
27
|
+
*/
|
|
28
28
|
readonly termColor?: LiteralUnion<AnsiColors, string>;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* Minimum width used to align inline terms.
|
|
31
|
+
*/
|
|
32
32
|
readonly termWidth?: number;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
|
-
* Key/value style definition list. Equivalent to the HTML `<dl>` element.
|
|
36
|
-
*/
|
|
37
|
-
declare function DefinitionList({
|
|
38
|
-
columnGap,
|
|
39
|
-
items,
|
|
40
|
-
layout,
|
|
41
|
-
termColor,
|
|
42
|
-
termWidth
|
|
43
|
-
}: Props): ReactElement;
|
|
35
|
+
* Key/value style definition list. Equivalent to the HTML `<dl>` element.
|
|
36
|
+
*/
|
|
37
|
+
declare function DefinitionList({ columnGap, items, layout, termColor, termWidth }: Props): ReactElement;
|
|
44
38
|
export { DefinitionItem, DefinitionList, type Props as DefinitionListProps, Props, DefinitionList as default };
|
package/dist/dialog.d.ts
CHANGED
|
@@ -1,110 +1,94 @@
|
|
|
1
1
|
import { ReactNode, ReactElement } from 'react';
|
|
2
2
|
import '@visulima/tui/components/box';
|
|
3
|
-
import { b as ScrollViewRef } from "./packem_shared/scroll-view.d-
|
|
3
|
+
import { b as ScrollViewRef } from "./packem_shared/scroll-view.d-GZcgAHl4.js";
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Background color for the dialog. Defaults to the detected terminal
|
|
7
|
+
* background color, falling back to `"black"`.
|
|
8
|
+
*/
|
|
9
9
|
readonly backgroundColor?: string;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Border color.
|
|
12
|
+
* @default "cyan"
|
|
13
|
+
*/
|
|
14
14
|
readonly borderColor?: string;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Border style.
|
|
17
|
+
* @default "round"
|
|
18
|
+
*/
|
|
19
19
|
readonly borderStyle?: "arrow" | "bold" | "classic" | "double" | "doubleSingle" | "round" | "single" | "singleDouble";
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Dialog content.
|
|
22
|
+
*/
|
|
23
23
|
readonly children: ReactNode;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* Override terminal columns. Useful in renderToString or testing contexts
|
|
26
|
+
* where useWindowSize is unavailable.
|
|
27
|
+
*/
|
|
28
28
|
readonly columns?: number;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
* Footer content rendered below the scrollable area.
|
|
31
|
+
* Useful for hints like "Press ? to close".
|
|
32
|
+
*/
|
|
33
33
|
readonly footer?: ReactNode;
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
* Maximum height as a fraction of terminal rows (0-1) or absolute rows.
|
|
36
|
+
* Values <= 1 are treated as fractions; values > 1 as absolute row counts.
|
|
37
|
+
* @default 0.8
|
|
38
|
+
*/
|
|
39
39
|
readonly maxHeight?: number;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
* Padding inside the dialog border.
|
|
42
|
+
* @default 2
|
|
43
|
+
*/
|
|
44
44
|
readonly paddingX?: number;
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
* Vertical padding inside the dialog border.
|
|
47
|
+
* @default 1
|
|
48
|
+
*/
|
|
49
49
|
readonly paddingY?: number;
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
* Override terminal rows. Useful in renderToString or testing contexts
|
|
52
|
+
* where useWindowSize is unavailable.
|
|
53
|
+
*/
|
|
54
54
|
readonly rows?: number;
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
* Scrollbar visual style.
|
|
57
|
+
* @default "block"
|
|
58
|
+
*/
|
|
59
59
|
readonly scrollbarStyle?: "arrow" | "block" | "bold" | "classic" | "dots" | "double" | "doubleSingle" | "line" | "round" | "single" | "singleDouble" | "thick";
|
|
60
60
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
* Ref to the internal ScrollView for programmatic scrolling.
|
|
62
|
+
*/
|
|
63
63
|
readonly scrollRef?: React.Ref<ScrollViewRef>;
|
|
64
64
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
* Title rendered at the top of the dialog. If a string is provided,
|
|
66
|
+
* it is rendered as bold cyan text.
|
|
67
|
+
*/
|
|
68
68
|
readonly title?: ReactNode;
|
|
69
69
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
* Whether the dialog is visible. When `false`, nothing is rendered.
|
|
71
|
+
* @default true
|
|
72
|
+
*/
|
|
73
73
|
readonly visible?: boolean;
|
|
74
74
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
* Dialog width in columns.
|
|
76
|
+
* @default 60
|
|
77
|
+
*/
|
|
78
78
|
readonly width?: number;
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
81
|
-
* A centered overlay dialog with automatic scrolling and scrollbar when
|
|
82
|
-
* content exceeds the available terminal height.
|
|
83
|
-
*
|
|
84
|
-
* Uses the terminal's detected background color by default so the
|
|
85
|
-
* dialog blends with the user's theme.
|
|
86
|
-
*
|
|
87
|
-
* ```tsx
|
|
88
|
-
* <Dialog title="Help" footer={<Text dimColor>Press Esc to close</Text>}>
|
|
89
|
-
* <Text>Dialog content here</Text>
|
|
90
|
-
* </Dialog>
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
declare const Dialog: ({
|
|
94
|
-
backgroundColor: backgroundColorProp,
|
|
95
|
-
borderColor,
|
|
96
|
-
borderStyle,
|
|
97
|
-
children,
|
|
98
|
-
columns: columnsProp,
|
|
99
|
-
footer,
|
|
100
|
-
maxHeight: maxHeightProp,
|
|
101
|
-
paddingX,
|
|
102
|
-
paddingY,
|
|
103
|
-
rows: rowsProp,
|
|
104
|
-
scrollbarStyle: scrollbarStyleProp,
|
|
105
|
-
scrollRef: externalScrollRef,
|
|
106
|
-
title,
|
|
107
|
-
visible,
|
|
108
|
-
width
|
|
109
|
-
}: Props) => ReactElement | null;
|
|
81
|
+
* A centered overlay dialog with automatic scrolling and scrollbar when
|
|
82
|
+
* content exceeds the available terminal height.
|
|
83
|
+
*
|
|
84
|
+
* Uses the terminal's detected background color by default so the
|
|
85
|
+
* dialog blends with the user's theme.
|
|
86
|
+
*
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <Dialog title="Help" footer={<Text dimColor>Press Esc to close</Text>}>
|
|
89
|
+
* <Text>Dialog content here</Text>
|
|
90
|
+
* </Dialog>
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
declare const Dialog: ({ backgroundColor: backgroundColorProp, borderColor, borderStyle, children, columns: columnsProp, footer, maxHeight: maxHeightProp, paddingX, paddingY, rows: rowsProp, scrollbarStyle: scrollbarStyleProp, scrollRef: externalScrollRef, title, visible, width }: Props) => ReactElement | null;
|
|
110
94
|
export { Dialog, type Props as DialogProps, Props, Dialog as default };
|
package/dist/diff-view.d.ts
CHANGED
|
@@ -3,83 +3,70 @@ type DiffViewMode = "split" | "unified";
|
|
|
3
3
|
type InlineDiffMode = "chars" | "words";
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Number of unchanged context lines around changes.
|
|
7
|
+
* @default 3
|
|
8
|
+
*/
|
|
9
9
|
readonly context?: number;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* Pre-computed unified diff string. If provided, `oldText`/`newText` are ignored.
|
|
12
|
+
*/
|
|
13
13
|
readonly diff?: string;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
* Enable character-level inline diff highlighting within changed lines.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
18
|
readonly inlineDiff?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
* Granularity of inline diff highlighting.
|
|
21
|
+
* - `"chars"` — character-level (best for code)
|
|
22
|
+
* - `"words"` — word-level (best for prose)
|
|
23
|
+
* @default "chars"
|
|
24
|
+
*/
|
|
25
25
|
readonly inlineDiffMode?: InlineDiffMode;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* Programming language for syntax highlighting within diff lines.
|
|
28
|
+
* When provided, diff content is highlighted with Shiki.
|
|
29
|
+
*/
|
|
30
30
|
readonly language?: string;
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
* Display mode: unified (interleaved) or split (side-by-side).
|
|
33
|
+
* @default "unified"
|
|
34
|
+
*/
|
|
35
35
|
readonly mode?: DiffViewMode;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Label for the new version.
|
|
38
|
+
*/
|
|
39
39
|
readonly newLabel?: string;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
* Modified text ("new" / right side).
|
|
42
|
+
*/
|
|
43
43
|
readonly newText?: string;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
* Label for the old version.
|
|
46
|
+
*/
|
|
47
47
|
readonly oldLabel?: string;
|
|
48
48
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
* Original text ("old" / left side).
|
|
50
|
+
*/
|
|
51
51
|
readonly oldText?: string;
|
|
52
52
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
* Whether to display line numbers.
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
56
|
readonly showLineNumbers?: boolean;
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
* Shiki theme for syntax highlighting.
|
|
59
|
+
* @default "github-dark-default"
|
|
60
|
+
*/
|
|
61
61
|
readonly theme?: string;
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
|
-
* Display file differences with colored additions/deletions.
|
|
65
|
-
*
|
|
66
|
-
* ```tsx
|
|
67
|
-
* <DiffView oldText="hello" newText="hello world" />
|
|
68
|
-
* <DiffView diff={unifiedDiffString} mode="split" />
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
declare function DiffView({
|
|
72
|
-
context,
|
|
73
|
-
diff: diffProp,
|
|
74
|
-
inlineDiff,
|
|
75
|
-
inlineDiffMode,
|
|
76
|
-
language,
|
|
77
|
-
mode,
|
|
78
|
-
newLabel,
|
|
79
|
-
newText,
|
|
80
|
-
oldLabel,
|
|
81
|
-
oldText,
|
|
82
|
-
showLineNumbers,
|
|
83
|
-
theme
|
|
84
|
-
}: Props): ReactElement;
|
|
64
|
+
* Display file differences with colored additions/deletions.
|
|
65
|
+
*
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <DiffView oldText="hello" newText="hello world" />
|
|
68
|
+
* <DiffView diff={unifiedDiffString} mode="split" />
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
declare function DiffView({ context, diff: diffProp, inlineDiff, inlineDiffMode, language, mode, newLabel, newText, oldLabel, oldText, showLineNumbers, theme }: Props): ReactElement;
|
|
85
72
|
export { DiffView, DiffViewMode, type Props as DiffViewProps, InlineDiffMode, Props, DiffView as default };
|
package/dist/digits.d.ts
CHANGED
|
@@ -3,28 +3,24 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Color of the digits.
|
|
7
|
+
* @default "cyan"
|
|
8
|
+
*/
|
|
9
9
|
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Number of spaces between glyphs.
|
|
12
|
+
* @default 1
|
|
13
|
+
*/
|
|
14
14
|
readonly gap?: number;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* The value to render. Numbers are stringified; unsupported characters
|
|
17
|
+
* render as `?`.
|
|
18
|
+
*/
|
|
19
19
|
readonly value: number | string;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* A large seven-segment-style numeric readout. Supports digits, space, minus,
|
|
23
|
-
* dot and colon — enough for counters, clocks and timers.
|
|
24
|
-
*/
|
|
25
|
-
declare function Digits({
|
|
26
|
-
color,
|
|
27
|
-
gap,
|
|
28
|
-
value
|
|
29
|
-
}: Props): ReactElement;
|
|
22
|
+
* A large seven-segment-style numeric readout. Supports digits, space, minus,
|
|
23
|
+
* dot and colon — enough for counters, clocks and timers.
|
|
24
|
+
*/
|
|
25
|
+
declare function Digits({ color, gap, value }: Props): ReactElement;
|
|
30
26
|
export { Digits, type Props as DigitsProps, Props, Digits as default };
|
package/dist/directory-tree.d.ts
CHANGED
|
@@ -8,44 +8,37 @@ type DirectoryNode = {
|
|
|
8
8
|
};
|
|
9
9
|
type Props = {
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Accent color for the focused row.
|
|
12
|
+
* @default "blue"
|
|
13
|
+
*/
|
|
14
14
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* Auto-focus for keyboard navigation.
|
|
17
|
+
*/
|
|
18
18
|
readonly autoFocus?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Start with every directory expanded.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
23
|
readonly defaultExpanded?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* Color used for directory names.
|
|
26
|
+
* @default "cyan"
|
|
27
|
+
*/
|
|
28
28
|
readonly directoryColor?: LiteralUnion<AnsiColors, string>;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* The tree to render.
|
|
31
|
+
*/
|
|
32
32
|
readonly nodes: ReadonlyArray<DirectoryNode>;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
* Fires with the path segments when Enter is pressed on a file.
|
|
35
|
+
*/
|
|
36
36
|
readonly onSelect?: (path: ReadonlyArray<string>) => void;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
|
-
* A read-only filesystem tree. Directories show a ▸/▾ toggle and a folder
|
|
40
|
-
* glyph; files show a document glyph. Arrow keys navigate, →/← and Space
|
|
41
|
-
* expand/collapse directories, and Enter fires `onSelect` with a file's path.
|
|
42
|
-
*/
|
|
43
|
-
declare function DirectoryTree({
|
|
44
|
-
accentColor,
|
|
45
|
-
autoFocus,
|
|
46
|
-
defaultExpanded,
|
|
47
|
-
directoryColor,
|
|
48
|
-
nodes,
|
|
49
|
-
onSelect
|
|
50
|
-
}: Props): ReactElement;
|
|
39
|
+
* A read-only filesystem tree. Directories show a ▸/▾ toggle and a folder
|
|
40
|
+
* glyph; files show a document glyph. Arrow keys navigate, →/← and Space
|
|
41
|
+
* expand/collapse directories, and Enter fires `onSelect` with a file's path.
|
|
42
|
+
*/
|
|
43
|
+
declare function DirectoryTree({ accentColor, autoFocus, defaultExpanded, directoryColor, nodes, onSelect }: Props): ReactElement;
|
|
51
44
|
export { DirectoryNode, DirectoryTree, type Props as DirectoryTreeProps, Props, DirectoryTree as default };
|
package/dist/divider.d.ts
CHANGED
|
@@ -3,47 +3,39 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Custom character to use instead of the default line character.
|
|
7
|
+
*/
|
|
8
8
|
readonly character?: string;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* Color of the divider line.
|
|
11
|
+
*/
|
|
12
12
|
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Render the divider with dim color.
|
|
15
|
+
*/
|
|
16
16
|
readonly dimColor?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* Optional label rendered in the middle of a horizontal divider.
|
|
19
|
+
*/
|
|
20
20
|
readonly label?: string;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
* Padding around the label.
|
|
23
|
+
* @default 1
|
|
24
|
+
*/
|
|
25
25
|
readonly labelPadding?: number;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* Total length of the divider. When omitted, horizontal dividers stretch to
|
|
28
|
+
* fill the available space and vertical dividers default to one row.
|
|
29
|
+
*/
|
|
30
30
|
readonly length?: number;
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
* Orientation of the divider.
|
|
33
|
+
* @default "horizontal"
|
|
34
|
+
*/
|
|
35
35
|
readonly orientation?: "horizontal" | "vertical";
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
* Horizontal or vertical divider line, optionally with a centered label.
|
|
39
|
-
*/
|
|
40
|
-
declare function Divider({
|
|
41
|
-
character,
|
|
42
|
-
color,
|
|
43
|
-
dimColor,
|
|
44
|
-
label,
|
|
45
|
-
labelPadding,
|
|
46
|
-
length,
|
|
47
|
-
orientation
|
|
48
|
-
}: Props): ReactElement;
|
|
38
|
+
* Horizontal or vertical divider line, optionally with a centered label.
|
|
39
|
+
*/
|
|
40
|
+
declare function Divider({ character, color, dimColor, label, labelPadding, length, orientation }: Props): ReactElement;
|
|
49
41
|
export { Divider, type Props as DividerProps, Props, Divider as default };
|
package/dist/drawer.d.ts
CHANGED
|
@@ -3,51 +3,43 @@ import { ReactNode, ReactElement } from 'react';
|
|
|
3
3
|
import { LiteralUnion } from 'type-fest';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* Accent color for the border and title.
|
|
7
|
+
* @default "blue"
|
|
8
|
+
*/
|
|
9
9
|
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* Drawer body.
|
|
12
|
+
*/
|
|
13
13
|
readonly children: ReactNode;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* Whether the drawer is open. When false, nothing is rendered.
|
|
16
|
+
*/
|
|
17
17
|
readonly isOpen: boolean;
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
* Fires when Escape is pressed while open.
|
|
20
|
+
*/
|
|
21
21
|
readonly onClose?: () => void;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
* Edge the drawer is anchored to. Left/right drawers take a fixed `size`
|
|
24
|
+
* as width; top/bottom take it as height.
|
|
25
|
+
* @default "right"
|
|
26
|
+
*/
|
|
27
27
|
readonly side?: "bottom" | "left" | "right" | "top";
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
* Fixed extent (width for left/right, height for top/bottom) in cells.
|
|
30
|
+
* @default 32
|
|
31
|
+
*/
|
|
32
32
|
readonly size?: number;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
* Optional title shown in the drawer header.
|
|
35
|
+
*/
|
|
36
36
|
readonly title?: string;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
|
-
* A slide-over panel anchored to a terminal edge. Rendered as a bordered box
|
|
40
|
-
* sized along one axis; Escape fires `onClose`, and nothing renders while
|
|
41
|
-
* closed. Terminals have no true overlay layer, so place the drawer where it
|
|
42
|
-
* should appear in your layout.
|
|
43
|
-
*/
|
|
44
|
-
declare function Drawer({
|
|
45
|
-
accentColor,
|
|
46
|
-
children,
|
|
47
|
-
isOpen,
|
|
48
|
-
onClose,
|
|
49
|
-
side,
|
|
50
|
-
size,
|
|
51
|
-
title
|
|
52
|
-
}: Props): ReactElement | null;
|
|
39
|
+
* A slide-over panel anchored to a terminal edge. Rendered as a bordered box
|
|
40
|
+
* sized along one axis; Escape fires `onClose`, and nothing renders while
|
|
41
|
+
* closed. Terminals have no true overlay layer, so place the drawer where it
|
|
42
|
+
* should appear in your layout.
|
|
43
|
+
*/
|
|
44
|
+
declare function Drawer({ accentColor, children, isOpen, onClose, side, size, title }: Props): ReactElement | null;
|
|
53
45
|
export { Drawer, type Props as DrawerProps, Props, Drawer as default };
|
package/dist/file-change.d.ts
CHANGED
|
@@ -2,39 +2,33 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
type FileChangeStatus = "added" | "deleted" | "modified" | "renamed";
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
* Number of added lines.
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
8
8
|
readonly additions?: number;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
* Total width of the +/- change bar in cells.
|
|
11
|
+
* @default 10
|
|
12
|
+
*/
|
|
13
13
|
readonly barWidth?: number;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
* Number of removed lines.
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
18
|
readonly deletions?: number;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
* The file path.
|
|
21
|
+
*/
|
|
22
22
|
readonly path: string;
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
* Change status, shown as a colored one-letter badge.
|
|
25
|
+
* @default "modified"
|
|
26
|
+
*/
|
|
27
27
|
readonly status?: FileChangeStatus;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* A single git-style diff-stat row: a status badge, the path, the numeric
|
|
31
|
-
* add/remove counts, and a proportional ▰/▱ change bar.
|
|
32
|
-
*/
|
|
33
|
-
declare function FileChange({
|
|
34
|
-
additions,
|
|
35
|
-
barWidth,
|
|
36
|
-
deletions,
|
|
37
|
-
path,
|
|
38
|
-
status
|
|
39
|
-
}: Props): ReactElement;
|
|
30
|
+
* A single git-style diff-stat row: a status badge, the path, the numeric
|
|
31
|
+
* add/remove counts, and a proportional ▰/▱ change bar.
|
|
32
|
+
*/
|
|
33
|
+
declare function FileChange({ additions, barWidth, deletions, path, status }: Props): ReactElement;
|
|
40
34
|
export { FileChange, type Props as FileChangeProps, FileChangeStatus, Props, FileChange as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type F as FileEntry, a as FilePicker, type b as FilePickerFilter, type P as FilePickerProps, a as default } from "./packem_shared/file-picker.d-
|
|
1
|
+
export { type F as FileEntry, a as FilePicker, type b as FilePickerFilter, type P as FilePickerProps, a as default } from "./packem_shared/file-picker.d-CH7pccC7.js";
|
|
2
2
|
import 'react';
|