@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.
Files changed (123) hide show
  1. package/CHANGELOG.md +7 -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 +2 -2
  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
package/dist/menu.d.ts CHANGED
@@ -3,24 +3,24 @@ import { ReactNode, ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type MenuItem = {
5
5
  /**
6
- * Optional hotkey rendered on the right side of the row (e.g. `"Ctrl+S"`).
7
- */
6
+ * Optional hotkey rendered on the right side of the row (e.g. `"Ctrl+S"`).
7
+ */
8
8
  readonly hotkey?: string;
9
9
  /**
10
- * Optional icon rendered before the label.
11
- */
10
+ * Optional icon rendered before the label.
11
+ */
12
12
  readonly icon?: ReactNode;
13
13
  /**
14
- * Identifier returned by `onSelect`.
15
- */
14
+ * Identifier returned by `onSelect`.
15
+ */
16
16
  readonly id: string;
17
17
  /**
18
- * When true, renders the item dimmed and skips it during navigation.
19
- */
18
+ * When true, renders the item dimmed and skips it during navigation.
19
+ */
20
20
  readonly isDisabled?: boolean;
21
21
  /**
22
- * Human-readable label.
23
- */
22
+ * Human-readable label.
23
+ */
24
24
  readonly label: ReactNode;
25
25
  };
26
26
  type MenuSection = {
@@ -30,49 +30,41 @@ type MenuSection = {
30
30
  };
31
31
  type Props = {
32
32
  /**
33
- * Accent color for the focused item.
34
- * @default "blue"
35
- */
33
+ * Accent color for the focused item.
34
+ * @default "blue"
35
+ */
36
36
  readonly accentColor?: LiteralUnion<AnsiColors, string>;
37
37
  /**
38
- * Auto-focus the menu on mount.
39
- */
38
+ * Auto-focus the menu on mount.
39
+ */
40
40
  readonly autoFocus?: boolean;
41
41
  /**
42
- * Render a border around the menu.
43
- * @default true
44
- */
42
+ * Render a border around the menu.
43
+ * @default true
44
+ */
45
45
  readonly bordered?: boolean;
46
46
  /**
47
- * Flat list of items. Ignored if `sections` is provided.
48
- */
47
+ * Flat list of items. Ignored if `sections` is provided.
48
+ */
49
49
  readonly items?: ReadonlyArray<MenuItem>;
50
50
  /**
51
- * Called with the item id when the user presses Enter.
52
- */
51
+ * Called with the item id when the user presses Enter.
52
+ */
53
53
  readonly onSelect: (id: string) => void;
54
54
  /**
55
- * Grouped items. Takes precedence over `items`.
56
- */
55
+ * Grouped items. Takes precedence over `items`.
56
+ */
57
57
  readonly sections?: ReadonlyArray<MenuSection>;
58
58
  /**
59
- * Optional title rendered at the top of the menu.
60
- */
59
+ * Optional title rendered at the top of the menu.
60
+ */
61
61
  readonly title?: string;
62
62
  };
63
63
  /**
64
- * Dropdown / context menu with optional sections and disabled items.
65
- * Keyboard: ↑/↓ (or j/k) to navigate, Enter to select, Esc to cancel.
66
- * @returns A `ReactElement` rendering the menu, optionally wrapped in a
67
- * rounded border when `bordered` is true.
68
- */
69
- declare function Menu({
70
- accentColor,
71
- autoFocus,
72
- bordered,
73
- items,
74
- onSelect,
75
- sections,
76
- title
77
- }: Props): ReactElement;
64
+ * Dropdown / context menu with optional sections and disabled items.
65
+ * Keyboard: ↑/↓ (or j/k) to navigate, Enter to select, Esc to cancel.
66
+ * @returns A `ReactElement` rendering the menu, optionally wrapped in a
67
+ * rounded border when `bordered` is true.
68
+ */
69
+ declare function Menu({ accentColor, autoFocus, bordered, items, onSelect, sections, title }: Props): ReactElement;
78
70
  export { Menu, MenuItem, type Props as MenuProps, MenuSection, Props, Menu as default };
@@ -4,40 +4,33 @@ import { LiteralUnion } from 'type-fest';
4
4
  type MessageRole = "assistant" | "system" | "tool" | "user";
5
5
  type Props = {
6
6
  /**
7
- * Bubble body.
8
- */
7
+ * Bubble body.
8
+ */
9
9
  readonly children: ReactNode;
10
10
  /**
11
- * Color override.
12
- */
11
+ * Color override.
12
+ */
13
13
  readonly color?: LiteralUnion<AnsiColors, string>;
14
14
  /**
15
- * When true, draws the bubble without a border.
16
- */
15
+ * When true, draws the bubble without a border.
16
+ */
17
17
  readonly flat?: boolean;
18
18
  /**
19
- * Text rendered above the bubble (name, model, etc.).
20
- */
19
+ * Text rendered above the bubble (name, model, etc.).
20
+ */
21
21
  readonly label?: string;
22
22
  /**
23
- * Optional metadata rendered next to the label (e.g. timestamp).
24
- */
23
+ * Optional metadata rendered next to the label (e.g. timestamp).
24
+ */
25
25
  readonly meta?: string;
26
26
  /**
27
- * Determines the alignment, color, and icon of the bubble.
28
- * @default "assistant"
29
- */
27
+ * Determines the alignment, color, and icon of the bubble.
28
+ * @default "assistant"
29
+ */
30
30
  readonly role?: MessageRole;
31
31
  };
32
32
  /**
33
- * Chat-style message bubble for AI agent UIs.
34
- */
35
- declare function MessageBubble({
36
- children,
37
- color,
38
- flat,
39
- label,
40
- meta,
41
- role
42
- }: Props): ReactElement;
33
+ * Chat-style message bubble for AI agent UIs.
34
+ */
35
+ declare function MessageBubble({ children, color, flat, label, meta, role }: Props): ReactElement;
43
36
  export { MessageBubble, type Props as MessageBubbleProps, MessageRole, Props, MessageBubble as default };
@@ -3,37 +3,31 @@ import { ReactNode, ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type Props = {
5
5
  /**
6
- * Background color of the badge.
7
- * @default "magenta"
8
- */
6
+ * Background color of the badge.
7
+ * @default "magenta"
8
+ */
9
9
  readonly color?: LiteralUnion<AnsiColors, string>;
10
10
  /**
11
- * Optional icon/symbol (e.g. `✨`, `◈`) shown before the label.
12
- */
11
+ * Optional icon/symbol (e.g. `✨`, `◈`) shown before the label.
12
+ */
13
13
  readonly icon?: ReactNode;
14
14
  /**
15
- * Short model identifier, e.g. `claude-opus-4.6`.
16
- */
15
+ * Short model identifier, e.g. `claude-opus-4.6`.
16
+ */
17
17
  readonly model: string;
18
18
  /**
19
- * Optional provider name rendered as a separate chip before the model.
20
- */
19
+ * Optional provider name rendered as a separate chip before the model.
20
+ */
21
21
  readonly provider?: string;
22
22
  /**
23
- * Visual style.
24
- * @default "solid"
25
- */
23
+ * Visual style.
24
+ * @default "solid"
25
+ */
26
26
  readonly variant?: "outline" | "solid" | "subtle";
27
27
  };
28
28
  /**
29
- * Pill-shaped chip identifying the active model / provider. Pair with
30
- * `MessageBubble` to label assistant output.
31
- */
32
- declare function ModelBadge({
33
- color,
34
- icon,
35
- model,
36
- provider,
37
- variant
38
- }: Props): ReactElement;
29
+ * Pill-shaped chip identifying the active model / provider. Pair with
30
+ * `MessageBubble` to label assistant output.
31
+ */
32
+ declare function ModelBadge({ color, icon, model, provider, variant }: Props): ReactElement;
39
33
  export { ModelBadge, type Props as ModelBadgeProps, Props, ModelBadge as default };
@@ -3,8 +3,8 @@ import { ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type ModelOption = {
5
5
  /**
6
- * Optional context-window hint shown on the right (e.g. `200k`).
7
- */
6
+ * Optional context-window hint shown on the right (e.g. `200k`).
7
+ */
8
8
  readonly context?: string;
9
9
  readonly id: string;
10
10
  readonly name: string;
@@ -12,41 +12,34 @@ type ModelOption = {
12
12
  };
13
13
  type Props = {
14
14
  /**
15
- * Accent color for the focused row and selected marker.
16
- * @default "blue"
17
- */
15
+ * Accent color for the focused row and selected marker.
16
+ * @default "blue"
17
+ */
18
18
  readonly accentColor?: LiteralUnion<AnsiColors, string>;
19
19
  /**
20
- * Auto-focus on mount.
21
- */
20
+ * Auto-focus on mount.
21
+ */
22
22
  readonly autoFocus?: boolean;
23
23
  /**
24
- * Selected model id when uncontrolled.
25
- */
24
+ * Selected model id when uncontrolled.
25
+ */
26
26
  readonly defaultValue?: string;
27
27
  /**
28
- * The models to choose from.
29
- */
28
+ * The models to choose from.
29
+ */
30
30
  readonly models: ReadonlyArray<ModelOption>;
31
31
  /**
32
- * Fires when the highlighted model is committed with Enter.
33
- */
32
+ * Fires when the highlighted model is committed with Enter.
33
+ */
34
34
  readonly onSelect?: (model: ModelOption) => void;
35
35
  /**
36
- * Controlled selected model id. When set, `defaultValue` is ignored.
37
- */
36
+ * Controlled selected model id. When set, `defaultValue` is ignored.
37
+ */
38
38
  readonly value?: string;
39
39
  };
40
40
  /**
41
- * A selectable list of models with provider and context-window hints. ↑/↓ move
42
- * the cursor and Enter commits; a ● marks the currently-selected model.
43
- */
44
- declare function ModelSelector({
45
- accentColor,
46
- autoFocus,
47
- defaultValue,
48
- models,
49
- onSelect,
50
- value: controlledValue
51
- }: Props): ReactElement;
41
+ * A selectable list of models with provider and context-window hints. ↑/↓ move
42
+ * the cursor and Enter commits; a ● marks the currently-selected model.
43
+ */
44
+ declare function ModelSelector({ accentColor, autoFocus, defaultValue, models, onSelect, value: controlledValue }: Props): ReactElement;
52
45
  export { ModelOption, ModelSelector, type Props as ModelSelectorProps, Props, ModelSelector as default };
@@ -6,50 +6,43 @@ type ProgressItem = {
6
6
  readonly color?: Color;
7
7
  readonly label: string;
8
8
  /**
9
- * Progress in the range [0, 1]. Values outside are clamped.
10
- */
9
+ * Progress in the range [0, 1]. Values outside are clamped.
10
+ */
11
11
  readonly value: number;
12
12
  };
13
13
  type Props = {
14
14
  /**
15
- * Width of each bar in cells.
16
- * @default 20
17
- */
15
+ * Width of each bar in cells.
16
+ * @default 20
17
+ */
18
18
  readonly barWidth?: number;
19
19
  /**
20
- * Fallback bar color when an item has none.
21
- * @default "cyan"
22
- */
20
+ * Fallback bar color when an item has none.
21
+ * @default "cyan"
22
+ */
23
23
  readonly color?: Color;
24
24
  /**
25
- * Character for the empty portion of each bar; defaults to a light shade.
26
- */
25
+ * Character for the empty portion of each bar; defaults to a light shade.
26
+ */
27
27
  readonly emptyChar?: string;
28
28
  /**
29
- * Character for the filled portion of each bar; defaults to a full block.
30
- */
29
+ * Character for the filled portion of each bar; defaults to a full block.
30
+ */
31
31
  readonly filledChar?: string;
32
32
  /**
33
- * The bars to render, top to bottom.
34
- */
33
+ * The bars to render, top to bottom.
34
+ */
35
35
  readonly items: ReadonlyArray<ProgressItem>;
36
36
  /**
37
- * Render the percentage after each bar.
38
- * @default true
39
- */
37
+ * Render the percentage after each bar.
38
+ * @default true
39
+ */
40
40
  readonly showPercent?: boolean;
41
41
  };
42
42
  /**
43
- * A stack of labeled progress bars sharing one aligned column layout — useful
44
- * for parallel downloads, multi-step jobs, or per-file progress. Labels are
45
- * right-padded to the widest so the bars line up.
46
- */
47
- declare function MultiProgress({
48
- barWidth,
49
- color,
50
- emptyChar,
51
- filledChar,
52
- items,
53
- showPercent
54
- }: Props): ReactElement;
43
+ * A stack of labeled progress bars sharing one aligned column layout — useful
44
+ * for parallel downloads, multi-step jobs, or per-file progress. Labels are
45
+ * right-padded to the widest so the bars line up.
46
+ */
47
+ declare function MultiProgress({ barWidth, color, emptyChar, filledChar, items, showPercent }: Props): ReactElement;
55
48
  export { MultiProgress, type Props as MultiProgressProps, ProgressItem, Props, MultiProgress as default };
@@ -8,58 +8,48 @@ type MultiSelectOption = {
8
8
  };
9
9
  type Props = {
10
10
  /**
11
- * Color for the focused item indicator and selected checkmarks.
12
- * @default "blue"
13
- */
11
+ * Color for the focused item indicator and selected checkmarks.
12
+ * @default "blue"
13
+ */
14
14
  readonly accentColor?: LiteralUnion<AnsiColors, string>;
15
15
  /**
16
- * Color for unselected, unfocused option labels.
17
- */
16
+ * Color for unselected, unfocused option labels.
17
+ */
18
18
  readonly defaultColor?: LiteralUnion<AnsiColors, string>;
19
19
  /**
20
- * Initially selected values.
21
- */
20
+ * Initially selected values.
21
+ */
22
22
  readonly defaultValue?: ReadonlyArray<string>;
23
23
  /**
24
- * When true, all input is ignored and labels are dimmed.
25
- * @default false
26
- */
24
+ * When true, all input is ignored and labels are dimmed.
25
+ * @default false
26
+ */
27
27
  readonly isDisabled?: boolean;
28
28
  /**
29
- * Whether the parent has focus. When false, indicators are dimmed.
30
- * @default true
31
- */
29
+ * Whether the parent has focus. When false, indicators are dimmed.
30
+ * @default true
31
+ */
32
32
  readonly isFocused?: boolean;
33
33
  /**
34
- * Number of visible options before scrolling.
35
- * When omitted, auto-limits to terminal height.
36
- */
34
+ * Number of visible options before scrolling.
35
+ * When omitted, auto-limits to terminal height.
36
+ */
37
37
  readonly limit?: number;
38
38
  /**
39
- * Fires when the set of selected values changes (space to toggle).
40
- */
39
+ * Fires when the set of selected values changes (space to toggle).
40
+ */
41
41
  readonly onChange?: (values: ReadonlyArray<string>) => void;
42
42
  /**
43
- * Fires when the user presses Enter to submit.
44
- */
43
+ * Fires when the user presses Enter to submit.
44
+ */
45
45
  readonly onSubmit?: (values: ReadonlyArray<string>) => void;
46
46
  /**
47
- * Available choices to pick from.
48
- */
47
+ * Available choices to pick from.
48
+ */
49
49
  readonly options: ReadonlyArray<MultiSelectOption>;
50
50
  };
51
51
  /**
52
- * Renders a multi-choice selection list with checkboxes and keyboard navigation.
53
- */
54
- declare function MultiSelect({
55
- accentColor,
56
- defaultColor,
57
- defaultValue,
58
- isDisabled,
59
- isFocused,
60
- limit: customLimit,
61
- onChange,
62
- onSubmit,
63
- options
64
- }: Props): ReactElement;
52
+ * Renders a multi-choice selection list with checkboxes and keyboard navigation.
53
+ */
54
+ declare function MultiSelect({ accentColor, defaultColor, defaultValue, isDisabled, isFocused, limit: customLimit, onChange, onSubmit, options }: Props): ReactElement;
65
55
  export { MultiSelect, MultiSelectOption, type Props as MultiSelectProps, Props, MultiSelect as default };
@@ -3,45 +3,38 @@ import { ReactNode, ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type Props = {
5
5
  /**
6
- * The element the badge is attached to (rendered before the badge).
7
- */
6
+ * The element the badge is attached to (rendered before the badge).
7
+ */
8
8
  readonly children?: ReactNode;
9
9
  /**
10
- * Badge background color.
11
- * @default "red"
12
- */
10
+ * Badge background color.
11
+ * @default "red"
12
+ */
13
13
  readonly color?: LiteralUnion<AnsiColors, string>;
14
14
  /**
15
- * Numeric count. Values above `max` render as `{max}+`. A count of `0`
16
- * hides the badge unless `showZero` is set.
17
- */
15
+ * Numeric count. Values above `max` render as `{max}+`. A count of `0`
16
+ * hides the badge unless `showZero` is set.
17
+ */
18
18
  readonly count: number;
19
19
  /**
20
- * Upper bound before the count is abbreviated with a trailing `+`.
21
- * @default 99
22
- */
20
+ * Upper bound before the count is abbreviated with a trailing `+`.
21
+ * @default 99
22
+ */
23
23
  readonly max?: number;
24
24
  /**
25
- * Render the badge even when `count` is `0`.
26
- * @default false
27
- */
25
+ * Render the badge even when `count` is `0`.
26
+ * @default false
27
+ */
28
28
  readonly showZero?: boolean;
29
29
  /**
30
- * Text color inside the badge.
31
- * @default "white"
32
- */
30
+ * Text color inside the badge.
31
+ * @default "white"
32
+ */
33
33
  readonly textColor?: LiteralUnion<AnsiColors, string>;
34
34
  };
35
35
  /**
36
- * A small count badge, optionally attached to a child element. Counts above
37
- * `max` are abbreviated (e.g. `99+`); a zero count is hidden unless `showZero`.
38
- */
39
- declare function NotificationBadge({
40
- children,
41
- color,
42
- count,
43
- max,
44
- showZero,
45
- textColor
46
- }: Props): ReactElement;
36
+ * A small count badge, optionally attached to a child element. Counts above
37
+ * `max` are abbreviated (e.g. `99+`); a zero count is hidden unless `showZero`.
38
+ */
39
+ declare function NotificationBadge({ children, color, count, max, showZero, textColor }: Props): ReactElement;
47
40
  export { NotificationBadge, type Props as NotificationBadgeProps, Props, NotificationBadge as default };
@@ -3,83 +3,69 @@ import { ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type Props = {
5
5
  /**
6
- * Accent color for the border/caret when focused.
7
- * @default "blue"
8
- */
6
+ * Accent color for the border/caret when focused.
7
+ * @default "blue"
8
+ */
9
9
  readonly accentColor?: LiteralUnion<AnsiColors, string>;
10
10
  /**
11
- * Auto-focus the input on mount.
12
- */
11
+ * Auto-focus the input on mount.
12
+ */
13
13
  readonly autoFocus?: boolean;
14
14
  /**
15
- * Initial value when uncontrolled.
16
- */
15
+ * Initial value when uncontrolled.
16
+ */
17
17
  readonly defaultValue?: number;
18
18
  /**
19
- * Disable input and dim the display.
20
- */
19
+ * Disable input and dim the display.
20
+ */
21
21
  readonly isDisabled?: boolean;
22
22
  /**
23
- * Upper bound. Values are clamped on commit and by the stepper.
24
- */
23
+ * Upper bound. Values are clamped on commit and by the stepper.
24
+ */
25
25
  readonly max?: number;
26
26
  /**
27
- * Lower bound. Values are clamped on commit and by the stepper.
28
- */
27
+ * Lower bound. Values are clamped on commit and by the stepper.
28
+ */
29
29
  readonly min?: number;
30
30
  /**
31
- * Fires whenever the numeric value changes.
32
- */
31
+ * Fires whenever the numeric value changes.
32
+ */
33
33
  readonly onChange?: (value: number) => void;
34
34
  /**
35
- * Fires when the user presses Enter.
36
- */
35
+ * Fires when the user presses Enter.
36
+ */
37
37
  readonly onSubmit?: (value: number) => void;
38
38
  /**
39
- * Placeholder rendered when the field is empty.
40
- * @default "0"
41
- */
39
+ * Placeholder rendered when the field is empty.
40
+ * @default "0"
41
+ */
42
42
  readonly placeholder?: string;
43
43
  /**
44
- * Number of decimal places to allow and display. `0` restricts input to
45
- * integers.
46
- * @default 0
47
- */
44
+ * Number of decimal places to allow and display. `0` restricts input to
45
+ * integers.
46
+ * @default 0
47
+ */
48
48
  readonly precision?: number;
49
49
  /**
50
- * Show ▲/▼ stepper hints and let ↑/↓ adjust by `step`.
51
- * @default true
52
- */
50
+ * Show ▲/▼ stepper hints and let ↑/↓ adjust by `step`.
51
+ * @default true
52
+ */
53
53
  readonly showControls?: boolean;
54
54
  /**
55
- * Increment applied by ↑/↓ (and Shift for 10× via PageUp/PageDown).
56
- * @default 1
57
- */
55
+ * Increment applied by ↑/↓ (and Shift for 10× via PageUp/PageDown).
56
+ * @default 1
57
+ */
58
58
  readonly step?: number;
59
59
  /**
60
- * Controlled value. When provided, `defaultValue` is ignored.
61
- */
60
+ * Controlled value. When provided, `defaultValue` is ignored.
61
+ */
62
62
  readonly value?: number;
63
63
  };
64
64
  /**
65
- * A keyboard-driven numeric input. Type digits (and `-`/`.` where allowed),
66
- * use ↑/↓ to step by `step`, PageUp/PageDown for 10× steps, and Enter to
67
- * submit. The raw text buffer is validated so partial entries like `-` or
68
- * `1.` are allowed while typing but clamped/parsed on change.
69
- */
70
- declare function NumberInput({
71
- accentColor,
72
- autoFocus,
73
- defaultValue,
74
- isDisabled,
75
- max,
76
- min,
77
- onChange,
78
- onSubmit,
79
- placeholder,
80
- precision,
81
- showControls,
82
- step,
83
- value: controlledValue
84
- }: Props): ReactElement;
65
+ * A keyboard-driven numeric input. Type digits (and `-`/`.` where allowed),
66
+ * use ↑/↓ to step by `step`, PageUp/PageDown for 10× steps, and Enter to
67
+ * submit. The raw text buffer is validated so partial entries like `-` or
68
+ * `1.` are allowed while typing but clamped/parsed on change.
69
+ */
70
+ declare function NumberInput({ accentColor, autoFocus, defaultValue, isDisabled, max, min, onChange, onSubmit, placeholder, precision, showControls, step, value: controlledValue }: Props): ReactElement;
85
71
  export { NumberInput, type Props as NumberInputProps, Props, NumberInput as default };