@sayknow-cli/tui 0.2.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.
- package/CHANGELOG.md +903 -0
- package/README.md +704 -0
- package/dist/types/autocomplete.d.ts +82 -0
- package/dist/types/bracketed-paste.d.ts +26 -0
- package/dist/types/components/box.d.ts +20 -0
- package/dist/types/components/cancellable-loader.d.ts +21 -0
- package/dist/types/components/editor.d.ts +111 -0
- package/dist/types/components/image.d.ts +16 -0
- package/dist/types/components/input.d.ts +16 -0
- package/dist/types/components/loader.d.ts +14 -0
- package/dist/types/components/markdown.d.ts +64 -0
- package/dist/types/components/select-list.d.ts +46 -0
- package/dist/types/components/settings-list.d.ts +39 -0
- package/dist/types/components/spacer.d.ts +11 -0
- package/dist/types/components/tab-bar.d.ts +56 -0
- package/dist/types/components/text.d.ts +13 -0
- package/dist/types/components/truncated-text.d.ts +10 -0
- package/dist/types/editor-component.d.ts +36 -0
- package/dist/types/fuzzy.d.ts +15 -0
- package/dist/types/index.d.ts +26 -0
- package/dist/types/keybindings.d.ts +189 -0
- package/dist/types/keys.d.ts +208 -0
- package/dist/types/kill-ring.d.ts +27 -0
- package/dist/types/metrics.d.ts +85 -0
- package/dist/types/stdin-buffer.d.ts +50 -0
- package/dist/types/symbols.d.ts +23 -0
- package/dist/types/terminal-capabilities.d.ts +75 -0
- package/dist/types/terminal.d.ts +76 -0
- package/dist/types/ttyid.d.ts +9 -0
- package/dist/types/tui.d.ts +181 -0
- package/dist/types/utils.d.ts +75 -0
- package/package.json +74 -0
- package/src/autocomplete.ts +896 -0
- package/src/bracketed-paste.ts +47 -0
- package/src/components/box.ts +173 -0
- package/src/components/cancellable-loader.ts +40 -0
- package/src/components/editor.ts +2820 -0
- package/src/components/image.ts +90 -0
- package/src/components/input.ts +465 -0
- package/src/components/loader.ts +103 -0
- package/src/components/markdown.ts +1061 -0
- package/src/components/select-list.ts +249 -0
- package/src/components/settings-list.ts +211 -0
- package/src/components/spacer.ts +28 -0
- package/src/components/tab-bar.ts +175 -0
- package/src/components/text.ts +110 -0
- package/src/components/truncated-text.ts +61 -0
- package/src/editor-component.ts +71 -0
- package/src/fuzzy.ts +143 -0
- package/src/index.ts +41 -0
- package/src/keybindings.ts +279 -0
- package/src/keys.ts +537 -0
- package/src/kill-ring.ts +46 -0
- package/src/metrics.ts +382 -0
- package/src/stdin-buffer.ts +444 -0
- package/src/symbols.ts +24 -0
- package/src/terminal-capabilities.ts +537 -0
- package/src/terminal.ts +807 -0
- package/src/ttyid.ts +73 -0
- package/src/tui.ts +1765 -0
- package/src/utils.ts +389 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether SKC may reprogram the keyboard with enhanced input protocols
|
|
3
|
+
* (the Kitty keyboard protocol and the xterm modifyOtherKeys fallback).
|
|
4
|
+
*
|
|
5
|
+
* Enabled by default. Set `SKC_TUI_KEYBOARD_PROTOCOL=0` to leave the keyboard in
|
|
6
|
+
* its default mode. Some terminals — notably Android Termius — break IME
|
|
7
|
+
* composition (e.g. Korean/Hangul syllable composition) while these enhanced
|
|
8
|
+
* modes are active, committing every intermediate composing jamo/syllable
|
|
9
|
+
* instead of only the final character. Disabling the protocol restores normal
|
|
10
|
+
* IME behavior, matching how other TUIs that leave the keyboard untouched render
|
|
11
|
+
* Korean correctly.
|
|
12
|
+
*/
|
|
13
|
+
export declare function keyboardEnhancementEnabled(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Emergency terminal restore - call this from signal/crash handlers
|
|
16
|
+
* Resets terminal state without requiring access to the ProcessTerminal instance
|
|
17
|
+
*/
|
|
18
|
+
export declare function emergencyTerminalRestore(): void;
|
|
19
|
+
/** Terminal-reported appearance (dark/light mode). */
|
|
20
|
+
export type TerminalAppearance = "dark" | "light";
|
|
21
|
+
export interface Terminal {
|
|
22
|
+
start(onInput: (data: string) => void, onResize: () => void): void;
|
|
23
|
+
stop(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Drain stdin before exiting to prevent Kitty key release events from
|
|
26
|
+
* leaking to the parent shell over slow SSH connections.
|
|
27
|
+
* @param maxMs - Maximum time to drain (default: 1000ms)
|
|
28
|
+
* @param idleMs - Exit early if no input arrives within this time (default: 50ms)
|
|
29
|
+
*/
|
|
30
|
+
drainInput(maxMs?: number, idleMs?: number): Promise<void>;
|
|
31
|
+
write(data: string): void;
|
|
32
|
+
get available(): boolean;
|
|
33
|
+
get columns(): number;
|
|
34
|
+
get rows(): number;
|
|
35
|
+
get kittyProtocolActive(): boolean;
|
|
36
|
+
moveBy(lines: number): void;
|
|
37
|
+
hideCursor(): void;
|
|
38
|
+
showCursor(): void;
|
|
39
|
+
clearLine(): void;
|
|
40
|
+
clearFromCursor(): void;
|
|
41
|
+
clearScreen(): void;
|
|
42
|
+
setTitle(title: string): void;
|
|
43
|
+
setProgress(active: boolean): void;
|
|
44
|
+
/**
|
|
45
|
+
* Register a callback for terminal appearance (dark/light) changes.
|
|
46
|
+
* Detection uses OSC 11 background color query with Mode 2031 as a change trigger.
|
|
47
|
+
* Fires when the detected appearance changes, including the initial detection.
|
|
48
|
+
*/
|
|
49
|
+
onAppearanceChange(callback: (appearance: TerminalAppearance) => void): void;
|
|
50
|
+
/** The last detected terminal appearance, or undefined if not yet known. */
|
|
51
|
+
get appearance(): TerminalAppearance | undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Real terminal using process.stdin/stdout
|
|
55
|
+
*/
|
|
56
|
+
export declare class ProcessTerminal implements Terminal {
|
|
57
|
+
#private;
|
|
58
|
+
get kittyProtocolActive(): boolean;
|
|
59
|
+
get appearance(): TerminalAppearance | undefined;
|
|
60
|
+
onAppearanceChange(callback: (appearance: TerminalAppearance) => void): void;
|
|
61
|
+
start(onInput: (data: string) => void, onResize: () => void): void;
|
|
62
|
+
drainInput(maxMs?: number, idleMs?: number): Promise<void>;
|
|
63
|
+
stop(): void;
|
|
64
|
+
write(data: string): void;
|
|
65
|
+
get available(): boolean;
|
|
66
|
+
get columns(): number;
|
|
67
|
+
get rows(): number;
|
|
68
|
+
moveBy(lines: number): void;
|
|
69
|
+
hideCursor(): void;
|
|
70
|
+
showCursor(): void;
|
|
71
|
+
clearLine(): void;
|
|
72
|
+
clearFromCursor(): void;
|
|
73
|
+
clearScreen(): void;
|
|
74
|
+
setTitle(title: string): void;
|
|
75
|
+
setProgress(active: boolean): void;
|
|
76
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Resolve the TTY device path for stdin (fd 0) via POSIX `ttyname(3)`. */
|
|
2
|
+
export declare function getTtyPath(): string | null;
|
|
3
|
+
/**
|
|
4
|
+
* Get a stable identifier for the current terminal.
|
|
5
|
+
* Uses the TTY device path (e.g., /dev/pts/3), falling back to environment
|
|
6
|
+
* variables for terminal multiplexers or terminal emulators.
|
|
7
|
+
* Returns null if no terminal can be identified (e.g., piped input).
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTerminalId(): string | null;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { Terminal } from "./terminal";
|
|
2
|
+
import { visibleWidth } from "./utils";
|
|
3
|
+
type InputListenerResult = {
|
|
4
|
+
consume?: boolean;
|
|
5
|
+
data?: string;
|
|
6
|
+
} | undefined;
|
|
7
|
+
type InputListener = (data: string) => InputListenerResult;
|
|
8
|
+
/**
|
|
9
|
+
* Component interface - all components must implement this
|
|
10
|
+
*/
|
|
11
|
+
export interface Component {
|
|
12
|
+
/**
|
|
13
|
+
* Render the component to lines for the given viewport width
|
|
14
|
+
* @param width - Current viewport width
|
|
15
|
+
* @returns Array of strings, each representing a line
|
|
16
|
+
*/
|
|
17
|
+
render(width: number): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Optional handler for keyboard input when component has focus
|
|
20
|
+
*/
|
|
21
|
+
handleInput?(data: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* If true, component receives key release events (Kitty protocol).
|
|
24
|
+
* Default is false - release events are filtered out.
|
|
25
|
+
*/
|
|
26
|
+
wantsKeyRelease?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Invalidate any cached rendering state.
|
|
29
|
+
* Called when theme changes or when component needs to re-render from scratch.
|
|
30
|
+
*/
|
|
31
|
+
invalidate(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Optional cleanup hook. Called once when the component is permanently
|
|
34
|
+
* removed from the tree via removeChild/clear/dispose. Implementations MUST
|
|
35
|
+
* be idempotent. Components meant to be re-added should be detached, not
|
|
36
|
+
* removed/cleared.
|
|
37
|
+
*/
|
|
38
|
+
dispose?(): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Interface for components that can receive focus and display a hardware cursor.
|
|
42
|
+
* When focused, the component should emit CURSOR_MARKER at the cursor position
|
|
43
|
+
* in its render output. TUI will find this marker and position the hardware
|
|
44
|
+
* cursor there for proper IME candidate window positioning.
|
|
45
|
+
*/
|
|
46
|
+
export interface Focusable {
|
|
47
|
+
/** Set by TUI when focus changes. Component should emit CURSOR_MARKER when true. */
|
|
48
|
+
focused: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** Type guard to check if a component implements Focusable */
|
|
51
|
+
export declare function isFocusable(component: Component | null): component is Component & Focusable;
|
|
52
|
+
/**
|
|
53
|
+
* Cursor position marker - APC (Application Program Command) sequence.
|
|
54
|
+
* This is a zero-width escape sequence that terminals ignore.
|
|
55
|
+
* Components emit this at the cursor position when focused.
|
|
56
|
+
* TUI finds and strips this marker, then positions the hardware cursor there.
|
|
57
|
+
*/
|
|
58
|
+
export declare const CURSOR_MARKER = "\u001B_pi:c\u0007";
|
|
59
|
+
export { visibleWidth };
|
|
60
|
+
/**
|
|
61
|
+
* Anchor position for overlays
|
|
62
|
+
*/
|
|
63
|
+
export type OverlayAnchor = "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center" | "left-center" | "right-center";
|
|
64
|
+
/**
|
|
65
|
+
* Margin configuration for overlays
|
|
66
|
+
*/
|
|
67
|
+
export interface OverlayMargin {
|
|
68
|
+
top?: number;
|
|
69
|
+
right?: number;
|
|
70
|
+
bottom?: number;
|
|
71
|
+
left?: number;
|
|
72
|
+
}
|
|
73
|
+
/** Value that can be absolute (number) or percentage (string like "50%") */
|
|
74
|
+
export type SizeValue = number | `${number}%`;
|
|
75
|
+
/**
|
|
76
|
+
* Options for overlay positioning and sizing.
|
|
77
|
+
* Values can be absolute numbers or percentage strings (e.g., "50%").
|
|
78
|
+
*/
|
|
79
|
+
export interface OverlayOptions {
|
|
80
|
+
/** Width in columns, or percentage of terminal width (e.g., "50%") */
|
|
81
|
+
width?: SizeValue;
|
|
82
|
+
/** Minimum width in columns */
|
|
83
|
+
minWidth?: number;
|
|
84
|
+
/** Maximum height in rows, or percentage of terminal height (e.g., "50%") */
|
|
85
|
+
maxHeight?: SizeValue;
|
|
86
|
+
/** Anchor point for positioning (default: 'center') */
|
|
87
|
+
anchor?: OverlayAnchor;
|
|
88
|
+
/** Horizontal offset from anchor position (positive = right) */
|
|
89
|
+
offsetX?: number;
|
|
90
|
+
/** Vertical offset from anchor position (positive = down) */
|
|
91
|
+
offsetY?: number;
|
|
92
|
+
/** Row position: absolute number, or percentage (e.g., "25%" = 25% from top) */
|
|
93
|
+
row?: SizeValue;
|
|
94
|
+
/** Column position: absolute number, or percentage (e.g., "50%" = centered horizontally) */
|
|
95
|
+
col?: SizeValue;
|
|
96
|
+
/** Margin from terminal edges. Number applies to all sides. */
|
|
97
|
+
margin?: OverlayMargin | number;
|
|
98
|
+
/**
|
|
99
|
+
* Control overlay visibility based on terminal dimensions.
|
|
100
|
+
* If provided, overlay is only rendered when this returns true.
|
|
101
|
+
* Called each render cycle with current terminal dimensions.
|
|
102
|
+
*/
|
|
103
|
+
visible?: (termWidth: number, termHeight: number) => boolean;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Handle returned by showOverlay for controlling the overlay
|
|
107
|
+
*/
|
|
108
|
+
export interface OverlayHandle {
|
|
109
|
+
/** Permanently remove the overlay (cannot be shown again) */
|
|
110
|
+
hide(): void;
|
|
111
|
+
/** Temporarily hide or show the overlay */
|
|
112
|
+
setHidden(hidden: boolean): void;
|
|
113
|
+
/** Check if overlay is temporarily hidden */
|
|
114
|
+
isHidden(): boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Container - a component that contains other components
|
|
118
|
+
*/
|
|
119
|
+
export declare class Container implements Component {
|
|
120
|
+
#private;
|
|
121
|
+
children: Component[];
|
|
122
|
+
addChild(component: Component): void;
|
|
123
|
+
removeChild(component: Component): void;
|
|
124
|
+
/** Remove a child without disposing it (for detach-then-readd reuse). */
|
|
125
|
+
detachChild(component: Component): void;
|
|
126
|
+
clear(): void;
|
|
127
|
+
/** Remove all children without disposing them (for detach-then-readd reuse). */
|
|
128
|
+
detachAll(): void;
|
|
129
|
+
dispose(): void;
|
|
130
|
+
invalidate(): void;
|
|
131
|
+
render(width: number): string[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* TUI - Main class for managing terminal UI with differential rendering
|
|
135
|
+
*/
|
|
136
|
+
export declare class TUI extends Container {
|
|
137
|
+
#private;
|
|
138
|
+
terminal: Terminal;
|
|
139
|
+
/** Global callback for debug key (Shift+Ctrl+D). Called before input is forwarded to focused component. */
|
|
140
|
+
onDebug?: () => void;
|
|
141
|
+
overlayStack: {
|
|
142
|
+
component: Component;
|
|
143
|
+
options?: OverlayOptions;
|
|
144
|
+
preFocus: Component | null;
|
|
145
|
+
hidden: boolean;
|
|
146
|
+
}[];
|
|
147
|
+
constructor(terminal: Terminal, showHardwareCursor?: boolean);
|
|
148
|
+
get fullRedraws(): number;
|
|
149
|
+
getShowHardwareCursor(): boolean;
|
|
150
|
+
setShowHardwareCursor(enabled: boolean): void;
|
|
151
|
+
getClearOnShrink(): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Set whether to trigger full re-render when content shrinks.
|
|
154
|
+
* When true (default), empty rows are cleared when content shrinks.
|
|
155
|
+
* When false, empty rows remain (reduces redraws on slower terminals).
|
|
156
|
+
*/
|
|
157
|
+
setClearOnShrink(enabled: boolean): void;
|
|
158
|
+
setFocus(component: Component | null): void;
|
|
159
|
+
/**
|
|
160
|
+
* Show an overlay component with configurable positioning and sizing.
|
|
161
|
+
* Returns a handle to control the overlay's visibility.
|
|
162
|
+
*/
|
|
163
|
+
showOverlay(component: Component, options?: OverlayOptions): OverlayHandle;
|
|
164
|
+
/** Hide the topmost overlay and restore previous focus. */
|
|
165
|
+
hideOverlay(): void;
|
|
166
|
+
/** Check if there are any visible overlays */
|
|
167
|
+
hasOverlay(): boolean;
|
|
168
|
+
invalidate(): void;
|
|
169
|
+
start(): void;
|
|
170
|
+
get terminalAvailable(): boolean;
|
|
171
|
+
addInputListener(listener: InputListener): () => void;
|
|
172
|
+
removeInputListener(listener: InputListener): void;
|
|
173
|
+
stop(): void;
|
|
174
|
+
requestRender(force?: boolean, source?: string): void;
|
|
175
|
+
getLineRenderCacheStats(): {
|
|
176
|
+
normalizationSize: number;
|
|
177
|
+
truncationSize: number;
|
|
178
|
+
normalizationLimit: number;
|
|
179
|
+
truncationLimit: number;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Ellipsis, type ExtractSegmentsResult, type SliceResult } from "@sayknow-cli/natives";
|
|
2
|
+
export { Ellipsis } from "@sayknow-cli/natives";
|
|
3
|
+
export { getDefaultTabWidth, getIndentation } from "@sayknow-cli/utils";
|
|
4
|
+
export declare function isPrintableAscii(text: string): boolean;
|
|
5
|
+
export declare function sliceWithWidth(line: string, startCol: number, length: number, strict?: boolean | null): SliceResult;
|
|
6
|
+
export declare function truncateToWidth(text: string, maxWidth: number, ellipsisKind?: Ellipsis | null, pad?: boolean | null): string;
|
|
7
|
+
export declare function wrapTextWithAnsi(text: string, width: number): string[];
|
|
8
|
+
export declare function extractSegments(line: string, beforeEnd: number, afterStart: number, afterLen: number, strictAfter: boolean): ExtractSegmentsResult;
|
|
9
|
+
/**
|
|
10
|
+
* Tab width in columns for `file`, using `process.cwd()` as the project root for relative paths.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getIndentationNoescape(file?: string): number;
|
|
13
|
+
export declare function replaceTabs(text: string, file?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns a string of n spaces. Uses a pre-allocated buffer for efficiency.
|
|
16
|
+
*/
|
|
17
|
+
export declare function padding(n: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get the shared grapheme segmenter instance.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getSegmenter(): Intl.Segmenter;
|
|
22
|
+
export declare function visibleWidthRaw(str: string): number;
|
|
23
|
+
/**
|
|
24
|
+
* Calculate the visible width of a string in terminal columns.
|
|
25
|
+
*/
|
|
26
|
+
export declare function visibleWidth(str: string): number;
|
|
27
|
+
/**
|
|
28
|
+
* Normalize text for terminal output without changing logical editor content.
|
|
29
|
+
* Some terminals render canonically decomposed Hangul jamo or precomposed
|
|
30
|
+
* Thai/Lao AM vowels inconsistently during differential repaint. Emit a stable
|
|
31
|
+
* terminal form while keeping the component/source strings unchanged.
|
|
32
|
+
*/
|
|
33
|
+
export declare function normalizeTerminalOutput(str: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Check if a character is whitespace.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isWhitespaceChar(char: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Check if a character is punctuation.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isPunctuationChar(char: string): boolean;
|
|
42
|
+
export type WordNavKind = "whitespace" | "delimiter" | "cjk" | "word" | "other";
|
|
43
|
+
/**
|
|
44
|
+
* Coarse Unicode-aware character classification for word navigation (Option/Alt + Left/Right).
|
|
45
|
+
* This intentionally avoids language-specific word segmentation for predictability across scripts.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getWordNavKind(grapheme: string): WordNavKind;
|
|
48
|
+
export declare function isWordNavJoiner(grapheme: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Move the cursor one "word" to the left using Unicode-aware coarse navigation.
|
|
51
|
+
*
|
|
52
|
+
* Returns a new cursor index in the range [0, text.length].
|
|
53
|
+
*/
|
|
54
|
+
export declare function moveWordLeft(text: string, cursor: number): number;
|
|
55
|
+
/**
|
|
56
|
+
* Move the cursor one "word" to the right using Unicode-aware coarse navigation.
|
|
57
|
+
*
|
|
58
|
+
* Returns a new cursor index in the range [0, text.length].
|
|
59
|
+
*/
|
|
60
|
+
export declare function moveWordRight(text: string, cursor: number): number;
|
|
61
|
+
/**
|
|
62
|
+
* Apply background color to a line, padding to full width.
|
|
63
|
+
*
|
|
64
|
+
* @param line - Line of text (may contain ANSI codes)
|
|
65
|
+
* @param width - Total width to pad to
|
|
66
|
+
* @param bgFn - Background color function
|
|
67
|
+
* @returns Line with background applied and padded to width
|
|
68
|
+
*/
|
|
69
|
+
export declare function applyBackgroundToLine(line: string, width: number, bgFn: (text: string) => string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Extract a range of visible columns from a line. Handles ANSI codes and wide chars.
|
|
72
|
+
*
|
|
73
|
+
* @param strict - If true, exclude wide chars at boundary that would extend past the range
|
|
74
|
+
*/
|
|
75
|
+
export declare function sliceByColumn(line: string, startCol: number, length: number, strict?: boolean): string;
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"name": "@sayknow-cli/tui",
|
|
4
|
+
"version": "0.2.2",
|
|
5
|
+
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
|
+
"homepage": "https://github.com/jaybeyond/Sayknow_CLI",
|
|
7
|
+
"author": "jaybeyond",
|
|
8
|
+
"contributors": [
|
|
9
|
+
"Mario Zechner"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/jaybeyond/Sayknow_CLI.git",
|
|
15
|
+
"directory": "packages/tui"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/jaybeyond/Sayknow_CLI/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"tui",
|
|
22
|
+
"terminal",
|
|
23
|
+
"ui",
|
|
24
|
+
"text-editor",
|
|
25
|
+
"differential-rendering",
|
|
26
|
+
"typescript",
|
|
27
|
+
"cli"
|
|
28
|
+
],
|
|
29
|
+
"main": "./src/index.ts",
|
|
30
|
+
"types": "./dist/types/index.d.ts",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"check": "biome check . && bun run check:types",
|
|
33
|
+
"check:types": "tsgo -p tsconfig.json --noEmit",
|
|
34
|
+
"lint": "biome lint .",
|
|
35
|
+
"test": "bun test test/*.test.ts",
|
|
36
|
+
"test:perf": "PI_TUI_PERF_GATES=1 bun test test/perf-gates.test.ts",
|
|
37
|
+
"fix": "biome check --write --unsafe .",
|
|
38
|
+
"fmt": "biome format --write ."
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@sayknow-cli/natives": "0.2.2",
|
|
42
|
+
"@sayknow-cli/utils": "0.2.2",
|
|
43
|
+
"lru-cache": "11.3.6",
|
|
44
|
+
"marked": "^18.0.3"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"chalk": "^5.6.2",
|
|
48
|
+
"@xterm/headless": "^6.0.0"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"bun": ">=1.3.14"
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
"src",
|
|
55
|
+
"README.md",
|
|
56
|
+
"CHANGELOG.md",
|
|
57
|
+
"dist/types"
|
|
58
|
+
],
|
|
59
|
+
"exports": {
|
|
60
|
+
".": {
|
|
61
|
+
"types": "./dist/types/index.d.ts",
|
|
62
|
+
"import": "./src/index.ts"
|
|
63
|
+
},
|
|
64
|
+
"./*": {
|
|
65
|
+
"types": "./dist/types/*.d.ts",
|
|
66
|
+
"import": "./src/*.ts"
|
|
67
|
+
},
|
|
68
|
+
"./components/*": {
|
|
69
|
+
"types": "./dist/types/components/*.d.ts",
|
|
70
|
+
"import": "./src/components/*.ts"
|
|
71
|
+
},
|
|
72
|
+
"./*.js": "./src/*.ts"
|
|
73
|
+
}
|
|
74
|
+
}
|