@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
package/dist/form.d.ts CHANGED
@@ -3,79 +3,72 @@ import { ReactNode, ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type FormFieldProps = {
5
5
  /**
6
- * The input element (TextInput, Checkbox, Select, …).
7
- */
6
+ * The input element (TextInput, Checkbox, Select, …).
7
+ */
8
8
  readonly children: ReactNode;
9
9
  /**
10
- * Optional helper text rendered beneath the input.
11
- */
10
+ * Optional helper text rendered beneath the input.
11
+ */
12
12
  readonly description?: string;
13
13
  /**
14
- * Validation error — dimmed red below the input.
15
- */
14
+ * Validation error — dimmed red below the input.
15
+ */
16
16
  readonly error?: string;
17
17
  /**
18
- * When true, the field's label and description are dim.
19
- */
18
+ * When true, the field's label and description are dim.
19
+ */
20
20
  readonly isDisabled?: boolean;
21
21
  /**
22
- * Label rendered above the input.
23
- */
22
+ * Label rendered above the input.
23
+ */
24
24
  readonly label: string;
25
25
  /**
26
- * Mark the field as required (adds a trailing `*`).
27
- */
26
+ * Mark the field as required (adds a trailing `*`).
27
+ */
28
28
  readonly required?: boolean;
29
29
  };
30
30
  /**
31
- * Standard form field wrapper: label + input + helper/error.
32
- */
33
- declare const FormField: ({
34
- children,
35
- description,
36
- error,
37
- isDisabled,
38
- label,
39
- required
40
- }: FormFieldProps) => ReactElement;
31
+ * Standard form field wrapper: label + input + helper/error.
32
+ */
33
+ declare const FormField: ({ children, description, error, isDisabled, label, required }: FormFieldProps) => ReactElement;
41
34
  type Props = {
42
35
  /**
43
- * Accent color for the form chrome.
44
- * @default "blue"
45
- */
36
+ * Accent color for the form chrome.
37
+ * @default "blue"
38
+ */
46
39
  readonly accentColor?: LiteralUnion<AnsiColors, string>;
47
40
  /**
48
- * Render a border around the form.
49
- * @default true
50
- */
41
+ * Render a border around the form.
42
+ * @default true
43
+ */
51
44
  readonly bordered?: boolean;
52
45
  /**
53
- * Fields composed via `&lt;FormField />`.
54
- */
46
+ * Fields composed via `&lt;FormField />`.
47
+ */
55
48
  readonly children: ReactNode;
56
49
  /**
57
- * Optional description rendered under the title.
58
- */
50
+ * Optional description rendered under the title.
51
+ */
59
52
  readonly description?: string;
60
53
  /**
61
- * Optional footer rendered below the fields (buttons, hints, summary).
62
- */
54
+ * Optional footer rendered below the fields (buttons, hints, summary).
55
+ */
63
56
  readonly footer?: ReactNode;
64
57
  /**
65
- * Optional heading rendered at the top.
66
- */
58
+ * Optional heading rendered at the top.
59
+ */
67
60
  readonly title?: string;
68
61
  /**
69
- * Fixed width.
70
- */
62
+ * Fixed width.
63
+ */
71
64
  readonly width?: number;
72
65
  };
73
66
  type FormComponent = ((props: Props) => ReactElement) & {
74
67
  Field: typeof FormField;
75
68
  };
76
69
  /**
77
- * Stateless form layout. Pair with the `useForm` hook for state management
78
- * and `FormField` for consistent label/error styling.
79
- */
70
+ * Stateless form layout. Pair with the `useForm` hook for state management
71
+ * and `FormField` for consistent label/error styling.
72
+ */
80
73
  declare const Form: FormComponent;
81
74
  export { Form, FormField, FormFieldProps, type Props as FormProps, Props, Form as default };
package/dist/gauge.d.ts CHANGED
@@ -3,85 +3,74 @@ import { ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type GaugeThreshold = {
5
5
  /**
6
- * Color used for the arc segment and, when the current value falls into
7
- * this segment, for the value readout.
8
- */
6
+ * Color used for the arc segment and, when the current value falls into
7
+ * this segment, for the value readout.
8
+ */
9
9
  readonly color: LiteralUnion<AnsiColors, string>;
10
10
  /**
11
- * Optional label used by the legend under the gauge.
12
- */
11
+ * Optional label used by the legend under the gauge.
12
+ */
13
13
  readonly label?: string;
14
14
  /**
15
- * Upper bound of this threshold segment (inclusive). Segments are sorted
16
- * ascending and painted in order.
17
- */
15
+ * Upper bound of this threshold segment (inclusive). Segments are sorted
16
+ * ascending and painted in order.
17
+ */
18
18
  readonly max: number;
19
19
  };
20
20
  type GaugeSize = "large" | "medium" | "small";
21
21
  type Props = {
22
22
  /**
23
- * Color of the arc background (the portion beyond `value`).
24
- * @default "gray"
25
- */
23
+ * Color of the arc background (the portion beyond `value`).
24
+ * @default "gray"
25
+ */
26
26
  readonly backgroundColor?: LiteralUnion<AnsiColors, string>;
27
27
  /**
28
- * Format for the numeric readout. Defaults to rounding to an integer.
29
- */
28
+ * Format for the numeric readout. Defaults to rounding to an integer.
29
+ */
30
30
  readonly formatValue?: (value: number) => string;
31
31
  /**
32
- * Optional label rendered above the readout.
33
- */
32
+ * Optional label rendered above the readout.
33
+ */
34
34
  readonly label?: string;
35
35
  /**
36
- * Upper bound of the range.
37
- * @default 100
38
- */
36
+ * Upper bound of the range.
37
+ * @default 100
38
+ */
39
39
  readonly max?: number;
40
40
  /**
41
- * Lower bound of the range.
42
- * @default 0
43
- */
41
+ * Lower bound of the range.
42
+ * @default 0
43
+ */
44
44
  readonly min?: number;
45
45
  /**
46
- * Show a legend listing thresholds below the gauge.
47
- * @default false
48
- */
46
+ * Show a legend listing thresholds below the gauge.
47
+ * @default false
48
+ */
49
49
  readonly showLegend?: boolean;
50
50
  /**
51
- * Show a numeric readout in the middle of the gauge.
52
- * @default true
53
- */
51
+ * Show a numeric readout in the middle of the gauge.
52
+ * @default true
53
+ */
54
54
  readonly showValue?: boolean;
55
55
  /**
56
- * Overall dimension preset.
57
- * @default "medium"
58
- */
56
+ * Overall dimension preset.
57
+ * @default "medium"
58
+ */
59
59
  readonly size?: GaugeSize;
60
60
  /**
61
- * Color threshold ramp. When provided, segments of the arc are painted in
62
- * the corresponding colors and the value readout picks up the color for
63
- * the segment `value` lands in.
64
- */
61
+ * Color threshold ramp. When provided, segments of the arc are painted in
62
+ * the corresponding colors and the value readout picks up the color for
63
+ * the segment `value` lands in.
64
+ */
65
65
  readonly thresholds?: ReadonlyArray<GaugeThreshold>;
66
66
  /**
67
- * Current value. Clamped into the `[min, max]` range.
68
- */
67
+ * Current value. Clamped into the `[min, max]` range.
68
+ */
69
69
  readonly value: number;
70
70
  };
71
71
  /**
72
- * Semi-circular gauge rendered at 2x4 sub-cell resolution. Supports colored
73
- * threshold segments and an optional needle.
74
- */
75
- declare function Gauge({
76
- backgroundColor,
77
- formatValue,
78
- label,
79
- max,
80
- min,
81
- showLegend,
82
- showValue,
83
- size,
84
- thresholds,
85
- value
86
- }: Props): ReactElement;
72
+ * Semi-circular gauge rendered at 2x4 sub-cell resolution. Supports colored
73
+ * threshold segments and an optional needle.
74
+ */
75
+ declare function Gauge({ backgroundColor, formatValue, label, max, min, showLegend, showValue, size, thresholds, value }: Props): ReactElement;
87
76
  export { Gauge, type Props as GaugeProps, GaugeSize, GaugeThreshold, Props, Gauge as default };
@@ -1,42 +1,38 @@
1
1
  import { multilineGradient } from '@visulima/colorize/gradient';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  /**
4
- * A color stop for the gradient — hex string, CSS color name, RGB tuple, RGB object, or positioned stop.
5
- */
4
+ * A color stop for the gradient — hex string, CSS color name, RGB tuple, RGB object, or positioned stop.
5
+ */
6
6
  type GradientStop = Parameters<typeof multilineGradient>[0][number];
7
7
  /**
8
- * Built-in gradient presets.
9
- */
8
+ * Built-in gradient presets.
9
+ */
10
10
  type GradientName = "atlas" | "cristal" | "fruit" | "instagram" | "mind" | "morning" | "pastel" | "passion" | "rainbow" | "retro" | "summer" | "teen" | "vice";
11
11
  /**
12
- * Custom gradient colors — an array of color stops accepted by `@visulima/colorize`'s gradient API.
13
- */
12
+ * Custom gradient colors — an array of color stops accepted by `@visulima/colorize`'s gradient API.
13
+ */
14
14
  type GradientColors = GradientStop[];
15
15
  type Props = {
16
16
  /**
17
- * The content to colorize.
18
- *
19
- * Multiple `&lt;Text>` children are treated as separate nodes, which preserves layout when `&lt;Gradient>` is placed inside a `&lt;Box flexDirection="column">`.
20
- *
21
- * If you want a continuous gradient across multiple lines, pass a single string or a single `&lt;Text>` with `\n`.
22
- */
17
+ * The content to colorize.
18
+ *
19
+ * Multiple `&lt;Text>` children are treated as separate nodes, which preserves layout when `&lt;Gradient>` is placed inside a `&lt;Box flexDirection="column">`.
20
+ *
21
+ * If you want a continuous gradient across multiple lines, pass a single string or a single `&lt;Text>` with `\n`.
22
+ */
23
23
  readonly children: ReactNode;
24
24
  /**
25
- * [Colors to use to make the gradient.](https://visulima.com/packages/colorize)
26
- *
27
- * Mutually exclusive with `name`.
28
- */
25
+ * [Colors to use to make the gradient.](https://visulima.com/packages/colorize)
26
+ *
27
+ * Mutually exclusive with `name`.
28
+ */
29
29
  readonly colors?: GradientColors;
30
30
  /**
31
- * The name of a built-in gradient preset.
32
- *
33
- * Mutually exclusive with `colors`.
34
- */
31
+ * The name of a built-in gradient preset.
32
+ *
33
+ * Mutually exclusive with `colors`.
34
+ */
35
35
  readonly name?: GradientName;
36
36
  };
37
- declare function Gradient({
38
- children,
39
- colors,
40
- name
41
- }: Props): ReactElement | null;
37
+ declare function Gradient({ children, colors, name }: Props): ReactElement | null;
42
38
  export { Gradient, type GradientColors, type GradientName, type Props as GradientProps, Props, Gradient as default };
package/dist/grid.d.ts CHANGED
@@ -1,40 +1,34 @@
1
1
  import { ReactNode, ReactElement } from 'react';
2
2
  type Props = {
3
3
  /**
4
- * The grid cells, filled left-to-right, top-to-bottom.
5
- */
4
+ * The grid cells, filled left-to-right, top-to-bottom.
5
+ */
6
6
  readonly children: ReactNode;
7
7
  /**
8
- * Horizontal gap between columns, in cells.
9
- * @default 1
10
- */
8
+ * Horizontal gap between columns, in cells.
9
+ * @default 1
10
+ */
11
11
  readonly columnGap?: number;
12
12
  /**
13
- * Number of columns. Children wrap into as many rows as needed.
14
- * @default 2
15
- */
13
+ * Number of columns. Children wrap into as many rows as needed.
14
+ * @default 2
15
+ */
16
16
  readonly columns?: number;
17
17
  /**
18
- * Fixed width for every column, in cells. Omit to let columns size to
19
- * their content.
20
- */
18
+ * Fixed width for every column, in cells. Omit to let columns size to
19
+ * their content.
20
+ */
21
21
  readonly columnWidth?: number;
22
22
  /**
23
- * Vertical gap between rows, in cells.
24
- * @default 0
25
- */
23
+ * Vertical gap between rows, in cells.
24
+ * @default 0
25
+ */
26
26
  readonly rowGap?: number;
27
27
  };
28
28
  /**
29
- * A simple 2D grid: children flow left-to-right into a fixed number of columns,
30
- * wrapping to new rows. Column and row gaps are configurable, and columns can
31
- * be given a fixed width for uniform cells.
32
- */
33
- declare function Grid({
34
- children,
35
- columnGap,
36
- columns,
37
- columnWidth,
38
- rowGap
39
- }: Props): ReactElement;
29
+ * A simple 2D grid: children flow left-to-right into a fixed number of columns,
30
+ * wrapping to new rows. Column and row gaps are configurable, and columns can
31
+ * be given a fixed width for uniform cells.
32
+ */
33
+ declare function Grid({ children, columnGap, columns, columnWidth, rowGap }: Props): ReactElement;
40
34
  export { Grid, type Props as GridProps, Props, Grid as default };
package/dist/heading.d.ts CHANGED
@@ -4,30 +4,25 @@ import { LiteralUnion } from 'type-fest';
4
4
  type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
5
5
  type Props = {
6
6
  /**
7
- * Heading content.
8
- */
7
+ * Heading content.
8
+ */
9
9
  readonly children: ReactNode;
10
10
  /**
11
- * Explicit color. By default the color is derived from the level.
12
- */
11
+ * Explicit color. By default the color is derived from the level.
12
+ */
13
13
  readonly color?: LiteralUnion<AnsiColors, string>;
14
14
  /**
15
- * Heading level controls decoration and color.
16
- * @default 1
17
- */
15
+ * Heading level controls decoration and color.
16
+ * @default 1
17
+ */
18
18
  readonly level?: HeadingLevel;
19
19
  /**
20
- * When true, renders an underline on a second line.
21
- */
20
+ * When true, renders an underline on a second line.
21
+ */
22
22
  readonly underline?: boolean;
23
23
  };
24
24
  /**
25
- * Semantic heading with level-based styling.
26
- */
27
- declare function Heading({
28
- children,
29
- color,
30
- level,
31
- underline
32
- }: Props): ReactElement;
25
+ * Semantic heading with level-based styling.
26
+ */
27
+ declare function Heading({ children, color, level, underline }: Props): ReactElement;
33
28
  export { Heading, HeadingLevel, type Props as HeadingProps, Props, Heading as default };
package/dist/heatmap.d.ts CHANGED
@@ -3,60 +3,50 @@ import { ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type HeatmapProps = {
5
5
  /**
6
- * Width of each cell in character columns.
7
- * @default 2
8
- */
6
+ * Width of each cell in character columns.
7
+ * @default 2
8
+ */
9
9
  readonly cellWidth?: number;
10
10
  /**
11
- * Glyph used to paint each heatmap cell. Defaults to `█` so the
12
- * background color fills the cell.
13
- * @default "█" (full block)
14
- */
11
+ * Glyph used to paint each heatmap cell. Defaults to `█` so the
12
+ * background color fills the cell.
13
+ * @default "█" (full block)
14
+ */
15
15
  readonly character?: string;
16
16
  /**
17
- * Column labels rendered below the grid.
18
- */
17
+ * Column labels rendered below the grid.
18
+ */
19
19
  readonly columnLabels?: ReadonlyArray<string>;
20
20
  /**
21
- * 2D matrix, rows × cols.
22
- */
21
+ * 2D matrix, rows × cols.
22
+ */
23
23
  readonly data: ReadonlyArray<ReadonlyArray<number>>;
24
24
  /**
25
- * Fixed maximum (for consistent scales across multiple heatmaps).
26
- */
25
+ * Fixed maximum (for consistent scales across multiple heatmaps).
26
+ */
27
27
  readonly max?: number;
28
28
  /**
29
- * Fixed minimum.
30
- */
29
+ * Fixed minimum.
30
+ */
31
31
  readonly min?: number;
32
32
  /**
33
- * Color palette, lowest-to-highest intensity. Values are mapped into the
34
- * palette by their position in the [min, max] range.
35
- * @default ["#0b1e4f", "#1f3b96", "#3258c8", "#4e84ec", "#78b0ff"]
36
- */
33
+ * Color palette, lowest-to-highest intensity. Values are mapped into the
34
+ * palette by their position in the [min, max] range.
35
+ * @default ["#0b1e4f", "#1f3b96", "#3258c8", "#4e84ec", "#78b0ff"]
36
+ */
37
37
  readonly palette?: ReadonlyArray<string>;
38
38
  /**
39
- * Row labels rendered to the left of the grid.
40
- */
39
+ * Row labels rendered to the left of the grid.
40
+ */
41
41
  readonly rowLabels?: ReadonlyArray<string>;
42
42
  /**
43
- * Foreground color override (rarely needed since the character is a full block).
44
- */
43
+ * Foreground color override (rarely needed since the character is a full block).
44
+ */
45
45
  readonly textColor?: LiteralUnion<AnsiColors, string>;
46
46
  };
47
47
  /**
48
- * 2D heatmap. Each cell's background color is derived from its value's
49
- * position in the [min, max] range mapped into `palette`.
50
- */
51
- declare function Heatmap({
52
- cellWidth,
53
- character,
54
- columnLabels,
55
- data,
56
- max: maxOverride,
57
- min: minOverride,
58
- palette,
59
- rowLabels,
60
- textColor
61
- }: HeatmapProps): ReactElement;
48
+ * 2D heatmap. Each cell's background color is derived from its value's
49
+ * position in the [min, max] range mapped into `palette`.
50
+ */
51
+ declare function Heatmap({ cellWidth, character, columnLabels, data, max: maxOverride, min: minOverride, palette, rowLabels, textColor }: HeatmapProps): ReactElement;
62
52
  export { Heatmap, HeatmapProps, Heatmap as default };
package/dist/help.d.ts CHANGED
@@ -2,51 +2,44 @@ import { KeyBinding } from '@visulima/tui/hooks/use-key-bindings';
2
2
  import { ReactElement } from 'react';
3
3
  type Props = {
4
4
  /**
5
- * Key bindings to display. Typically the `bindings` array returned by `useKeyBindings`.
6
- */
5
+ * Key bindings to display. Typically the `bindings` array returned by `useKeyBindings`.
6
+ */
7
7
  readonly bindings: ReadonlyArray<KeyBinding>;
8
8
  /**
9
- * Color for description text.
10
- * @default undefined (uses dimColor)
11
- */
9
+ * Color for description text.
10
+ * @default undefined (uses dimColor)
11
+ */
12
12
  readonly descriptionColor?: string;
13
13
  /**
14
- * Color for key labels.
15
- * @default "cyan"
16
- */
14
+ * Color for key labels.
15
+ * @default "cyan"
16
+ */
17
17
  readonly keyColor?: string;
18
18
  /**
19
- * Maximum number of columns in full mode.
20
- * @default 3
21
- */
19
+ * Maximum number of columns in full mode.
20
+ * @default 3
21
+ */
22
22
  readonly maxColumns?: number;
23
23
  /**
24
- * Display mode.
25
- * - `"short"`: Single-line horizontal bar, truncated to terminal width.
26
- * - `"full"`: Multi-column layout grouped by `group` field.
27
- * @default "short"
28
- */
24
+ * Display mode.
25
+ * - `"short"`: Single-line horizontal bar, truncated to terminal width.
26
+ * - `"full"`: Multi-column layout grouped by `group` field.
27
+ * @default "short"
28
+ */
29
29
  readonly mode?: "full" | "short";
30
30
  /**
31
- * Separator between key-description pairs in short mode.
32
- * @default " \u00b7 "
33
- */
31
+ * Separator between key-description pairs in short mode.
32
+ * @default " \u00b7 "
33
+ */
34
34
  readonly separator?: string;
35
35
  };
36
36
  /**
37
- * Renders a keybinding help bar from an array of `KeyBinding` definitions.
38
- *
39
- * ```tsx
40
- * &lt;Help bindings={bindings} />
41
- * &lt;Help bindings={bindings} mode="full" />
42
- * ```
43
- */
44
- declare function Help({
45
- bindings,
46
- descriptionColor,
47
- keyColor,
48
- maxColumns,
49
- mode,
50
- separator
51
- }: Props): ReactElement;
37
+ * Renders a keybinding help bar from an array of `KeyBinding` definitions.
38
+ *
39
+ * ```tsx
40
+ * &lt;Help bindings={bindings} />
41
+ * &lt;Help bindings={bindings} mode="full" />
42
+ * ```
43
+ */
44
+ declare function Help({ bindings, descriptionColor, keyColor, maxColumns, mode, separator }: Props): ReactElement;
52
45
  export { Help, type Props as HelpProps, Props, Help as default };
@@ -3,60 +3,50 @@ import { ReactElement } from 'react';
3
3
  import { LiteralUnion } from 'type-fest';
4
4
  type Props = {
5
5
  /**
6
- * Number of equal-width buckets. Ignored if `thresholds` is set.
7
- * @default 10
8
- */
6
+ * Number of equal-width buckets. Ignored if `thresholds` is set.
7
+ * @default 10
8
+ */
9
9
  readonly bins?: number;
10
10
  /**
11
- * Bar color.
12
- */
11
+ * Bar color.
12
+ */
13
13
  readonly color?: LiteralUnion<AnsiColors, string>;
14
14
  /**
15
- * Raw values to bin.
16
- */
15
+ * Raw values to bin.
16
+ */
17
17
  readonly data: ReadonlyArray<number>;
18
18
  /**
19
- * Plot height in character rows.
20
- * @default 10
21
- */
19
+ * Plot height in character rows.
20
+ * @default 10
21
+ */
22
22
  readonly height?: number;
23
23
  /**
24
- * Optional fixed maximum.
25
- */
24
+ * Optional fixed maximum.
25
+ */
26
26
  readonly max?: number;
27
27
  /**
28
- * Optional fixed minimum.
29
- */
28
+ * Optional fixed minimum.
29
+ */
30
30
  readonly min?: number;
31
31
  /**
32
- * Render a numeric count above each bucket.
33
- * @default false
34
- */
32
+ * Render a numeric count above each bucket.
33
+ * @default false
34
+ */
35
35
  readonly showValues?: boolean;
36
36
  /**
37
- * Explicit bin edges. When provided, `bins`, `min`, and `max` are ignored.
38
- * Must be strictly increasing.
39
- */
37
+ * Explicit bin edges. When provided, `bins`, `min`, and `max` are ignored.
38
+ * Must be strictly increasing.
39
+ */
40
40
  readonly thresholds?: ReadonlyArray<number>;
41
41
  /**
42
- * Plot width in character columns.
43
- */
42
+ * Plot width in character columns.
43
+ */
44
44
  readonly width?: number;
45
45
  };
46
46
  /**
47
- * Histogram built on top of BarChart. Bins the raw values (via explicit
48
- * thresholds or equal-width bins) and hands the counts off to BarChart.
49
- * @returns A `ReactElement` rendering a BarChart of bucket counts.
50
- */
51
- declare function Histogram({
52
- bins,
53
- color,
54
- data,
55
- height,
56
- max: maxOverride,
57
- min: minOverride,
58
- showValues,
59
- thresholds,
60
- width
61
- }: Props): ReactElement;
47
+ * Histogram built on top of BarChart. Bins the raw values (via explicit
48
+ * thresholds or equal-width bins) and hands the counts off to BarChart.
49
+ * @returns A `ReactElement` rendering a BarChart of bucket counts.
50
+ */
51
+ declare function Histogram({ bins, color, data, height, max: maxOverride, min: minOverride, showValues, thresholds, width }: Props): ReactElement;
62
52
  export { Histogram, type Props as HistogramProps, Props, Histogram as default };