xonecas.io
70160
Ce

cel-tui / files

cel-tui / packages / components / src / index.ts

1.8 KB
1/**
2 * @module @cel-tui/components
3 *
4 * Pre-made components built with `@cel-tui/core` primitives.
5 * These are convenience wrappers for common UI patterns.
6 *
7 * @example
8 * ```ts
9 * import { Spacer, Divider, VDivider, Button, Select, VirtualList, Spinner, Markdown, SyntaxHighlight } from "@cel-tui/components";
10 *
11 * HStack({ height: 1 }, [
12 *   Text("Title", { bold: true }),
13 *   Spacer(),
14 *   Button("[OK]", { onClick: handleOk }),
15 * ])
16 * ```
17 */
18
19export { Button, type ButtonProps } from "./button.js";
20export { Divider, type DividerProps } from "./divider.js";
21export {
22  type BlockToken,
23  type InlineSpan,
24  Markdown,
25  type MarkdownProps,
26  type MarkdownTheme,
27  tokenize,
28} from "./markdown.js";
29export {
30  type NormalizedItem,
31  prefixFilter,
32  Select,
33  type SelectFilter,
34  type SelectInstance,
35  type SelectItem,
36  type SelectModel,
37  type SelectProps,
38  type SelectRowContext,
39  type SelectRowRenderer,
40  type SelectState,
41} from "./select.js";
42export { Spacer } from "./spacer.js";
43export {
44  DEFAULT_SPINNER_FRAMES,
45  Spinner,
46  type SpinnerInstance,
47  type SpinnerProps,
48} from "./spinner.js";
49export {
50  createSyntaxHighlight,
51  SyntaxHighlight,
52  type SyntaxHighlightInstance,
53  type SyntaxHighlightNativeTheme,
54  type SyntaxHighlightProps,
55  type SyntaxHighlightTheme,
56  type SyntaxHighlightThemeRegistration,
57  type SyntaxHighlightThemeTokenColor,
58} from "./syntax-highlight.js";
59export {
60  createTicker,
61  type Ticker,
62  type TickerOptions,
63  type TickerTick,
64} from "./ticker.js";
65export { VDivider, type VDividerProps } from "./vdivider.js";
66export {
67  VirtualList,
68  type VirtualListInstance,
69  type VirtualListOptions,
70  type VirtualListProps,
71  type VirtualListScrollHandler,
72  type VirtualListScrollReason,
73  type VirtualListState,
74} from "./virtual-list.js";