@visulima/tui 1.0.0-alpha.4 → 1.0.0-alpha.5
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 +15 -0
- package/LICENSE.md +140 -0
- package/dist/core/index.d.ts +58 -5
- package/dist/ink/index.d.ts +6592 -294
- package/dist/ink/index.js +1 -1
- package/dist/packem_shared/{Histogram-cgAjY5AJ.js → Histogram-CB6XcmZW.js} +1 -1
- package/dist/packem_shared/input.d-Bfq7oc06.d.ts +90 -0
- package/dist/packem_shared/render.d-CNIzVQTh.d.ts +1257 -0
- package/dist/react/index.d.ts +519 -8
- package/dist/testing/index.d.ts +274 -135
- package/package.json +15 -16
- package/dist/core/app.d.ts +0 -50
- package/dist/core/cell.d.ts +0 -33
- package/dist/core/inline.d.ts +0 -22
- package/dist/core/input.d.ts +0 -18
- package/dist/core/native-binding.d.ts +0 -22
- package/dist/ink/ansi-to-cell.d.ts +0 -5
- package/dist/ink/ansi-tokenizer.d.ts +0 -38
- package/dist/ink/canvas/braille.d.ts +0 -22
- package/dist/ink/canvas/buffer.d.ts +0 -67
- package/dist/ink/clipboard.d.ts +0 -29
- package/dist/ink/color-matrix.d.ts +0 -49
- package/dist/ink/color-utils.d.ts +0 -30
- package/dist/ink/colorize.d.ts +0 -4
- package/dist/ink/components/accessibility-context.d.ts +0 -4
- package/dist/ink/components/accordion.d.ts +0 -52
- package/dist/ink/components/alert.d.ts +0 -30
- package/dist/ink/components/animate-presence.d.ts +0 -15
- package/dist/ink/components/animation-context.d.ts +0 -10
- package/dist/ink/components/app-context.d.ts +0 -38
- package/dist/ink/components/app.d.ts +0 -19
- package/dist/ink/components/approval-prompt.d.ts +0 -55
- package/dist/ink/components/area-chart.d.ts +0 -54
- package/dist/ink/components/background-context.d.ts +0 -5
- package/dist/ink/components/badge.d.ts +0 -27
- package/dist/ink/components/bar-chart.d.ts +0 -57
- package/dist/ink/components/big-text.d.ts +0 -71
- package/dist/ink/components/blink-dot.d.ts +0 -30
- package/dist/ink/components/box.d.ts +0 -58
- package/dist/ink/components/breadcrumb.d.ts +0 -28
- package/dist/ink/components/button.d.ts +0 -38
- package/dist/ink/components/calendar.d.ts +0 -60
- package/dist/ink/components/canvas.d.ts +0 -38
- package/dist/ink/components/card.d.ts +0 -46
- package/dist/ink/components/chart-utils.d.ts +0 -54
- package/dist/ink/components/checkbox.d.ts +0 -39
- package/dist/ink/components/code.d.ts +0 -46
- package/dist/ink/components/collapsible.d.ts +0 -43
- package/dist/ink/components/command-block.d.ts +0 -38
- package/dist/ink/components/command-palette.d.ts +0 -72
- package/dist/ink/components/confirm-dialog.d.ts +0 -63
- package/dist/ink/components/confirm-input.d.ts +0 -40
- package/dist/ink/components/console-overlay.d.ts +0 -52
- package/dist/ink/components/content-switcher.d.ts +0 -49
- package/dist/ink/components/cursor-context.d.ts +0 -12
- package/dist/ink/components/cursor.d.ts +0 -43
- package/dist/ink/components/date-picker.d.ts +0 -53
- package/dist/ink/components/definition-list.d.ts +0 -37
- package/dist/ink/components/dialog.d.ts +0 -93
- package/dist/ink/components/diff-view.d.ts +0 -71
- package/dist/ink/components/divider.d.ts +0 -40
- package/dist/ink/components/error-boundary.d.ts +0 -17
- package/dist/ink/components/error-overview.d.ts +0 -6
- package/dist/ink/components/file-picker/file-picker.d.ts +0 -58
- package/dist/ink/components/file-picker/types.d.ts +0 -35
- package/dist/ink/components/file-picker/use-file-system.d.ts +0 -16
- package/dist/ink/components/focus-context.d.ts +0 -17
- package/dist/ink/components/form.d.ts +0 -74
- package/dist/ink/components/gauge.d.ts +0 -75
- package/dist/ink/components/gradient.d.ts +0 -38
- package/dist/ink/components/heading.d.ts +0 -27
- package/dist/ink/components/heatmap.d.ts +0 -51
- package/dist/ink/components/help.d.ts +0 -44
- package/dist/ink/components/histogram.d.ts +0 -52
- package/dist/ink/components/kbd.d.ts +0 -27
- package/dist/ink/components/line-chart.d.ts +0 -94
- package/dist/ink/components/link.d.ts +0 -34
- package/dist/ink/components/loading-indicator.d.ts +0 -24
- package/dist/ink/components/markdown.d.ts +0 -34
- package/dist/ink/components/masked-input.d.ts +0 -41
- package/dist/ink/components/menu.d.ts +0 -70
- package/dist/ink/components/message-bubble.d.ts +0 -35
- package/dist/ink/components/model-badge.d.ts +0 -32
- package/dist/ink/components/multi-select.d.ts +0 -63
- package/dist/ink/components/newline.d.ts +0 -12
- package/dist/ink/components/operation-tree.d.ts +0 -46
- package/dist/ink/components/option-list.d.ts +0 -41
- package/dist/ink/components/ordered-list.d.ts +0 -30
- package/dist/ink/components/paginator.d.ts +0 -59
- package/dist/ink/components/paragraph.d.ts +0 -31
- package/dist/ink/components/placeholder.d.ts +0 -47
- package/dist/ink/components/progress-bar.d.ts +0 -51
- package/dist/ink/components/radio-group.d.ts +0 -62
- package/dist/ink/components/scatter-plot.d.ts +0 -23
- package/dist/ink/components/scroll/controlled-scroll-view.d.ts +0 -43
- package/dist/ink/components/scroll/index.d.ts +0 -10
- package/dist/ink/components/scroll/scroll-bar-box.d.ts +0 -15
- package/dist/ink/components/scroll/scroll-bar.d.ts +0 -20
- package/dist/ink/components/scroll/scroll-list.d.ts +0 -12
- package/dist/ink/components/scroll/scroll-view.d.ts +0 -98
- package/dist/ink/components/scroll/use-state-ref.d.ts +0 -8
- package/dist/ink/components/search-input.d.ts +0 -46
- package/dist/ink/components/select-input-indicator.d.ts +0 -36
- package/dist/ink/components/select-input-item.d.ts +0 -43
- package/dist/ink/components/select-input.d.ts +0 -96
- package/dist/ink/components/shimmer-text.d.ts +0 -39
- package/dist/ink/components/slider.d.ts +0 -92
- package/dist/ink/components/spacer.d.ts +0 -7
- package/dist/ink/components/sparkline.d.ts +0 -30
- package/dist/ink/components/spinner.d.ts +0 -40
- package/dist/ink/components/static-render.d.ts +0 -40
- package/dist/ink/components/static.d.ts +0 -24
- package/dist/ink/components/status-line.d.ts +0 -30
- package/dist/ink/components/status-message.d.ts +0 -26
- package/dist/ink/components/stderr-context.d.ts +0 -16
- package/dist/ink/components/stdin-context.d.ts +0 -29
- package/dist/ink/components/stdout-context.d.ts +0 -16
- package/dist/ink/components/stepper.d.ts +0 -42
- package/dist/ink/components/stopwatch.d.ts +0 -42
- package/dist/ink/components/streaming-text.d.ts +0 -38
- package/dist/ink/components/switch.d.ts +0 -46
- package/dist/ink/components/tab.d.ts +0 -25
- package/dist/ink/components/table.d.ts +0 -80
- package/dist/ink/components/tabs.d.ts +0 -104
- package/dist/ink/components/tag.d.ts +0 -30
- package/dist/ink/components/text-input.d.ts +0 -48
- package/dist/ink/components/text.d.ts +0 -63
- package/dist/ink/components/textarea.d.ts +0 -62
- package/dist/ink/components/timer.d.ts +0 -50
- package/dist/ink/components/toast.d.ts +0 -41
- package/dist/ink/components/tooltip.d.ts +0 -36
- package/dist/ink/components/transform.d.ts +0 -16
- package/dist/ink/components/transition.d.ts +0 -53
- package/dist/ink/components/tree-view/theme.d.ts +0 -24
- package/dist/ink/components/tree-view/tree-node-map.d.ts +0 -72
- package/dist/ink/components/tree-view/tree-view-node.d.ts +0 -29
- package/dist/ink/components/tree-view/tree-view.d.ts +0 -89
- package/dist/ink/components/tree-view/types.d.ts +0 -55
- package/dist/ink/components/tree-view/use-tree-view-state.d.ts +0 -135
- package/dist/ink/components/tree-view/use-tree-view.d.ts +0 -26
- package/dist/ink/components/unordered-list.d.ts +0 -35
- package/dist/ink/components/variant-config.d.ts +0 -10
- package/dist/ink/cursor-helpers.d.ts +0 -35
- package/dist/ink/data-limited-lru-map.d.ts +0 -21
- package/dist/ink/devtools-window-polyfill.d.ts +0 -1
- package/dist/ink/devtools.d.ts +0 -1
- package/dist/ink/dom.d.ts +0 -214
- package/dist/ink/get-max-width.d.ts +0 -3
- package/dist/ink/highlighter.d.ts +0 -28
- package/dist/ink/hooks/use-animation.d.ts +0 -41
- package/dist/ink/hooks/use-app.d.ts +0 -6
- package/dist/ink/hooks/use-box-metrics.d.ts +0 -58
- package/dist/ink/hooks/use-clipboard.d.ts +0 -29
- package/dist/ink/hooks/use-color-blindness.d.ts +0 -33
- package/dist/ink/hooks/use-console-capture.d.ts +0 -43
- package/dist/ink/hooks/use-cursor.d.ts +0 -12
- package/dist/ink/hooks/use-focus-manager.d.ts +0 -42
- package/dist/ink/hooks/use-focus.d.ts +0 -30
- package/dist/ink/hooks/use-form.d.ts +0 -70
- package/dist/ink/hooks/use-hotkey.d.ts +0 -37
- package/dist/ink/hooks/use-input.d.ts +0 -149
- package/dist/ink/hooks/use-interval.d.ts +0 -25
- package/dist/ink/hooks/use-is-screen-reader-enabled.d.ts +0 -6
- package/dist/ink/hooks/use-key-bindings.d.ts +0 -59
- package/dist/ink/hooks/use-key-chord.d.ts +0 -26
- package/dist/ink/hooks/use-linked-scroll.d.ts +0 -41
- package/dist/ink/hooks/use-paste.d.ts +0 -44
- package/dist/ink/hooks/use-persistent-state.d.ts +0 -56
- package/dist/ink/hooks/use-scroll-acceleration.d.ts +0 -47
- package/dist/ink/hooks/use-scroll-input.d.ts +0 -34
- package/dist/ink/hooks/use-stderr.d.ts +0 -6
- package/dist/ink/hooks/use-stdin.d.ts +0 -7
- package/dist/ink/hooks/use-stdout.d.ts +0 -6
- package/dist/ink/hooks/use-stopwatch.d.ts +0 -38
- package/dist/ink/hooks/use-terminal-palette.d.ts +0 -19
- package/dist/ink/hooks/use-text-buffer.d.ts +0 -42
- package/dist/ink/hooks/use-text-selection.d.ts +0 -45
- package/dist/ink/hooks/use-timeout.d.ts +0 -24
- package/dist/ink/hooks/use-timer.d.ts +0 -47
- package/dist/ink/hooks/use-window-size.d.ts +0 -18
- package/dist/ink/ime-utils.d.ts +0 -25
- package/dist/ink/ink.d.ts +0 -190
- package/dist/ink/input-parser.d.ts +0 -10
- package/dist/ink/input-utils.d.ts +0 -16
- package/dist/ink/instances.d.ts +0 -3
- package/dist/ink/kitty-keyboard.d.ts +0 -23
- package/dist/ink/layout.d.ts +0 -26
- package/dist/ink/log-update-native.d.ts +0 -14
- package/dist/ink/log-update.d.ts +0 -21
- package/dist/ink/measure-element.d.ts +0 -147
- package/dist/ink/measure-text.d.ts +0 -56
- package/dist/ink/mouse/ansi-parser.d.ts +0 -37
- package/dist/ink/mouse/constants.d.ts +0 -14
- package/dist/ink/mouse/fullscreen.d.ts +0 -8
- package/dist/ink/mouse/index.d.ts +0 -20
- package/dist/ink/mouse/is-intersecting.d.ts +0 -18
- package/dist/ink/mouse/mouse-context.d.ts +0 -36
- package/dist/ink/mouse/mouse-provider.d.ts +0 -11
- package/dist/ink/mouse/use-element-position.d.ts +0 -29
- package/dist/ink/mouse/use-mouse-action.d.ts +0 -7
- package/dist/ink/mouse/use-mouse-position.d.ts +0 -7
- package/dist/ink/mouse/use-mouse.d.ts +0 -7
- package/dist/ink/mouse/use-on-mouse-click.d.ts +0 -14
- package/dist/ink/mouse/use-on-mouse-hover.d.ts +0 -8
- package/dist/ink/mouse/use-on-mouse-state.d.ts +0 -11
- package/dist/ink/output.d.ts +0 -75
- package/dist/ink/parse-keypress.d.ts +0 -22
- package/dist/ink/reconciler.d.ts +0 -3
- package/dist/ink/region.d.ts +0 -99
- package/dist/ink/render-background.d.ts +0 -4
- package/dist/ink/render-border.d.ts +0 -4
- package/dist/ink/render-node-to-output.d.ts +0 -38
- package/dist/ink/render-scrollbar.d.ts +0 -9
- package/dist/ink/render-sticky.d.ts +0 -44
- package/dist/ink/render-to-string.d.ts +0 -37
- package/dist/ink/render.d.ts +0 -191
- package/dist/ink/renderer.d.ts +0 -17
- package/dist/ink/resize-observer.d.ts +0 -44
- package/dist/ink/sanitize-ansi.d.ts +0 -2
- package/dist/ink/scroll.d.ts +0 -23
- package/dist/ink/selection.d.ts +0 -70
- package/dist/ink/squash-text-nodes.d.ts +0 -18
- package/dist/ink/style-flags.d.ts +0 -17
- package/dist/ink/styled-line-factory.d.ts +0 -25
- package/dist/ink/styled-line-serializer.d.ts +0 -18
- package/dist/ink/styled-line.d.ts +0 -119
- package/dist/ink/styles.d.ts +0 -369
- package/dist/ink/terminal-palette.d.ts +0 -25
- package/dist/ink/text-wrap.d.ts +0 -10
- package/dist/ink/token-to-elements.d.ts +0 -22
- package/dist/ink/utils/format-time.d.ts +0 -4
- package/dist/ink/utils.d.ts +0 -9
- package/dist/ink/wrap-text.d.ts +0 -3
- package/dist/ink/write-synchronized.d.ts +0 -4
- package/dist/react/devtools.d.ts +0 -27
- package/dist/react/focus.d.ts +0 -39
- package/dist/react/hooks.d.ts +0 -238
- package/dist/react/layout.d.ts +0 -33
- package/dist/react/react.d.ts +0 -57
- package/dist/react/reconciler.d.ts +0 -4
- package/dist/react/render-to-string.d.ts +0 -21
- package/dist/react/renderer.d.ts +0 -2
- package/dist/react/scene.d.ts +0 -3
- package/dist/react/static.d.ts +0 -39
- package/dist/react/styles.d.ts +0 -83
- package/dist/react/text-width.d.ts +0 -20
- package/dist/testing/keys.d.ts +0 -89
- package/dist/testing/screen.d.ts +0 -35
- package/dist/testing/wait-for.d.ts +0 -20
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement, ReactNode } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
export type MenuItem = {
|
|
5
|
-
/**
|
|
6
|
-
* Optional hotkey rendered on the right side of the row (e.g. `"Ctrl+S"`).
|
|
7
|
-
*/
|
|
8
|
-
readonly hotkey?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Optional icon rendered before the label.
|
|
11
|
-
*/
|
|
12
|
-
readonly icon?: ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* Identifier returned by `onSelect`.
|
|
15
|
-
*/
|
|
16
|
-
readonly id: string;
|
|
17
|
-
/**
|
|
18
|
-
* When true, renders the item dimmed and skips it during navigation.
|
|
19
|
-
*/
|
|
20
|
-
readonly isDisabled?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Human-readable label.
|
|
23
|
-
*/
|
|
24
|
-
readonly label: ReactNode;
|
|
25
|
-
};
|
|
26
|
-
export type MenuSection = {
|
|
27
|
-
readonly id: string;
|
|
28
|
-
readonly items: ReadonlyArray<MenuItem>;
|
|
29
|
-
readonly title?: string;
|
|
30
|
-
};
|
|
31
|
-
export type Props = {
|
|
32
|
-
/**
|
|
33
|
-
* Accent color for the focused item.
|
|
34
|
-
* @default "blue"
|
|
35
|
-
*/
|
|
36
|
-
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
37
|
-
/**
|
|
38
|
-
* Auto-focus the menu on mount.
|
|
39
|
-
*/
|
|
40
|
-
readonly autoFocus?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Render a border around the menu.
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
readonly bordered?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Flat list of items. Ignored if `sections` is provided.
|
|
48
|
-
*/
|
|
49
|
-
readonly items?: ReadonlyArray<MenuItem>;
|
|
50
|
-
/**
|
|
51
|
-
* Called with the item id when the user presses Enter.
|
|
52
|
-
*/
|
|
53
|
-
readonly onSelect: (id: string) => void;
|
|
54
|
-
/**
|
|
55
|
-
* Grouped items. Takes precedence over `items`.
|
|
56
|
-
*/
|
|
57
|
-
readonly sections?: ReadonlyArray<MenuSection>;
|
|
58
|
-
/**
|
|
59
|
-
* Optional title rendered at the top of the menu.
|
|
60
|
-
*/
|
|
61
|
-
readonly title?: string;
|
|
62
|
-
};
|
|
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
|
-
* @param props See {@link Props}.
|
|
67
|
-
* @returns A `ReactElement` rendering the menu, optionally wrapped in a
|
|
68
|
-
* rounded border when `bordered` is true.
|
|
69
|
-
*/
|
|
70
|
-
export default function Menu({ accentColor, autoFocus, bordered, items, onSelect, sections, title }: Props): ReactElement;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement, ReactNode } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
export type MessageRole = "assistant" | "system" | "tool" | "user";
|
|
5
|
-
export type Props = {
|
|
6
|
-
/**
|
|
7
|
-
* Bubble body.
|
|
8
|
-
*/
|
|
9
|
-
readonly children: ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* Color override.
|
|
12
|
-
*/
|
|
13
|
-
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
14
|
-
/**
|
|
15
|
-
* When true, draws the bubble without a border.
|
|
16
|
-
*/
|
|
17
|
-
readonly flat?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Text rendered above the bubble (name, model, etc.).
|
|
20
|
-
*/
|
|
21
|
-
readonly label?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Optional metadata rendered next to the label (e.g. timestamp).
|
|
24
|
-
*/
|
|
25
|
-
readonly meta?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Determines the alignment, color, and icon of the bubble.
|
|
28
|
-
* @default "assistant"
|
|
29
|
-
*/
|
|
30
|
-
readonly role?: MessageRole;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Chat-style message bubble for AI agent UIs.
|
|
34
|
-
*/
|
|
35
|
-
export default function MessageBubble({ children, color, flat, label, meta, role }: Props): ReactElement;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement, ReactNode } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
export type Props = {
|
|
5
|
-
/**
|
|
6
|
-
* Background color of the badge.
|
|
7
|
-
* @default "magenta"
|
|
8
|
-
*/
|
|
9
|
-
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
10
|
-
/**
|
|
11
|
-
* Optional icon/symbol (e.g. `✨`, `◈`) shown before the label.
|
|
12
|
-
*/
|
|
13
|
-
readonly icon?: ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* Short model identifier, e.g. `claude-opus-4.6`.
|
|
16
|
-
*/
|
|
17
|
-
readonly model: string;
|
|
18
|
-
/**
|
|
19
|
-
* Optional provider name rendered as a separate chip before the model.
|
|
20
|
-
*/
|
|
21
|
-
readonly provider?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Visual style.
|
|
24
|
-
* @default "solid"
|
|
25
|
-
*/
|
|
26
|
-
readonly variant?: "outline" | "solid" | "subtle";
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Pill-shaped chip identifying the active model / provider. Pair with
|
|
30
|
-
* `MessageBubble` to label assistant output.
|
|
31
|
-
*/
|
|
32
|
-
export default function ModelBadge({ color, icon, model, provider, variant }: Props): ReactElement;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Multi-select input component for Ink.
|
|
3
|
-
*
|
|
4
|
-
* Inspired by ink-ui MultiSelect by Vadim Demedes.
|
|
5
|
-
* @see https://github.com/vadimdemedes/ink-ui
|
|
6
|
-
*
|
|
7
|
-
* MIT License
|
|
8
|
-
* Copyright (c) Vadym Demedes (github.com/vadimdemedes)
|
|
9
|
-
*/
|
|
10
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
11
|
-
import type { ReactElement } from "react";
|
|
12
|
-
import type { LiteralUnion } from "type-fest";
|
|
13
|
-
export type MultiSelectOption = {
|
|
14
|
-
readonly key?: string;
|
|
15
|
-
readonly label: string;
|
|
16
|
-
readonly value: string;
|
|
17
|
-
};
|
|
18
|
-
export type Props = {
|
|
19
|
-
/**
|
|
20
|
-
* Color for the focused item indicator and selected checkmarks.
|
|
21
|
-
* @default "blue"
|
|
22
|
-
*/
|
|
23
|
-
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
24
|
-
/**
|
|
25
|
-
* Color for unselected, unfocused option labels.
|
|
26
|
-
*/
|
|
27
|
-
readonly defaultColor?: LiteralUnion<AnsiColors, string>;
|
|
28
|
-
/**
|
|
29
|
-
* Initially selected values.
|
|
30
|
-
*/
|
|
31
|
-
readonly defaultValue?: ReadonlyArray<string>;
|
|
32
|
-
/**
|
|
33
|
-
* When true, all input is ignored and labels are dimmed.
|
|
34
|
-
* @default false
|
|
35
|
-
*/
|
|
36
|
-
readonly isDisabled?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Whether the parent has focus. When false, indicators are dimmed.
|
|
39
|
-
* @default true
|
|
40
|
-
*/
|
|
41
|
-
readonly isFocused?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Number of visible options before scrolling.
|
|
44
|
-
* When omitted, auto-limits to terminal height.
|
|
45
|
-
*/
|
|
46
|
-
readonly limit?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Fires when the set of selected values changes (space to toggle).
|
|
49
|
-
*/
|
|
50
|
-
readonly onChange?: (values: ReadonlyArray<string>) => void;
|
|
51
|
-
/**
|
|
52
|
-
* Fires when the user presses Enter to submit.
|
|
53
|
-
*/
|
|
54
|
-
readonly onSubmit?: (values: ReadonlyArray<string>) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Available choices to pick from.
|
|
57
|
-
*/
|
|
58
|
-
readonly options: ReadonlyArray<MultiSelectOption>;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Renders a multi-choice selection list with checkboxes and keyboard navigation.
|
|
62
|
-
*/
|
|
63
|
-
export default function MultiSelect({ accentColor, defaultColor, defaultValue, isDisabled, isFocused, limit: customLimit, onChange, onSubmit, options, }: Props): ReactElement;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ReactElement } from "react";
|
|
2
|
-
export type Props = {
|
|
3
|
-
/**
|
|
4
|
-
* Number of newlines to insert.
|
|
5
|
-
* @default 1
|
|
6
|
-
*/
|
|
7
|
-
readonly count?: number;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Adds one or more newline (`\n`) characters. Must be used within `<Text>` components.
|
|
11
|
-
*/
|
|
12
|
-
export default function Newline({ count }: Props): ReactElement;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from "react";
|
|
2
|
-
export type OperationStatus = "completed" | "error" | "pending" | "running" | "skipped";
|
|
3
|
-
export type OperationNode = {
|
|
4
|
-
/**
|
|
5
|
-
* Nested child operations rendered beneath this node.
|
|
6
|
-
*/
|
|
7
|
-
readonly children?: ReadonlyArray<OperationNode>;
|
|
8
|
-
/**
|
|
9
|
-
* Optional supplementary info rendered on the next line (dimmed).
|
|
10
|
-
*/
|
|
11
|
-
readonly details?: ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Wall-clock duration in ms, displayed right-aligned.
|
|
14
|
-
*/
|
|
15
|
-
readonly durationMs?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Unique identifier within the tree.
|
|
18
|
-
*/
|
|
19
|
-
readonly id: string;
|
|
20
|
-
/**
|
|
21
|
-
* Human-readable label.
|
|
22
|
-
*/
|
|
23
|
-
readonly label: ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Lifecycle state controlling icon + color.
|
|
26
|
-
*/
|
|
27
|
-
readonly status: OperationStatus;
|
|
28
|
-
};
|
|
29
|
-
export type Props = {
|
|
30
|
-
/**
|
|
31
|
-
* Tree of operations. Each node can have its own children.
|
|
32
|
-
*/
|
|
33
|
-
readonly nodes: ReadonlyArray<OperationNode>;
|
|
34
|
-
/**
|
|
35
|
-
* When true, runs the running-spinner animation.
|
|
36
|
-
* @default true
|
|
37
|
-
*/
|
|
38
|
-
readonly showSpinner?: boolean;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Renders a tree of operations with per-node status. Perfect for agent
|
|
42
|
-
* progress panels (reading → editing → running tests → done).
|
|
43
|
-
* @param props See {@link Props}.
|
|
44
|
-
* @returns A `ReactElement` rendering the nested tree of operation rows.
|
|
45
|
-
*/
|
|
46
|
-
export default function OperationTree({ nodes, showSpinner }: Props): ReactElement;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement, ReactNode } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
export type OptionListEntry = {
|
|
5
|
-
readonly description?: string;
|
|
6
|
-
readonly icon?: ReactNode;
|
|
7
|
-
readonly id: string;
|
|
8
|
-
readonly label: ReactNode;
|
|
9
|
-
readonly trailing?: ReactNode;
|
|
10
|
-
};
|
|
11
|
-
export type Props = {
|
|
12
|
-
/**
|
|
13
|
-
* Highlight color for the row marked as current.
|
|
14
|
-
*/
|
|
15
|
-
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
16
|
-
/**
|
|
17
|
-
* Render the list with a border.
|
|
18
|
-
*/
|
|
19
|
-
readonly bordered?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Id of the row to highlight. No visual change if omitted.
|
|
22
|
-
*/
|
|
23
|
-
readonly currentId?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Icon width in characters for column alignment.
|
|
26
|
-
* @default 2
|
|
27
|
-
*/
|
|
28
|
-
readonly iconColumnWidth?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Entries to render.
|
|
31
|
-
*/
|
|
32
|
-
readonly options: ReadonlyArray<OptionListEntry>;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Read-only presentational option list. Like `SelectInput` but without focus,
|
|
36
|
-
* input handling, or scrolling — just a styled list of rows. Useful inside
|
|
37
|
-
* modals, sidebars, or summary panels.
|
|
38
|
-
* @param props See {@link Props}.
|
|
39
|
-
* @returns A `ReactElement` rendering the list; bordered when requested.
|
|
40
|
-
*/
|
|
41
|
-
export default function OptionList({ accentColor, bordered, currentId, iconColumnWidth, options }: Props): ReactElement;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ordered list component for Ink.
|
|
3
|
-
*
|
|
4
|
-
* Inspired by ink-ui OrderedList by Vadim Demedes.
|
|
5
|
-
* @see https://github.com/vadimdemedes/ink-ui
|
|
6
|
-
*
|
|
7
|
-
* MIT License
|
|
8
|
-
* Copyright (c) Vadym Demedes (github.com/vadimdemedes)
|
|
9
|
-
*/
|
|
10
|
-
import type { ReactElement, ReactNode } from "react";
|
|
11
|
-
export type OrderedListEntry = {
|
|
12
|
-
/**
|
|
13
|
-
* Nested sub-items, rendered as a sub-list with hierarchical numbering.
|
|
14
|
-
*/
|
|
15
|
-
readonly children?: ReadonlyArray<OrderedListEntry>;
|
|
16
|
-
/**
|
|
17
|
-
* Display text for this item.
|
|
18
|
-
*/
|
|
19
|
-
readonly label: ReactNode;
|
|
20
|
-
};
|
|
21
|
-
export type Props = {
|
|
22
|
-
/**
|
|
23
|
-
* Entries to render as a numbered list.
|
|
24
|
-
*/
|
|
25
|
-
readonly items: ReadonlyArray<OrderedListEntry>;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Renders a numbered list with hierarchical nesting support.
|
|
29
|
-
*/
|
|
30
|
-
export default function OrderedList({ items }: Props): ReactElement;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Metadata about the current page state, passed to the render-prop children.
|
|
4
|
-
*/
|
|
5
|
-
export type PageMeta = {
|
|
6
|
-
readonly currentPage: number;
|
|
7
|
-
readonly endIndex: number;
|
|
8
|
-
readonly isFirstPage: boolean;
|
|
9
|
-
readonly isLastPage: boolean;
|
|
10
|
-
readonly startIndex: number;
|
|
11
|
-
readonly totalPages: number;
|
|
12
|
-
};
|
|
13
|
-
export type Props<T> = {
|
|
14
|
-
/**
|
|
15
|
-
* Render-prop that receives the current page items and page metadata.
|
|
16
|
-
*/
|
|
17
|
-
readonly children: (pageItems: ReadonlyArray<T>, meta: PageMeta) => ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Uncontrolled initial page (0-indexed).
|
|
20
|
-
* @default 0
|
|
21
|
-
*/
|
|
22
|
-
readonly defaultPage?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Color for the active page indicator.
|
|
25
|
-
* @default "cyan"
|
|
26
|
-
*/
|
|
27
|
-
readonly indicatorColor?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Whether keyboard navigation is active.
|
|
30
|
-
* @default true
|
|
31
|
-
*/
|
|
32
|
-
readonly isFocused?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The full list of items to paginate.
|
|
35
|
-
*/
|
|
36
|
-
readonly items: ReadonlyArray<T>;
|
|
37
|
-
/**
|
|
38
|
-
* Called when the page changes.
|
|
39
|
-
*/
|
|
40
|
-
readonly onChange?: (page: number) => void;
|
|
41
|
-
/**
|
|
42
|
-
* Controlled current page (0-indexed). When provided, the component is controlled.
|
|
43
|
-
*/
|
|
44
|
-
readonly page?: number;
|
|
45
|
-
/**
|
|
46
|
-
* Number of items per page.
|
|
47
|
-
*/
|
|
48
|
-
readonly pageSize: number;
|
|
49
|
-
/**
|
|
50
|
-
* Indicator style.
|
|
51
|
-
* - `"dots"`: `● ○ ○ ○`
|
|
52
|
-
* - `"numeric"`: `‹ 1 / 4 ›`
|
|
53
|
-
* - `"fraction"`: `1/4`
|
|
54
|
-
* @default "dots"
|
|
55
|
-
*/
|
|
56
|
-
readonly style?: "dots" | "fraction" | "numeric";
|
|
57
|
-
};
|
|
58
|
-
declare const Paginator: <T>({ children, defaultPage, indicatorColor, isFocused, items, onChange, page: controlledPage, pageSize, style, }: Props<T>) => ReactElement;
|
|
59
|
-
export default Paginator;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement, ReactNode } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
export type Props = {
|
|
5
|
-
/**
|
|
6
|
-
* Paragraph body.
|
|
7
|
-
*/
|
|
8
|
-
readonly children: ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* Foreground color.
|
|
11
|
-
*/
|
|
12
|
-
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
13
|
-
/**
|
|
14
|
-
* Render the paragraph with dim color.
|
|
15
|
-
*/
|
|
16
|
-
readonly dimColor?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Blank lines to add after the paragraph.
|
|
19
|
-
* @default 1
|
|
20
|
-
*/
|
|
21
|
-
readonly marginBottom?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Blank lines to add before the paragraph.
|
|
24
|
-
* @default 0
|
|
25
|
-
*/
|
|
26
|
-
readonly marginTop?: number;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Wraps body text with a trailing blank line. Useful for README-style layouts.
|
|
30
|
-
*/
|
|
31
|
-
export default function Paragraph({ children, color, dimColor, marginBottom, marginTop }: Props): ReactElement;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
export type Props = {
|
|
5
|
-
/**
|
|
6
|
-
* Whether to pulse the skeleton blocks (shimmer).
|
|
7
|
-
* @default true
|
|
8
|
-
*/
|
|
9
|
-
readonly animated?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Fill character used for each block.
|
|
12
|
-
* @default "█"
|
|
13
|
-
*/
|
|
14
|
-
readonly character?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Block color.
|
|
17
|
-
* @default "gray"
|
|
18
|
-
*/
|
|
19
|
-
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
20
|
-
/**
|
|
21
|
-
* Milliseconds between pulses.
|
|
22
|
-
* @default 500
|
|
23
|
-
*/
|
|
24
|
-
readonly interval?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Number of skeleton rows to render.
|
|
27
|
-
* @default 3
|
|
28
|
-
*/
|
|
29
|
-
readonly rows?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Total width reference. When omitted, the block flexes to fill its
|
|
32
|
-
* parent.
|
|
33
|
-
*/
|
|
34
|
-
readonly width?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Relative widths of each row (0–1). The list is sampled cyclically.
|
|
37
|
-
* @default [1, 0.85, 0.6]
|
|
38
|
-
*/
|
|
39
|
-
readonly widths?: ReadonlyArray<number>;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Skeleton loading indicator. Renders a stack of solid blocks whose widths
|
|
43
|
-
* vary to mimic text placeholders. Pair with `async` data fetching.
|
|
44
|
-
* @param props See {@link Props}.
|
|
45
|
-
* @returns A `ReactElement` rendering the skeleton rows.
|
|
46
|
-
*/
|
|
47
|
-
export default function Placeholder({ animated, character, color, interval, rows, width, widths, }: Props): ReactElement;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Progress bar component for Ink.
|
|
3
|
-
*
|
|
4
|
-
* Based on ink-progress-bar by Frankie Bagnardi (brigand).
|
|
5
|
-
* @see https://github.com/brigand/ink-progress-bar
|
|
6
|
-
*
|
|
7
|
-
* MIT License
|
|
8
|
-
* Copyright (c) Frankie Bagnardi
|
|
9
|
-
*/
|
|
10
|
-
import type { ReactElement } from "react";
|
|
11
|
-
import type { Props as TextProps } from "./text.d.ts";
|
|
12
|
-
export type Props = {
|
|
13
|
-
/** Fill glyph repeated across the completed portion of the progress bar. Defaults to "█". */
|
|
14
|
-
readonly character?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Override the terminal width used for calculation.
|
|
17
|
-
* When 0, uses the actual terminal width.
|
|
18
|
-
* @default 0
|
|
19
|
-
*/
|
|
20
|
-
readonly columns?: number;
|
|
21
|
-
/**
|
|
22
|
-
* Number of columns reserved on the left side (e.g. for labels).
|
|
23
|
-
* @default 0
|
|
24
|
-
*/
|
|
25
|
-
readonly left?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Completion percentage between 0 and 1.
|
|
28
|
-
* @default 1
|
|
29
|
-
*/
|
|
30
|
-
readonly percent?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Number of columns reserved on the right side (e.g. for percentage text).
|
|
33
|
-
* @default 0
|
|
34
|
-
*/
|
|
35
|
-
readonly right?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Whether to pad the remaining space with whitespace.
|
|
38
|
-
* Useful when rendering the bar over a background color.
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
readonly rightPad?: boolean;
|
|
42
|
-
} & Omit<TextProps, "children">;
|
|
43
|
-
/**
|
|
44
|
-
* A terminal progress bar that fills proportionally to a percentage value.
|
|
45
|
-
*
|
|
46
|
-
* ```tsx
|
|
47
|
-
* <ProgressBar percent={0.5} />
|
|
48
|
-
* <ProgressBar percent={0.75} color="green" left={10} right={5} />
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export default function ProgressBar({ character, columns: columnsProp, left, percent, right, rightPad, ...textProps }: Props): ReactElement;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
export type RadioOption = {
|
|
5
|
-
readonly description?: string;
|
|
6
|
-
readonly key?: string;
|
|
7
|
-
readonly label: string;
|
|
8
|
-
readonly value: string;
|
|
9
|
-
};
|
|
10
|
-
export type Props = {
|
|
11
|
-
/**
|
|
12
|
-
* Accent color for the focused and selected indicator.
|
|
13
|
-
* @default "blue"
|
|
14
|
-
*/
|
|
15
|
-
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
16
|
-
/**
|
|
17
|
-
* Auto-focus when mounted.
|
|
18
|
-
*/
|
|
19
|
-
readonly autoFocus?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* When true, moving focus with arrow keys immediately updates the selected
|
|
22
|
-
* value (and fires `onChange`). When false, focus moves independently and
|
|
23
|
-
* selection commits only on Space or Enter.
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
readonly commitOnNavigate?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Initial selected value when uncontrolled.
|
|
29
|
-
*/
|
|
30
|
-
readonly defaultValue?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Disable input and dim labels.
|
|
33
|
-
*/
|
|
34
|
-
readonly isDisabled?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Called when selection changes.
|
|
37
|
-
*/
|
|
38
|
-
readonly onChange?: (value: string) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Called when the user submits by pressing Enter.
|
|
41
|
-
*/
|
|
42
|
-
readonly onSubmit?: (value: string) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Available options.
|
|
45
|
-
*/
|
|
46
|
-
readonly options: ReadonlyArray<RadioOption>;
|
|
47
|
-
/**
|
|
48
|
-
* Orientation of options.
|
|
49
|
-
* @default "vertical"
|
|
50
|
-
*/
|
|
51
|
-
readonly orientation?: "horizontal" | "vertical";
|
|
52
|
-
/**
|
|
53
|
-
* Controlled selected value.
|
|
54
|
-
*/
|
|
55
|
-
readonly value?: string;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Single-choice radio group with keyboard navigation. By default, navigation
|
|
59
|
-
* commits selection; set `commitOnNavigate={false}` to require an explicit
|
|
60
|
-
* Space/Enter commit.
|
|
61
|
-
*/
|
|
62
|
-
export default function RadioGroup({ accentColor, autoFocus, commitOnNavigate, defaultValue, isDisabled, onChange, onSubmit, options, orientation, value, }: Props): ReactElement;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
-
import type { ReactElement } from "react";
|
|
3
|
-
import type { LiteralUnion } from "type-fest";
|
|
4
|
-
import type { LineSeries } from "./line-chart.d.ts";
|
|
5
|
-
export type Props = {
|
|
6
|
-
readonly axisColor?: LiteralUnion<AnsiColors, string>;
|
|
7
|
-
readonly height?: number;
|
|
8
|
-
readonly maxX?: number;
|
|
9
|
-
readonly maxY?: number;
|
|
10
|
-
readonly minX?: number;
|
|
11
|
-
readonly minY?: number;
|
|
12
|
-
readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
|
|
13
|
-
readonly series: ReadonlyArray<LineSeries>;
|
|
14
|
-
readonly showLegend?: boolean;
|
|
15
|
-
readonly width?: number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Scatter plot rendered on a braille pixel grid. Each sample lights one
|
|
19
|
-
* sub-cell pixel; overlapping points merge into denser braille glyphs.
|
|
20
|
-
* @param props See {@link Props}.
|
|
21
|
-
* @returns A `ReactElement` containing the plot and an optional legend.
|
|
22
|
-
*/
|
|
23
|
-
export default function ScatterPlot({ axisColor, height, maxX, maxY, minX, minY, palette, series, showLegend, width, }: Props): ReactElement;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
import type { ReactNode, Ref } from "react";
|
|
3
|
-
import type { Props as BoxProps } from "../box.d.ts";
|
|
4
|
-
export interface ControlledScrollViewProps extends BoxProps {
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
debug?: boolean;
|
|
7
|
-
onContentHeightChange?: (height: number, previousHeight: number) => void;
|
|
8
|
-
onItemHeightChange?: (index: number, height: number, previousHeight: number) => void;
|
|
9
|
-
onViewportSizeChange?: (size: {
|
|
10
|
-
height: number;
|
|
11
|
-
width: number;
|
|
12
|
-
}, previousSize: {
|
|
13
|
-
height: number;
|
|
14
|
-
width: number;
|
|
15
|
-
}) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Number of extra items to render above/below the viewport when virtualized.
|
|
18
|
-
* @default 3
|
|
19
|
-
*/
|
|
20
|
-
overscan?: number;
|
|
21
|
-
scrollOffset: number;
|
|
22
|
-
/**
|
|
23
|
-
* Only render items visible in the viewport plus overscan.
|
|
24
|
-
* Items must be measured first (first render always renders all items).
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
virtualize?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface ControlledScrollViewRef {
|
|
30
|
-
getBottomOffset: () => number;
|
|
31
|
-
getContentHeight: () => number;
|
|
32
|
-
getItemHeight: (index: number) => number;
|
|
33
|
-
getItemPosition: (index: number) => {
|
|
34
|
-
height: number;
|
|
35
|
-
top: number;
|
|
36
|
-
} | null;
|
|
37
|
-
getViewportHeight: () => number;
|
|
38
|
-
remeasure: () => void;
|
|
39
|
-
remeasureItem: (index: number) => void;
|
|
40
|
-
}
|
|
41
|
-
export declare const ControlledScrollView: ({ children, debug, onContentHeightChange, onItemHeightChange, onViewportSizeChange, overscan, ref, scrollOffset, virtualize, ...boxProps }: ControlledScrollViewProps & {
|
|
42
|
-
ref?: Ref<ControlledScrollViewRef>;
|
|
43
|
-
}) => React.JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type { ControlledScrollViewProps, ControlledScrollViewRef } from "./controlled-scroll-view.d.ts";
|
|
2
|
-
export { ControlledScrollView } from "./controlled-scroll-view.d.ts";
|
|
3
|
-
export type { ScrollBarPlacement, ScrollBarProps, ScrollBarStyle } from "./scroll-bar.d.ts";
|
|
4
|
-
export { ScrollBar } from "./scroll-bar.d.ts";
|
|
5
|
-
export type { ScrollBarBoxProps } from "./scroll-bar-box.d.ts";
|
|
6
|
-
export { ScrollBarBox } from "./scroll-bar-box.d.ts";
|
|
7
|
-
export type { ScrollAlignment, ScrollListProps, ScrollListRef } from "./scroll-list.d.ts";
|
|
8
|
-
export { ScrollList } from "./scroll-list.d.ts";
|
|
9
|
-
export type { ScrollViewProps, ScrollViewRef } from "./scroll-view.d.ts";
|
|
10
|
-
export { ScrollView } from "./scroll-view.d.ts";
|