@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.
Files changed (123) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/accordion.d.ts +25 -32
  3. package/dist/alert.d.ts +9 -13
  4. package/dist/animate-presence.d.ts +9 -11
  5. package/dist/approval-prompt.d.ts +28 -38
  6. package/dist/area-chart.d.ts +29 -39
  7. package/dist/badge.d.ts +8 -11
  8. package/dist/bar-chart.d.ts +29 -38
  9. package/dist/big-text.d.ts +42 -52
  10. package/dist/blink-dot.d.ts +16 -21
  11. package/dist/breadcrumb.d.ts +11 -15
  12. package/dist/button.d.ts +18 -25
  13. package/dist/calendar.d.ts +31 -43
  14. package/dist/card.d.ts +22 -32
  15. package/dist/checkbox-group.d.ts +21 -30
  16. package/dist/checkbox.d.ts +19 -27
  17. package/dist/code.d.ts +24 -31
  18. package/dist/collapsible.d.ts +21 -30
  19. package/dist/color-picker.d.ts +29 -41
  20. package/dist/command-block.d.ts +19 -27
  21. package/dist/command-palette.d.ts +36 -45
  22. package/dist/confirm-dialog.d.ts +35 -47
  23. package/dist/confirm-input.d.ts +17 -23
  24. package/dist/console-overlay.d.ts +28 -35
  25. package/dist/content-switcher.d.ts +22 -30
  26. package/dist/controlled-scroll-view.d.ts +1 -1
  27. package/dist/data-grid.d.ts +18 -24
  28. package/dist/date-picker.d.ts +27 -38
  29. package/dist/definition-list.d.ts +16 -22
  30. package/dist/dialog.d.ts +58 -74
  31. package/dist/diff-view.d.ts +41 -54
  32. package/dist/digits.d.ts +13 -17
  33. package/dist/directory-tree.d.ts +20 -27
  34. package/dist/divider.d.ts +20 -28
  35. package/dist/drawer.d.ts +24 -32
  36. package/dist/file-change.d.ts +18 -24
  37. package/dist/file-picker-entry.d.ts +1 -1
  38. package/dist/form.d.ts +34 -41
  39. package/dist/gauge.d.ts +40 -51
  40. package/dist/gradient.d.ts +21 -25
  41. package/dist/grid.d.ts +19 -25
  42. package/dist/heading.d.ts +12 -17
  43. package/dist/heatmap.d.ts +27 -37
  44. package/dist/help.d.ts +27 -34
  45. package/dist/histogram.d.ts +27 -37
  46. package/dist/image.d.ts +11 -14
  47. package/dist/index.d.ts +6 -6
  48. package/dist/json.d.ts +23 -30
  49. package/dist/kbd.d.ts +14 -18
  50. package/dist/line-chart.d.ts +40 -49
  51. package/dist/link.d.ts +24 -28
  52. package/dist/loading-indicator.d.ts +11 -15
  53. package/dist/log.d.ts +14 -19
  54. package/dist/markdown.d.ts +22 -27
  55. package/dist/masked-input.d.ts +23 -31
  56. package/dist/menu.d.ts +32 -40
  57. package/dist/message-bubble.d.ts +16 -23
  58. package/dist/model-badge.d.ts +16 -22
  59. package/dist/model-selector.d.ts +19 -26
  60. package/dist/multi-progress.d.ts +22 -29
  61. package/dist/multi-select.d.ts +25 -35
  62. package/dist/notification-badge.d.ts +21 -28
  63. package/dist/number-input.d.ts +38 -52
  64. package/dist/operation-tree.d.ts +22 -25
  65. package/dist/option-list.d.ts +17 -23
  66. package/dist/ordered-list.d.ts +9 -11
  67. package/dist/packem_shared/{controlled-scroll-view.d-vF4wevEJ.d.ts → controlled-scroll-view.d-D3kZZzjI.d.ts} +8 -19
  68. package/dist/packem_shared/file-picker.d-CH7pccC7.d.ts +92 -0
  69. package/dist/packem_shared/{scroll-bar-box.d-DSBbBsRc.d.ts → scroll-bar-box.d-CpTYEcTZ.d.ts} +1 -18
  70. package/dist/packem_shared/{scroll-list.d-BP0UZSY4.d.ts → scroll-list.d-CPCF0RwC.d.ts} +1 -1
  71. package/dist/packem_shared/scroll-view.d-GZcgAHl4.d.ts +98 -0
  72. package/dist/packem_shared/{use-tree-view.d-dXTKoDPM.d.ts → use-tree-view.d-DeMQ6G2r.d.ts} +115 -151
  73. package/dist/paginator.d.ts +28 -38
  74. package/dist/paragraph.d.ts +15 -21
  75. package/dist/path-input.d.ts +29 -40
  76. package/dist/pie-chart.d.ts +21 -27
  77. package/dist/placeholder.d.ts +26 -34
  78. package/dist/popover.d.ts +20 -27
  79. package/dist/progress-bar.d.ts +25 -33
  80. package/dist/progress-circle.d.ts +27 -36
  81. package/dist/qr-code.d.ts +21 -27
  82. package/dist/radio-group.d.ts +30 -41
  83. package/dist/scatter-plot.d.ts +5 -16
  84. package/dist/scroll-bar-box.d.ts +1 -1
  85. package/dist/scroll-list.d.ts +2 -2
  86. package/dist/scroll-view.d.ts +1 -1
  87. package/dist/search-input.d.ts +23 -32
  88. package/dist/select-input-indicator.d.ts +15 -19
  89. package/dist/select-input-item.d.ts +18 -24
  90. package/dist/select-input.d.ts +49 -62
  91. package/dist/shimmer-text.d.ts +24 -30
  92. package/dist/sidebar.d.ts +21 -28
  93. package/dist/slider.d.ts +50 -66
  94. package/dist/sparkline.d.ts +19 -25
  95. package/dist/spinner.d.ts +7 -9
  96. package/dist/status-line.d.ts +14 -20
  97. package/dist/status-message.d.ts +7 -10
  98. package/dist/stepper.d.ts +18 -24
  99. package/dist/stopwatch.d.ts +24 -31
  100. package/dist/streaming-text.d.ts +20 -27
  101. package/dist/switch.d.ts +23 -32
  102. package/dist/tab.d.ts +8 -10
  103. package/dist/table.d.ts +40 -41
  104. package/dist/tabs.d.ts +50 -61
  105. package/dist/tag-input.d.ts +30 -42
  106. package/dist/tag.d.ts +14 -19
  107. package/dist/text-input.d.ts +21 -29
  108. package/dist/textarea.d.ts +32 -43
  109. package/dist/thinking-block.d.ts +25 -34
  110. package/dist/time-picker.d.ts +27 -37
  111. package/dist/timer.d.ts +28 -37
  112. package/dist/toast.d.ts +20 -28
  113. package/dist/token-usage.d.ts +23 -30
  114. package/dist/tool-call.d.ts +14 -19
  115. package/dist/tooltip.d.ts +19 -25
  116. package/dist/transition.d.ts +40 -48
  117. package/dist/tree-select.d.ts +25 -35
  118. package/dist/tree-view-entry.d.ts +1 -1
  119. package/dist/unordered-list.d.ts +12 -15
  120. package/dist/use-linked-scroll.d.ts +27 -27
  121. package/package.json +6 -6
  122. package/dist/packem_shared/file-picker.d-Cie6aAMD.d.ts +0 -104
  123. 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
- * Spacing between term and description columns.
12
- * @default 2
13
- */
11
+ * Spacing between term and description columns.
12
+ * @default 2
13
+ */
14
14
  readonly columnGap?: number;
15
15
  /**
16
- * Entries to render.
17
- */
16
+ * Entries to render.
17
+ */
18
18
  readonly items: ReadonlyArray<DefinitionItem>;
19
19
  /**
20
- * Inline items display on the same row; stacked items display with the term above the description.
21
- * @default "inline"
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
- * Color applied to the term.
26
- * @default "cyan"
27
- */
25
+ * Color applied to the term.
26
+ * @default "cyan"
27
+ */
28
28
  readonly termColor?: LiteralUnion<AnsiColors, string>;
29
29
  /**
30
- * Minimum width used to align inline terms.
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 `&lt;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 `&lt;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-BqKpI-F-.js";
3
+ import { b as ScrollViewRef } from "./packem_shared/scroll-view.d-GZcgAHl4.js";
4
4
  type Props = {
5
5
  /**
6
- * Background color for the dialog. Defaults to the detected terminal
7
- * background color, falling back to `"black"`.
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
- * Border color.
12
- * @default "cyan"
13
- */
11
+ * Border color.
12
+ * @default "cyan"
13
+ */
14
14
  readonly borderColor?: string;
15
15
  /**
16
- * Border style.
17
- * @default "round"
18
- */
16
+ * Border style.
17
+ * @default "round"
18
+ */
19
19
  readonly borderStyle?: "arrow" | "bold" | "classic" | "double" | "doubleSingle" | "round" | "single" | "singleDouble";
20
20
  /**
21
- * Dialog content.
22
- */
21
+ * Dialog content.
22
+ */
23
23
  readonly children: ReactNode;
24
24
  /**
25
- * Override terminal columns. Useful in renderToString or testing contexts
26
- * where useWindowSize is unavailable.
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
- * Footer content rendered below the scrollable area.
31
- * Useful for hints like "Press ? to close".
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
- * Maximum height as a fraction of terminal rows (0-1) or absolute rows.
36
- * Values &lt;= 1 are treated as fractions; values > 1 as absolute row counts.
37
- * @default 0.8
38
- */
35
+ * Maximum height as a fraction of terminal rows (0-1) or absolute rows.
36
+ * Values &lt;= 1 are treated as fractions; values > 1 as absolute row counts.
37
+ * @default 0.8
38
+ */
39
39
  readonly maxHeight?: number;
40
40
  /**
41
- * Padding inside the dialog border.
42
- * @default 2
43
- */
41
+ * Padding inside the dialog border.
42
+ * @default 2
43
+ */
44
44
  readonly paddingX?: number;
45
45
  /**
46
- * Vertical padding inside the dialog border.
47
- * @default 1
48
- */
46
+ * Vertical padding inside the dialog border.
47
+ * @default 1
48
+ */
49
49
  readonly paddingY?: number;
50
50
  /**
51
- * Override terminal rows. Useful in renderToString or testing contexts
52
- * where useWindowSize is unavailable.
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
- * Scrollbar visual style.
57
- * @default "block"
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
- * Ref to the internal ScrollView for programmatic scrolling.
62
- */
61
+ * Ref to the internal ScrollView for programmatic scrolling.
62
+ */
63
63
  readonly scrollRef?: React.Ref<ScrollViewRef>;
64
64
  /**
65
- * Title rendered at the top of the dialog. If a string is provided,
66
- * it is rendered as bold cyan text.
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
- * Whether the dialog is visible. When `false`, nothing is rendered.
71
- * @default true
72
- */
70
+ * Whether the dialog is visible. When `false`, nothing is rendered.
71
+ * @default true
72
+ */
73
73
  readonly visible?: boolean;
74
74
  /**
75
- * Dialog width in columns.
76
- * @default 60
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
- * &lt;Dialog title="Help" footer={&lt;Text dimColor>Press Esc to close&lt;/Text>}>
89
- * &lt;Text>Dialog content here&lt;/Text>
90
- * &lt;/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
+ * &lt;Dialog title="Help" footer={&lt;Text dimColor>Press Esc to close&lt;/Text>}>
89
+ * &lt;Text>Dialog content here&lt;/Text>
90
+ * &lt;/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 };
@@ -3,83 +3,70 @@ type DiffViewMode = "split" | "unified";
3
3
  type InlineDiffMode = "chars" | "words";
4
4
  type Props = {
5
5
  /**
6
- * Number of unchanged context lines around changes.
7
- * @default 3
8
- */
6
+ * Number of unchanged context lines around changes.
7
+ * @default 3
8
+ */
9
9
  readonly context?: number;
10
10
  /**
11
- * Pre-computed unified diff string. If provided, `oldText`/`newText` are ignored.
12
- */
11
+ * Pre-computed unified diff string. If provided, `oldText`/`newText` are ignored.
12
+ */
13
13
  readonly diff?: string;
14
14
  /**
15
- * Enable character-level inline diff highlighting within changed lines.
16
- * @default true
17
- */
15
+ * Enable character-level inline diff highlighting within changed lines.
16
+ * @default true
17
+ */
18
18
  readonly inlineDiff?: boolean;
19
19
  /**
20
- * Granularity of inline diff highlighting.
21
- * - `"chars"` — character-level (best for code)
22
- * - `"words"` — word-level (best for prose)
23
- * @default "chars"
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
- * Programming language for syntax highlighting within diff lines.
28
- * When provided, diff content is highlighted with Shiki.
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
- * Display mode: unified (interleaved) or split (side-by-side).
33
- * @default "unified"
34
- */
32
+ * Display mode: unified (interleaved) or split (side-by-side).
33
+ * @default "unified"
34
+ */
35
35
  readonly mode?: DiffViewMode;
36
36
  /**
37
- * Label for the new version.
38
- */
37
+ * Label for the new version.
38
+ */
39
39
  readonly newLabel?: string;
40
40
  /**
41
- * Modified text ("new" / right side).
42
- */
41
+ * Modified text ("new" / right side).
42
+ */
43
43
  readonly newText?: string;
44
44
  /**
45
- * Label for the old version.
46
- */
45
+ * Label for the old version.
46
+ */
47
47
  readonly oldLabel?: string;
48
48
  /**
49
- * Original text ("old" / left side).
50
- */
49
+ * Original text ("old" / left side).
50
+ */
51
51
  readonly oldText?: string;
52
52
  /**
53
- * Whether to display line numbers.
54
- * @default true
55
- */
53
+ * Whether to display line numbers.
54
+ * @default true
55
+ */
56
56
  readonly showLineNumbers?: boolean;
57
57
  /**
58
- * Shiki theme for syntax highlighting.
59
- * @default "github-dark-default"
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
- * &lt;DiffView oldText="hello" newText="hello world" />
68
- * &lt;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
+ * &lt;DiffView oldText="hello" newText="hello world" />
68
+ * &lt;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
- * Color of the digits.
7
- * @default "cyan"
8
- */
6
+ * Color of the digits.
7
+ * @default "cyan"
8
+ */
9
9
  readonly color?: LiteralUnion<AnsiColors, string>;
10
10
  /**
11
- * Number of spaces between glyphs.
12
- * @default 1
13
- */
11
+ * Number of spaces between glyphs.
12
+ * @default 1
13
+ */
14
14
  readonly gap?: number;
15
15
  /**
16
- * The value to render. Numbers are stringified; unsupported characters
17
- * render as `?`.
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 };
@@ -8,44 +8,37 @@ type DirectoryNode = {
8
8
  };
9
9
  type Props = {
10
10
  /**
11
- * Accent color for the focused row.
12
- * @default "blue"
13
- */
11
+ * Accent color for the focused row.
12
+ * @default "blue"
13
+ */
14
14
  readonly accentColor?: LiteralUnion<AnsiColors, string>;
15
15
  /**
16
- * Auto-focus for keyboard navigation.
17
- */
16
+ * Auto-focus for keyboard navigation.
17
+ */
18
18
  readonly autoFocus?: boolean;
19
19
  /**
20
- * Start with every directory expanded.
21
- * @default false
22
- */
20
+ * Start with every directory expanded.
21
+ * @default false
22
+ */
23
23
  readonly defaultExpanded?: boolean;
24
24
  /**
25
- * Color used for directory names.
26
- * @default "cyan"
27
- */
25
+ * Color used for directory names.
26
+ * @default "cyan"
27
+ */
28
28
  readonly directoryColor?: LiteralUnion<AnsiColors, string>;
29
29
  /**
30
- * The tree to render.
31
- */
30
+ * The tree to render.
31
+ */
32
32
  readonly nodes: ReadonlyArray<DirectoryNode>;
33
33
  /**
34
- * Fires with the path segments when Enter is pressed on a file.
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
- * Custom character to use instead of the default line character.
7
- */
6
+ * Custom character to use instead of the default line character.
7
+ */
8
8
  readonly character?: string;
9
9
  /**
10
- * Color of the divider line.
11
- */
10
+ * Color of the divider line.
11
+ */
12
12
  readonly color?: LiteralUnion<AnsiColors, string>;
13
13
  /**
14
- * Render the divider with dim color.
15
- */
14
+ * Render the divider with dim color.
15
+ */
16
16
  readonly dimColor?: boolean;
17
17
  /**
18
- * Optional label rendered in the middle of a horizontal divider.
19
- */
18
+ * Optional label rendered in the middle of a horizontal divider.
19
+ */
20
20
  readonly label?: string;
21
21
  /**
22
- * Padding around the label.
23
- * @default 1
24
- */
22
+ * Padding around the label.
23
+ * @default 1
24
+ */
25
25
  readonly labelPadding?: number;
26
26
  /**
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
- */
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
- * Orientation of the divider.
33
- * @default "horizontal"
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
- * Accent color for the border and title.
7
- * @default "blue"
8
- */
6
+ * Accent color for the border and title.
7
+ * @default "blue"
8
+ */
9
9
  readonly accentColor?: LiteralUnion<AnsiColors, string>;
10
10
  /**
11
- * Drawer body.
12
- */
11
+ * Drawer body.
12
+ */
13
13
  readonly children: ReactNode;
14
14
  /**
15
- * Whether the drawer is open. When false, nothing is rendered.
16
- */
15
+ * Whether the drawer is open. When false, nothing is rendered.
16
+ */
17
17
  readonly isOpen: boolean;
18
18
  /**
19
- * Fires when Escape is pressed while open.
20
- */
19
+ * Fires when Escape is pressed while open.
20
+ */
21
21
  readonly onClose?: () => void;
22
22
  /**
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
- */
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
- * Fixed extent (width for left/right, height for top/bottom) in cells.
30
- * @default 32
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
- * Optional title shown in the drawer header.
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 };
@@ -2,39 +2,33 @@ import { ReactElement } from 'react';
2
2
  type FileChangeStatus = "added" | "deleted" | "modified" | "renamed";
3
3
  type Props = {
4
4
  /**
5
- * Number of added lines.
6
- * @default 0
7
- */
5
+ * Number of added lines.
6
+ * @default 0
7
+ */
8
8
  readonly additions?: number;
9
9
  /**
10
- * Total width of the +/- change bar in cells.
11
- * @default 10
12
- */
10
+ * Total width of the +/- change bar in cells.
11
+ * @default 10
12
+ */
13
13
  readonly barWidth?: number;
14
14
  /**
15
- * Number of removed lines.
16
- * @default 0
17
- */
15
+ * Number of removed lines.
16
+ * @default 0
17
+ */
18
18
  readonly deletions?: number;
19
19
  /**
20
- * The file path.
21
- */
20
+ * The file path.
21
+ */
22
22
  readonly path: string;
23
23
  /**
24
- * Change status, shown as a colored one-letter badge.
25
- * @default "modified"
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-Cie6aAMD.js";
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';