@linxiraos/pi-tui 1.1.0 → 1.1.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 (50) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/THIRD-PARTY-NOTICES.txt +22909 -0
  3. package/dist/types/autocomplete.d.ts +127 -0
  4. package/dist/types/bracketed-paste.d.ts +51 -0
  5. package/dist/types/components/box.d.ts +31 -0
  6. package/dist/types/components/cancellable-loader.d.ts +21 -0
  7. package/dist/types/components/composer/borderless.d.ts +8 -0
  8. package/dist/types/components/composer/box.d.ts +2 -0
  9. package/dist/types/components/composer/claude.d.ts +8 -0
  10. package/dist/types/components/composer/field.d.ts +3 -0
  11. package/dist/types/components/composer/index.d.ts +9 -0
  12. package/dist/types/components/composer/pi.d.ts +2 -0
  13. package/dist/types/components/composer/rail.d.ts +3 -0
  14. package/dist/types/components/composer/registry.d.ts +12 -0
  15. package/dist/types/components/composer/rule.d.ts +7 -0
  16. package/dist/types/components/composer/types.d.ts +90 -0
  17. package/dist/types/components/editor.d.ts +213 -0
  18. package/dist/types/components/image.d.ts +162 -0
  19. package/dist/types/components/input.d.ts +25 -0
  20. package/dist/types/components/loader.d.ts +25 -0
  21. package/dist/types/components/markdown.d.ts +86 -0
  22. package/dist/types/components/scroll-view.d.ts +62 -0
  23. package/dist/types/components/select-list.d.ts +78 -0
  24. package/dist/types/components/settings-list.d.ts +129 -0
  25. package/dist/types/components/spacer.d.ts +11 -0
  26. package/dist/types/components/tab-bar.d.ts +89 -0
  27. package/dist/types/components/text.d.ts +27 -0
  28. package/dist/types/components/truncated-text.d.ts +10 -0
  29. package/dist/types/deccara.d.ts +49 -0
  30. package/dist/types/desktop-notify.d.ts +52 -0
  31. package/dist/types/editor-component.d.ts +38 -0
  32. package/dist/types/fuzzy.d.ts +48 -0
  33. package/dist/types/index.d.ts +33 -0
  34. package/dist/types/keybindings.d.ts +202 -0
  35. package/dist/types/keys.d.ts +210 -0
  36. package/dist/types/kill-ring.d.ts +20 -0
  37. package/dist/types/kitty-graphics.d.ts +76 -0
  38. package/dist/types/latex-block.d.ts +8 -0
  39. package/dist/types/latex-to-unicode.d.ts +50 -0
  40. package/dist/types/loop-watchdog.d.ts +49 -0
  41. package/dist/types/mouse.d.ts +67 -0
  42. package/dist/types/stdin-buffer.d.ts +60 -0
  43. package/dist/types/symbols.d.ts +25 -0
  44. package/dist/types/terminal-capabilities.d.ts +338 -0
  45. package/dist/types/terminal.d.ts +215 -0
  46. package/dist/types/tmux.d.ts +6 -0
  47. package/dist/types/ttyid.d.ts +9 -0
  48. package/dist/types/tui.d.ts +332 -0
  49. package/dist/types/utils.d.ts +112 -0
  50. package/package.json +71 -68
@@ -0,0 +1,332 @@
1
+ import { ImageBudget } from "./components/image.js";
2
+ import { type Terminal } from "./terminal.js";
3
+ import { visibleWidth } from "./utils.js";
4
+ type InputListenerResult = {
5
+ consume?: boolean;
6
+ data?: string;
7
+ } | undefined;
8
+ type InputListener = (data: string) => InputListenerResult;
9
+ type StartListener = () => void;
10
+ export interface RenderTimer {
11
+ cancel(): void;
12
+ }
13
+ export interface RenderScheduler {
14
+ now(): number;
15
+ scheduleImmediate(callback: () => void): void;
16
+ scheduleRender(callback: () => void, delayMs: number): RenderTimer;
17
+ }
18
+ export interface TUIOptions {
19
+ renderScheduler?: RenderScheduler;
20
+ }
21
+ /** Physical terminal dimensions supplied to a frame provider. */
22
+ export interface ViewportSize {
23
+ readonly columns: number;
24
+ readonly rows: number;
25
+ }
26
+ /** Immutable finalized rows offered until the terminal accepts this identifier. */
27
+ export interface HistoryBatch {
28
+ readonly id: number;
29
+ readonly rows: readonly string[];
30
+ }
31
+ /** One history append and the complete mutable viewport for a terminal frame. */
32
+ export interface TerminalFramePlan {
33
+ readonly history?: HistoryBatch;
34
+ readonly viewport: readonly string[];
35
+ }
36
+ /** Produces bounded terminal frames and retires acknowledged history batches. */
37
+ export interface TerminalFrameProvider {
38
+ renderFrame(viewport: ViewportSize): TerminalFramePlan;
39
+ acknowledgeHistory(id: number): void;
40
+ /** Full semantic viewport used only on the transient resize buffer. */
41
+ renderResizeFrame?(viewport: ViewportSize): readonly string[];
42
+ /** Re-offer finalized history after a display reset or resize replay. */
43
+ resetHistory?(): void;
44
+ }
45
+ export interface TUIStartOptions {
46
+ /** Clear saved native scrollback before the first paint. */
47
+ clearScrollback?: boolean;
48
+ /**
49
+ * Paint without owning stdin: the terminal stays in cooked mode (kernel
50
+ * echo + line editing at the hardware cursor) until {@link TUI.enableInput}
51
+ * switches to raw input and replays the kernel-buffered keystrokes.
52
+ */
53
+ deferInput?: boolean;
54
+ }
55
+ /**
56
+ * Component interface - all components must implement this
57
+ *
58
+ * Render contract: the returned array (and its rows) belongs to the component.
59
+ * Callers MUST NOT mutate it — components are allowed to return a cached array
60
+ * and will return the exact same reference for as long as their rendered
61
+ * content is unchanged. Conversely, a component MUST return a fresh array
62
+ * reference whenever its content changed; reference equality across two
63
+ * render() calls is the engine's proof that the rows are byte-identical
64
+ * (containers memoize their concatenation on it, and the TUI derives the
65
+ * frame's stable prefix from it). A component that mutates a previously
66
+ * returned array in place must implement {@link RenderStablePrefix} to declare
67
+ * which leading rows survived.
68
+ */
69
+ export interface Component {
70
+ /**
71
+ * Render the component to an array of physical rows at the given width.
72
+ * The result is component-owned and `readonly` to the caller; an unchanged
73
+ * component may (and should) return the same array reference it returned
74
+ * last time.
75
+ */
76
+ render(width: number): readonly string[];
77
+ /**
78
+ * Optional handler for keyboard input when component has focus
79
+ */
80
+ handleInput?(data: string): void;
81
+ /**
82
+ * If true, component receives key release events (Kitty protocol).
83
+ * Default is false - release events are filtered out.
84
+ */
85
+ wantsKeyRelease?: boolean;
86
+ /**
87
+ * Optional hook to invalidate any cached rendering state.
88
+ * Called when theme changes or when component needs to re-render from scratch.
89
+ */
90
+ invalidate?(): void;
91
+ /**
92
+ * Optional hook to set whether this component ignores tight layout mode.
93
+ */
94
+ setIgnoreTight?(ignore: boolean): any;
95
+ /**
96
+ * Optional teardown. Called when the component is permanently removed from
97
+ * the live tree (e.g. a transcript reset). Release timers, intervals, and
98
+ * subscriptions here. Must be idempotent. Containers propagate dispose to
99
+ * their children; leaf components without resources may omit it.
100
+ */
101
+ dispose?(): void;
102
+ }
103
+ /** Lets an overlay root delegate keyboard focus to components it owns. */
104
+ export interface OverlayFocusOwner {
105
+ /** Returns true when `component` is a focus target inside this overlay. */
106
+ ownsOverlayFocusTarget(component: Component): boolean;
107
+ }
108
+ /**
109
+ * Interface for components that can receive focus and display a cursor.
110
+ * When focused, the component should emit CURSOR_MARKER at the cursor position
111
+ * in its render output. TUI will find this marker and position the hardware
112
+ * cursor there for proper IME candidate window positioning.
113
+ *
114
+ * Components that can switch between terminal-cursor and software-cursor
115
+ * rendering expose `setUseTerminalCursor`; TUI keeps that mode in sync with
116
+ * its resolved hardware-cursor preference whenever focus or the preference
117
+ * changes.
118
+ */
119
+ export interface Focusable {
120
+ /** Set by TUI when focus changes. Component should emit CURSOR_MARKER when true. */
121
+ focused: boolean;
122
+ /** Set by TUI when hardware cursor rendering is enabled or disabled. */
123
+ setUseTerminalCursor?(useTerminalCursor: boolean): void;
124
+ }
125
+ /** Options for scheduling a TUI render. */
126
+ export interface RenderRequestOptions {
127
+ /** Clear terminal scrollback for intentional transcript replacement. */
128
+ clearScrollback?: boolean;
129
+ }
130
+ /**
131
+ * Controls how a settled terminal resize refreshes native history.
132
+ *
133
+ * `append` replays the current transcript below retained history, `rebuild`
134
+ * clears history before replaying it, and `preserve` repaints only the viewport.
135
+ */
136
+ export type ResizeScrollbackMode = "append" | "rebuild" | "preserve";
137
+ /** Type guard to check if a component implements Focusable */
138
+ export declare function isFocusable(component: Component | null): component is Component & Focusable;
139
+ /**
140
+ * Cursor position marker - APC (Application Program Command) sequence.
141
+ * This is a zero-width escape sequence that terminals ignore.
142
+ * Components emit this at the cursor position when focused.
143
+ * TUI finds and strips this marker, then positions the hardware cursor there.
144
+ */
145
+ export declare const CURSOR_MARKER = "\u001B_pi:c\u0007";
146
+ export { visibleWidth };
147
+ /**
148
+ * Anchor position for overlays
149
+ */
150
+ export type OverlayAnchor = "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center" | "left-center" | "right-center";
151
+ /**
152
+ * Margin configuration for overlays
153
+ */
154
+ export interface OverlayMargin {
155
+ top?: number;
156
+ right?: number;
157
+ bottom?: number;
158
+ left?: number;
159
+ }
160
+ /** Value that can be absolute (number) or percentage (string like "50%") */
161
+ export type SizeValue = number | `${number}%`;
162
+ /**
163
+ * Options for overlay positioning and sizing.
164
+ * Values can be absolute numbers or percentage strings (e.g., "50%").
165
+ */
166
+ export interface OverlayOptions {
167
+ /** Width in columns, or percentage of terminal width (e.g., "50%") */
168
+ width?: SizeValue;
169
+ /** Minimum width in columns */
170
+ minWidth?: number;
171
+ /** Maximum height in rows, or percentage of terminal height (e.g., "50%") */
172
+ maxHeight?: SizeValue;
173
+ /** Anchor point for positioning (default: 'center') */
174
+ anchor?: OverlayAnchor;
175
+ /** Horizontal offset from anchor position (positive = right) */
176
+ offsetX?: number;
177
+ /** Vertical offset from anchor position (positive = down) */
178
+ offsetY?: number;
179
+ /** Row position: absolute number, or percentage (e.g., "25%" = 25% from top) */
180
+ row?: SizeValue;
181
+ /** Column position: absolute number, or percentage (e.g., "50%" = centered horizontally) */
182
+ col?: SizeValue;
183
+ /** Margin from terminal edges. Number applies to all sides. */
184
+ margin?: OverlayMargin | number;
185
+ /**
186
+ * Control overlay visibility based on terminal dimensions.
187
+ * If provided, overlay is only rendered when this returns true.
188
+ * Called each render cycle with current terminal dimensions.
189
+ */
190
+ visible?: (termWidth: number, termHeight: number) => boolean;
191
+ /**
192
+ * Borrow the terminal's alternate screen buffer for this overlay's lifetime
193
+ * (vim/less idiom). While the topmost visible overlay sets this, the engine
194
+ * paints only the modal on the alt screen and emits no ED3 / scrollback
195
+ * bytes, so the transcript on the normal screen stays untouched and is not
196
+ * scrollable behind the modal. Defaults off — all other overlays are
197
+ * unchanged and still draw over the transcript on the normal screen.
198
+ */
199
+ fullscreen?: boolean;
200
+ /**
201
+ * Enable terminal mouse reporting while fullscreen. Defaults on; disable it
202
+ * when native terminal text selection takes precedence over pointer events.
203
+ */
204
+ mouseTracking?: boolean;
205
+ }
206
+ /**
207
+ * Handle returned by showOverlay for controlling the overlay
208
+ */
209
+ export interface OverlayHandle {
210
+ /** Permanently remove the overlay (cannot be shown again) */
211
+ hide(): void;
212
+ /** Temporarily hide or show the overlay */
213
+ setHidden(hidden: boolean): void;
214
+ /** Check if overlay is temporarily hidden */
215
+ isHidden(): boolean;
216
+ }
217
+ /**
218
+ * Container - a component that contains other components
219
+ */
220
+ export declare class Container implements Component {
221
+ #private;
222
+ children: Component[];
223
+ setIgnoreTight(ignore: boolean): this;
224
+ addChild(component: Component): void;
225
+ removeChild(component: Component): void;
226
+ clear(): void;
227
+ /** Dispose every child, then detach it from this container. */
228
+ disposeChildren(): void;
229
+ invalidate(): void;
230
+ /**
231
+ * Propagate teardown to children. Call when the container's children are
232
+ * being permanently discarded (not when they are detached for reuse — use
233
+ * {@link clear} for that). Idempotent per child via each child's own dispose.
234
+ */
235
+ dispose(): void;
236
+ render(width: number): readonly string[];
237
+ }
238
+ /**
239
+ * Merge runs of byte-adjacent SGR sequences (`CSI [0-9;:]* m`) into one. Only
240
+ * CSI-SGR sequences are touched; text, cursor moves, OSC, hyperlinks and image
241
+ * payloads pass through verbatim. Returns the original reference when nothing
242
+ * merges, so SGR-light lines incur only a single `indexOf` scan.
243
+ */
244
+ export declare function coalesceAdjacentSgr(line: string): string;
245
+ /**
246
+ * TUI - Main class for managing terminal UI with differential rendering
247
+ */
248
+ export declare class TUI extends Container {
249
+ #private;
250
+ terminal: Terminal;
251
+ /** Global callback for debug key (Shift+Ctrl+D). Called before input is forwarded to focused component. */
252
+ onDebug?: () => void;
253
+ overlayStack: {
254
+ component: Component;
255
+ options?: OverlayOptions;
256
+ preFocus: Component | null;
257
+ hidden: boolean;
258
+ }[];
259
+ constructor(terminal: Terminal, showHardwareCursor?: boolean, options?: TUIOptions);
260
+ /** Install the product-owned bounded frame provider. */
261
+ setFrameProvider(provider: TerminalFrameProvider | undefined): void;
262
+ get fullRedraws(): number;
263
+ /** Shared budget that caps how many inline images render as live graphics. */
264
+ get imageBudget(): ImageBudget;
265
+ /**
266
+ * Set how many inline images stay live graphics before older ones fall back
267
+ * to text (`0` disables the cap). Older images are hidden via a graphics purge
268
+ * plus a full redraw on the frame after a new image exceeds the cap.
269
+ */
270
+ setMaxInlineImages(cap: number): void;
271
+ /** Return how settled resizes refresh native scrollback. */
272
+ getResizeScrollback(): ResizeScrollbackMode;
273
+ /** Set how settled resizes refresh native scrollback. */
274
+ setResizeScrollback(mode: ResizeScrollbackMode): void;
275
+ /** Delete every tracked Kitty image from the terminal graphics store. */
276
+ clearInlineImages(): void;
277
+ getShowHardwareCursor(): boolean;
278
+ setShowHardwareCursor(enabled: boolean): void;
279
+ /**
280
+ * Whether DEC 2026 synchronized-output wrappers are currently emitted around
281
+ * paints. Starts from conservative terminal/env detection and is reconciled at
282
+ * runtime against the terminal's DECRQM mode-2026 report — enabled on a
283
+ * positive report, disabled on a negative one.
284
+ */
285
+ get synchronizedOutput(): boolean;
286
+ setFocus(component: Component | null): void;
287
+ /** Component currently receiving keyboard input, if any. */
288
+ getFocused(): Component | null;
289
+ /**
290
+ * Show an overlay component with configurable positioning and sizing.
291
+ * Returns a handle to control the overlay's visibility.
292
+ */
293
+ showOverlay(component: Component, options?: OverlayOptions): OverlayHandle;
294
+ /** Hide the topmost overlay and restore previous focus. */
295
+ hideOverlay(): void;
296
+ /** Check if there are any visible overlays */
297
+ hasOverlay(): boolean;
298
+ invalidate(): void;
299
+ start(options?: TUIStartOptions): void;
300
+ /**
301
+ * Take ownership of stdin after a `deferInput` start: raw mode, input
302
+ * handlers, and the response-eliciting capability probes start() skipped.
303
+ * Keystrokes typed in cooked mode meanwhile arrive through the normal input
304
+ * path. Idempotent; no-op when input was never deferred.
305
+ */
306
+ enableInput(): void;
307
+ addStartListener(listener: StartListener): () => void;
308
+ addInputListener(listener: InputListener): () => void;
309
+ removeInputListener(listener: InputListener): void;
310
+ stop(): void;
311
+ /**
312
+ * Destructive user-gesture reset: invalidate every component, erase native
313
+ * history, then repaint from row zero. Reachable only from explicit gestures (session
314
+ * replace, /tree, an explicit clear) — never from ordinary rendering,
315
+ * animation, resize, or finalization.
316
+ */
317
+ resetDisplay(): void;
318
+ requestRender(force?: boolean, options?: RenderRequestOptions): void;
319
+ /**
320
+ * Paint a forced frame synchronously when startup must hand off an already
321
+ * visible component tree before further async initialization. Same as
322
+ * {@link requestRender} minus the `setImmediate` hop.
323
+ */
324
+ renderNow(options?: RenderRequestOptions): void;
325
+ /**
326
+ * Schedule a render on behalf of `component` after a self-contained change
327
+ * (spinner frame, blink). Frames always compose the bounded viewport from
328
+ * scratch — retired blocks no longer render — so a scoped request is simply
329
+ * an ordinary render.
330
+ */
331
+ requestComponentRender(_component: Component): void;
332
+ }
@@ -0,0 +1,112 @@
1
+ import { Ellipsis, type ExtractSegmentsResult, type SliceResult } from "@linxiraos/pi-natives";
2
+ export { Ellipsis } from "@linxiraos/pi-natives";
3
+ export { DEFAULT_TAB_WIDTH } from "@linxiraos/pi-utils";
4
+ export type HangulCompatibilityJamoWidth = "platform" | "unicode" | 1 | 2;
5
+ export declare function getHangulCompatibilityJamoWidth(): HangulCompatibilityJamoWidth;
6
+ export declare function getWidthConfigEpoch(): number;
7
+ /** Publish exact per-line visible widths for a rendered lines array. */
8
+ export declare function publishLineWidths(lines: readonly string[], widths: readonly number[]): void;
9
+ /** Exact per-line visible widths for an unchanged `lines` array under the current width config. */
10
+ export declare function getPublishedLineWidths(lines: readonly string[]): readonly number[] | undefined;
11
+ export declare function setHangulCompatibilityJamoWidth(width: HangulCompatibilityJamoWidth): boolean;
12
+ export declare function resetHangulCompatibilityJamoWidthForTests(): void;
13
+ export type TextSizingScale = 1 | 2 | 3;
14
+ export type TextSizingVerticalAlign = "top" | "bottom" | "center";
15
+ export type TextSizingHorizontalAlign = "left" | "right" | "center";
16
+ export interface TextSizingOptions {
17
+ scale?: TextSizingScale;
18
+ widthCells?: number;
19
+ verticalAlign?: TextSizingVerticalAlign;
20
+ horizontalAlign?: TextSizingHorizontalAlign;
21
+ }
22
+ /**
23
+ * Encode a plain-text span using Kitty's OSC 66 text-sizing protocol. The TUI
24
+ * emits only safe UTF-8 payloads and ST terminators so its ANSI parser and the
25
+ * terminal agree on span boundaries.
26
+ */
27
+ export declare function encodeTextSized(text: string, options?: TextSizingOptions): string;
28
+ export declare function sliceWithWidth(line: string, startCol: number, length: number, strict?: boolean | null): SliceResult;
29
+ export declare function truncateToWidth(text: string, maxWidth: number, ellipsisKind?: Ellipsis | null | "", pad?: boolean | null): string;
30
+ export declare function wrapTextWithAnsi(text: string, width: number): string[];
31
+ export declare function extractSegments(line: string, beforeEnd: number, afterStart: number, afterLen: number, strictAfter: boolean): ExtractSegmentsResult;
32
+ export declare function replaceTabs(text: string): string;
33
+ /**
34
+ * Returns a string of n spaces. Uses a pre-allocated buffer for efficiency.
35
+ */
36
+ export declare function padding(n: number): string;
37
+ /**
38
+ * Get the shared grapheme segmenter instance.
39
+ */
40
+ export declare function getSegmenter(): Intl.Segmenter;
41
+ /**
42
+ * Visible width of a string in terminal columns, excluding ANSI/OSC escapes.
43
+ *
44
+ * `Bun.stringWidth` does the heavy lifting (UAX#11 width tables + ANSI/OSC
45
+ * stripping); this adds the corrections it omits — tabs (expanded to
46
+ * `tabWidth` cells), OSC 66 text-sizing payloads (scaled by `s=`), and APC
47
+ * sequences (counted as printable by Bun, actually zero cells).
48
+ */
49
+ export declare function visibleWidth(str: string): number;
50
+ /**
51
+ * Scaled spans must bypass wrapping/padding and, when scaled up, reserve the
52
+ * terminal rows their multicell glyphs flow into.
53
+ */
54
+ export declare function isOsc66Line(line: string): boolean;
55
+ /**
56
+ * Largest `s=` scale among the OSC 66 spans in a line (1 when none is scaled).
57
+ * A scale-`s` heading occupies `s` terminal rows, so the `s - 1` blank rows
58
+ * beneath it are the glyph's lower half and must never be erased or overdrawn.
59
+ */
60
+ export declare function osc66MaxScale(line: string): number;
61
+ /**
62
+ * Normalize text for terminal output without changing logical editor content.
63
+ * Some terminals render precomposed Thai/Lao AM vowels inconsistently during
64
+ * differential repaint. Their compatibility decompositions have the same cell
65
+ * width but avoid stale-cell artifacts in terminal renderers.
66
+ */
67
+ export declare function normalizeTerminalOutput(str: string): string;
68
+ /**
69
+ * Check if a character is whitespace.
70
+ */
71
+ export declare function isWhitespaceChar(char: string): boolean;
72
+ /**
73
+ * Check if a character is punctuation.
74
+ */
75
+ export declare function isPunctuationChar(char: string): boolean;
76
+ export type WordNavKind = "whitespace" | "delimiter" | "cjk" | "word" | "other";
77
+ /**
78
+ * Coarse Unicode-aware character classification for word navigation (Option/Alt + Left/Right).
79
+ * This intentionally avoids language-specific word segmentation for predictability across scripts.
80
+ */
81
+ export declare function getWordNavKind(grapheme: string): WordNavKind;
82
+ export declare function isWordNavJoiner(grapheme: string): boolean;
83
+ /**
84
+ * Move the cursor one "word" to the left using Unicode-aware coarse navigation.
85
+ *
86
+ * Returns a new cursor index in the range [0, text.length].
87
+ */
88
+ export declare function moveWordLeft(text: string, cursor: number): number;
89
+ /**
90
+ * Move the cursor one "word" to the right using Unicode-aware coarse navigation.
91
+ *
92
+ * Returns a new cursor index in the range [0, text.length].
93
+ */
94
+ export declare function moveWordRight(text: string, cursor: number): number;
95
+ /**
96
+ * Apply background color to a line, padding to full width.
97
+ *
98
+ * @param line - Line of text (may contain ANSI codes)
99
+ * @param width - Total width to pad to
100
+ * @param bgFn - Background color function
101
+ * @returns Line with background applied and padded to width
102
+ */
103
+ export declare function applyBackgroundToLine(line: string, width: number, bgFn: (text: string) => string): string;
104
+ /**
105
+ * Extract a range of visible columns from a line. Handles ANSI codes and wide chars.
106
+ *
107
+ * @param strict - If true, exclude wide chars at boundary that would extend past the range
108
+ */
109
+ export declare function sliceByColumn(line: string, startCol: number, length: number, strict?: boolean): string;
110
+ export declare function setTuiTight(tight: boolean): void;
111
+ export declare function isTuiTight(): boolean;
112
+ export declare function getPaddingX(basePadding: number): number;
package/package.json CHANGED
@@ -1,69 +1,72 @@
1
1
  {
2
- "type": "module",
3
- "name": "@linxiraos/pi-tui",
4
- "version": "1.1.0",
5
- "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
- "homepage": "https://omp.sh",
7
- "author": "Stencil Labs, Inc.",
8
- "contributors": [
9
- "Mario Zechner"
10
- ],
11
- "license": "MIT",
12
- "repository": {
13
- "type": "git",
14
- "url": "git+https://github.com/can1357/oh-my-pi.git",
15
- "directory": "packages/tui"
16
- },
17
- "bugs": {
18
- "url": "https://github.com/can1357/oh-my-pi/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": "./src/index.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 --parallel test/*.test.ts",
36
- "fix": "biome check --write --unsafe .",
37
- "fmt": "biome format --write ."
38
- },
39
- "dependencies": {
40
- "@linxiraos/pi-natives": "catalog:",
41
- "@linxiraos/pi-utils": "catalog:"
42
- },
43
- "devDependencies": {
44
- "kitty-vt-wasm": "catalog:"
45
- },
46
- "engines": {
47
- "bun": ">=1.3.14"
48
- },
49
- "files": [
50
- "src",
51
- "README.md",
52
- "CHANGELOG.md"
53
- ],
54
- "exports": {
55
- ".": {
56
- "types": "./src/index.ts",
57
- "import": "./src/index.ts"
58
- },
59
- "./*": {
60
- "types": "./src/*.ts",
61
- "import": "./src/*.ts"
62
- },
63
- "./components/*": {
64
- "types": "./src/components/*.ts",
65
- "import": "./src/components/*.ts"
66
- },
67
- "./*.js": "./src/*.ts"
68
- }
69
- }
2
+ "type": "module",
3
+ "name": "@linxiraos/pi-tui",
4
+ "version": "1.1.2",
5
+ "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
+ "homepage": "https://linxira-os.github.io/zeta/",
7
+ "author": "Stencil Labs, Inc.",
8
+ "contributors": [
9
+ "Mario Zechner"
10
+ ],
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
15
+ "directory": "packages/tui"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/Linxira-OS/linxira-zeta/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 --parallel test/*.test.ts",
36
+ "fix": "biome check --write --unsafe .",
37
+ "fmt": "biome format --write ."
38
+ },
39
+ "dependencies": {
40
+ "@linxiraos/pi-natives": "1.1.2",
41
+ "@linxiraos/pi-utils": "1.1.2"
42
+ },
43
+ "devDependencies": {
44
+ "kitty-vt-wasm": "^0.2.0"
45
+ },
46
+ "engines": {
47
+ "bun": ">=1.3.14"
48
+ },
49
+ "files": [
50
+ "src",
51
+ "README.md",
52
+ "CHANGELOG.md",
53
+ "LICENSE",
54
+ "THIRD-PARTY-NOTICES.txt",
55
+ "dist/types"
56
+ ],
57
+ "exports": {
58
+ ".": {
59
+ "types": "./dist/types/index.d.ts",
60
+ "import": "./src/index.ts"
61
+ },
62
+ "./*": {
63
+ "types": "./dist/types/*.d.ts",
64
+ "import": "./src/*.ts"
65
+ },
66
+ "./components/*": {
67
+ "types": "./dist/types/components/*.d.ts",
68
+ "import": "./src/components/*.ts"
69
+ },
70
+ "./*.js": "./src/*.ts"
71
+ }
72
+ }