@simon_he/vue-tui 0.0.8 → 1.0.0
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/README.md +142 -30
- package/dist/TSelect-BwJJbuTt.js +6089 -0
- package/dist/TTree-DK_DQBYm.js +6480 -0
- package/dist/agent.cjs +39416 -0
- package/dist/agent.d.cts +44 -0
- package/dist/agent.d.ts +44 -0
- package/dist/agent.js +828 -0
- package/dist/ansi-palette-CNXqFciC.js +57 -0
- package/dist/ansi-styles.d.ts +200 -0
- package/dist/block-source-CKUOnkgT.js +1663 -0
- package/dist/cli/headless-renderer.d.ts +29 -0
- package/dist/cli/input.d.ts +49 -0
- package/dist/cli/node-file-writers.d.ts +13 -0
- package/dist/cli/node-module.d.ts +2 -0
- package/dist/cli/parse-kitty.d.ts +2 -0
- package/dist/cli/parse-mouse.d.ts +2 -0
- package/dist/cli/parse-utils.d.ts +14 -0
- package/dist/cli/parse-xterm.d.ts +2 -0
- package/dist/cli/path-provider-types.d.ts +1 -0
- package/dist/cli/path-provider.d.ts +4 -0
- package/dist/cli/path-suggest-core.d.ts +1 -0
- package/dist/cli/path-suggest.d.ts +15 -0
- package/dist/cli/recording.d.ts +4 -0
- package/dist/cli/stdin-buffer.d.ts +33 -0
- package/dist/cli.cjs +11061 -0
- package/dist/cli.d.cts +23 -0
- package/dist/cli.d.ts +23 -0
- package/dist/cli.js +9875 -0
- package/dist/core/ansi/capability.d.ts +20 -0
- package/dist/core/ansi/colors.d.ts +41 -0
- package/dist/core/ansi/sgr.d.ts +7 -0
- package/dist/core/ansi/theme.d.ts +6 -0
- package/dist/core/ansi-palette.d.ts +14 -0
- package/dist/core/buffer/buffer.d.ts +54 -0
- package/dist/core/buffer/width.d.ts +4 -0
- package/dist/core/debug-logger.d.ts +18 -0
- package/dist/core/hyperlink.d.ts +9 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/path-provider-types.d.ts +24 -0
- package/dist/core/path-suggest.d.ts +35 -0
- package/dist/core/render-plane.d.ts +3 -0
- package/dist/core/terminal/create-terminal.d.ts +8 -0
- package/dist/core/terminal/emitter.d.ts +7 -0
- package/dist/core/types.d.ts +107 -0
- package/dist/core.cjs +3153 -0
- package/dist/core.d.cts +14 -0
- package/dist/core.d.ts +14 -0
- package/dist/core.js +424 -0
- package/dist/create-terminal-C2oiWFJU.js +1434 -0
- package/dist/create-terminal-app.d.ts +36 -0
- package/dist/dom-renderer-BqGijQID.js +1173 -0
- package/dist/env-Cl8qmNFN.js +19 -0
- package/dist/events/index.d.ts +6 -0
- package/dist/events/manager/cli-event-manager.d.ts +22 -0
- package/dist/events/manager/event-manager.d.ts +30 -0
- package/dist/events/manager/selection-suppression.d.ts +3 -0
- package/dist/events/manager/types.d.ts +108 -0
- package/dist/events/recording.d.ts +44 -0
- package/dist/experimental.cjs +4412 -1641
- package/dist/experimental.d.cts +42 -0
- package/dist/experimental.d.ts +42 -825
- package/dist/experimental.js +31 -7392
- package/dist/frame-perf-C6Xfg85O.js +24 -0
- package/dist/hyperlink-Bn02UXJb.js +419 -0
- package/dist/index.cjs +14765 -17582
- package/dist/index.d.cts +35 -0
- package/dist/index.d.ts +35 -1528
- package/dist/index.js +17 -20026
- package/dist/linkify-D_gzn9Xq.js +562 -0
- package/dist/markdown.cjs +9321 -7623
- package/dist/markdown.d.cts +11 -0
- package/dist/markdown.d.ts +11 -112
- package/dist/markdown.js +36 -1427
- package/dist/observability/cli-latency-node.d.ts +3 -0
- package/dist/observability/cli-latency-types.d.ts +41 -0
- package/dist/observability/cli-latency.d.ts +3 -0
- package/dist/observability/frame-perf-store.d.ts +18 -0
- package/dist/observability/frame-perf.d.ts +40 -0
- package/dist/observability/perf-sink.d.ts +56 -0
- package/dist/observability/trace.d.ts +40 -0
- package/dist/observability/tui-profiler.d.ts +33 -0
- package/dist/observability.cjs +221 -0
- package/dist/observability.d.cts +8 -0
- package/dist/observability.d.ts +8 -0
- package/dist/observability.js +4 -0
- package/dist/path-mnSgEpCm.js +81 -0
- package/dist/path-suggest-BNqcuE3-.js +274 -0
- package/dist/path-suggest-Dk9TRLh5.js +3 -0
- package/dist/{path-suggest-DmrmeueH.js → path-suggest-bvR9SY6Q.js} +86 -18
- package/dist/renderer/capabilities.d.ts +13 -0
- package/dist/renderer/cli/index.d.ts +2 -0
- package/dist/renderer/cli/stdout-metrics.d.ts +18 -0
- package/dist/renderer/cli/stdout-renderer.d.ts +48 -0
- package/dist/renderer/dom/dom-renderer.d.ts +157 -0
- package/dist/renderer/dom/index.d.ts +2 -0
- package/dist/renderer/index.d.ts +2 -0
- package/dist/renderer-dom.cjs +1505 -0
- package/dist/renderer-dom.d.cts +4 -0
- package/dist/renderer-dom.d.ts +4 -0
- package/dist/renderer-dom.js +7 -0
- package/dist/runtime/index.d.ts +36 -0
- package/dist/runtime/osc52.d.ts +9 -0
- package/dist/runtime-rfcZCyJq.js +1197 -0
- package/dist/runtime.cjs +1698 -0
- package/dist/runtime.d.cts +9 -0
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.js +4 -0
- package/dist/selection/terminal-selection.d.ts +123 -0
- package/dist/sgr-BmzxEjAO.js +304 -0
- package/dist/terminal-selection-DBinO6p5.js +330 -0
- package/dist/tlog-theme-qPBt5rge.js +9254 -0
- package/dist/trace-CjzYeIxN.js +182 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/grapheme.d.ts +5 -0
- package/dist/utils/newlines.d.ts +1 -0
- package/dist/utils/path.d.ts +7 -0
- package/dist/utils/url-safety.d.ts +2 -0
- package/dist/vue/agent/view-models.d.ts +98 -0
- package/dist/vue/components/TAnchor.d.ts +108 -0
- package/dist/vue/components/TBox.d.ts +144 -0
- package/dist/vue/components/TCommandPalette.d.ts +587 -0
- package/dist/vue/components/TDataTable.d.ts +367 -0
- package/dist/vue/components/TDebugOverlay.d.ts +43 -0
- package/dist/vue/components/TDialog.d.ts +255 -0
- package/dist/vue/components/TFeedback.d.ts +635 -0
- package/dist/vue/components/TFlow.d.ts +85 -0
- package/dist/vue/components/TForm.d.ts +1230 -0
- package/dist/vue/components/TInput.d.ts +545 -0
- package/dist/vue/components/TInputBox.d.ts +158 -0
- package/dist/vue/components/TJsonEditor.d.ts +165 -0
- package/dist/vue/components/TLink.d.ts +239 -0
- package/dist/vue/components/TLinkifyText.d.ts +141 -0
- package/dist/vue/components/TList.d.ts +119 -0
- package/dist/vue/components/TLogLinksPanel.d.ts +238 -0
- package/dist/vue/components/TLogMinimap.d.ts +263 -0
- package/dist/vue/components/TLogScrollbar.d.ts +236 -0
- package/dist/vue/components/TLogSearchBar.d.ts +267 -0
- package/dist/vue/components/TLogSearchPager.d.ts +162 -0
- package/dist/vue/components/TLogSearchResults.d.ts +200 -0
- package/dist/vue/components/TLogView.d.ts +536 -0
- package/dist/vue/components/TLogVirtualLinksPanel.d.ts +141 -0
- package/dist/vue/components/TLogVirtualSearchResults.d.ts +146 -0
- package/dist/vue/components/TMarkdownText.d.ts +134 -0
- package/dist/vue/components/TMultilineModal.d.ts +62 -0
- package/dist/vue/components/TNavigation.d.ts +324 -0
- package/dist/vue/components/TOverlay.d.ts +366 -0
- package/dist/vue/components/TPanels.d.ts +244 -0
- package/dist/vue/components/TPathPicker.d.ts +213 -0
- package/dist/vue/components/TRenderLayer.d.ts +16 -0
- package/dist/vue/components/TRenderPlane.d.ts +17 -0
- package/dist/vue/components/TSelect.d.ts +335 -0
- package/dist/vue/components/TTable.d.ts +317 -0
- package/dist/vue/components/TText.d.ts +116 -0
- package/dist/vue/components/TThinkingView.d.ts +233 -0
- package/dist/vue/components/TToolCallView.d.ts +384 -0
- package/dist/vue/components/TTranscriptView.d.ts +221 -0
- package/dist/vue/components/TTransition.d.ts +83 -0
- package/dist/vue/components/TTree.d.ts +200 -0
- package/dist/vue/components/TUserMessageView.d.ts +344 -0
- package/dist/vue/components/TView.d.ts +127 -0
- package/dist/vue/components/TVirtualList.d.ts +182 -0
- package/dist/vue/components/TVirtualMarkdown.d.ts +168 -0
- package/dist/vue/components/TVirtualRows.d.ts +247 -0
- package/dist/vue/components/TerminalProvider.d.ts +218 -0
- package/dist/vue/components/input/host.d.ts +17 -0
- package/dist/vue/components/input/plugins/hostPlugin.d.ts +7 -0
- package/dist/vue/components/input/plugins/hostPlugin.node.d.ts +15 -0
- package/dist/vue/components/input/plugins/mentionUtils.d.ts +17 -0
- package/dist/vue/components/input/plugins/nodeMentionPathProvider.d.ts +2 -0
- package/dist/vue/components/input/plugins/promptMentionPlugin.d.ts +8 -0
- package/dist/vue/components/input/plugins/promptMentionState.d.ts +98 -0
- package/dist/vue/components/input/plugins/restrictText.d.ts +27 -0
- package/dist/vue/components/input/plugins/types.d.ts +90 -0
- package/dist/vue/components/input/utils/inlineText.d.ts +57 -0
- package/dist/vue/components/input/utils/inlineTextTokens.d.ts +34 -0
- package/dist/vue/components/input/utils/primitives.d.ts +3 -0
- package/dist/vue/components/input/utils/wordNavigation.d.ts +6 -0
- package/dist/vue/components/link/host.d.ts +15 -0
- package/dist/vue/components/list/list-geometry.d.ts +16 -0
- package/dist/vue/components/list/list-paint.d.ts +1 -0
- package/dist/vue/components/list/scroll-state.d.ts +25 -0
- package/dist/vue/components/list/selection-state.d.ts +6 -0
- package/dist/vue/components/simple-utils.d.ts +5 -0
- package/dist/vue/components/terminal-provider/copy-toast.d.ts +6 -0
- package/dist/vue/components/terminal-provider/portals.d.ts +17 -0
- package/dist/vue/components/terminal-provider/scheduler.d.ts +29 -0
- package/dist/vue/components/terminal-provider/selection-config.d.ts +15 -0
- package/dist/vue/components/terminal-provider/utils.d.ts +5 -0
- package/dist/vue/composables/use-layout.d.ts +2 -0
- package/dist/vue/composables/use-render-node.d.ts +19 -0
- package/dist/vue/composables/use-render-stack.d.ts +3 -0
- package/dist/vue/composables/use-runtime.d.ts +5 -0
- package/dist/vue/composables/use-terminal-node.d.ts +14 -0
- package/dist/vue/composables/use-terminal.d.ts +2 -0
- package/dist/vue/composables/use-visibility.d.ts +12 -0
- package/dist/vue/context.d.ts +153 -0
- package/dist/vue/index.d.ts +69 -0
- package/dist/vue/injection-key.d.ts +2 -0
- package/dist/vue/linkify.d.ts +11 -0
- package/dist/vue/log/append-only-log-store.d.ts +2 -0
- package/dist/vue/log/tlog-keymap.d.ts +28 -0
- package/dist/vue/log/tlog-plugins.d.ts +144 -0
- package/dist/vue/log/tlog-session.d.ts +81 -0
- package/dist/vue/log/tlog-theme.d.ts +68 -0
- package/dist/vue/log/types.d.ts +43 -0
- package/dist/vue/log/use-tlog-link-controller.d.ts +31 -0
- package/dist/vue/log/use-tlog-retained-index.d.ts +26 -0
- package/dist/vue/log/use-tlog-search-controller.d.ts +51 -0
- package/dist/vue/log/use-tlog-search-results-page.d.ts +31 -0
- package/dist/vue/log/use-tlog-virtual-search-results.d.ts +22 -0
- package/dist/vue/markdown/ast.d.ts +3 -0
- package/dist/vue/markdown/block-source.d.ts +22 -0
- package/dist/vue/markdown/document.d.ts +20 -0
- package/dist/vue/markdown/layout.d.ts +21 -0
- package/dist/vue/markdown/parser.d.ts +11 -0
- package/dist/vue/markdown/render.d.ts +10 -0
- package/dist/vue/markdown/theme.d.ts +186 -0
- package/dist/vue/markdown/types.d.ts +59 -0
- package/dist/vue/overlay.d.ts +27 -0
- package/dist/vue/render/context.d.ts +3 -0
- package/dist/vue/render/render-manager.d.ts +94 -0
- package/dist/vue/router/RouterView.d.ts +25 -0
- package/dist/vue/router/composables.d.ts +4 -0
- package/dist/vue/router/context.d.ts +4 -0
- package/dist/vue/router/router.d.ts +7 -0
- package/dist/vue/router/types.d.ts +29 -0
- package/dist/vue/scheduler/frame-mailbox.d.ts +55 -0
- package/dist/vue/scheduler/frame-scheduler.d.ts +51 -0
- package/dist/vue/theme.d.ts +48 -0
- package/dist/vue/transcript/hit-regions.d.ts +2 -0
- package/dist/vue/transcript/layout.d.ts +20 -0
- package/dist/vue/transcript/plain-text.d.ts +2 -0
- package/dist/vue/transcript/types.d.ts +122 -0
- package/dist/vue/utils/frame-task.d.ts +6 -0
- package/dist/vue/utils/rect.d.ts +4 -0
- package/dist/vue/utils/row-scroll.d.ts +25 -0
- package/dist/vue/utils/style-cache.d.ts +3 -0
- package/dist/vue/utils/text.d.ts +27 -0
- package/dist/vue/utils/wheel-scroll.d.ts +18 -0
- package/dist/vue.cjs +23668 -0
- package/dist/vue.d.cts +1 -0
- package/dist/vue.d.ts +1 -0
- package/dist/vue.js +3957 -0
- package/dist/{wheel-scroll-CiNsasLf.js → wheel-scroll-vBRaQ7p-.js} +404 -405
- package/package.json +185 -35
- package/dist/path-suggest-BeV6n7m-.js +0 -3
- package/dist/sgr-Tko2EQ0U.js +0 -484
- package/dist/theme-Bsm65g8k.d.ts +0 -32
- package/dist/types-ClIV2h1o.d.ts +0 -103
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type HeadlessNode = HeadlessElement | HeadlessText | HeadlessComment;
|
|
2
|
+
export interface HeadlessRoot {
|
|
3
|
+
children: HeadlessNode[];
|
|
4
|
+
}
|
|
5
|
+
export interface HeadlessElement {
|
|
6
|
+
type: string;
|
|
7
|
+
parent: HeadlessElement | HeadlessRoot | null;
|
|
8
|
+
children: HeadlessNode[];
|
|
9
|
+
props: Record<string, unknown>;
|
|
10
|
+
style: Record<string, unknown>;
|
|
11
|
+
className?: string;
|
|
12
|
+
textContent?: string;
|
|
13
|
+
setAttribute?: (key: string, value: string) => void;
|
|
14
|
+
removeAttribute?: (key: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface HeadlessText {
|
|
17
|
+
type: "text";
|
|
18
|
+
parent: HeadlessElement | HeadlessRoot | null;
|
|
19
|
+
text: string;
|
|
20
|
+
}
|
|
21
|
+
export interface HeadlessComment {
|
|
22
|
+
type: "comment";
|
|
23
|
+
parent: HeadlessElement | HeadlessRoot | null;
|
|
24
|
+
text: string;
|
|
25
|
+
}
|
|
26
|
+
declare const renderer: import("vue").Renderer<HeadlessElement | HeadlessRoot>;
|
|
27
|
+
export declare function createHeadlessApp(...args: Parameters<typeof renderer.createApp>): import("vue").App<HeadlessElement | HeadlessRoot>;
|
|
28
|
+
export declare function createHeadlessRoot(): HeadlessRoot;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { TerminalEventRecord } from "../events/recording.js";
|
|
2
|
+
type Stdin = NodeJS.ReadStream;
|
|
3
|
+
type KeyboardProtocol = "auto" | "kitty" | "xterm" | "off";
|
|
4
|
+
export type StdinDriver = Readonly<{
|
|
5
|
+
dispose: () => void;
|
|
6
|
+
}>;
|
|
7
|
+
type CleanupSignal = "SIGINT" | "SIGTERM" | "SIGHUP" | "SIGBREAK";
|
|
8
|
+
export type TerminalCleanupSignalPolicy = "cleanup-only" | "exit" | "reraise";
|
|
9
|
+
export type TerminalCleanupOptions = Readonly<{
|
|
10
|
+
signals?: readonly CleanupSignal[];
|
|
11
|
+
/**
|
|
12
|
+
* Defaults to "reraise": cleanup runs, vue-tui removes its own listener,
|
|
13
|
+
* then the signal is sent again when no other listener owns the signal.
|
|
14
|
+
*/
|
|
15
|
+
signalPolicy?: TerminalCleanupSignalPolicy;
|
|
16
|
+
cleanupOnUnhandledRejection?: boolean;
|
|
17
|
+
rethrowUnhandledRejection?: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
export type TerminalCleanupHandle = Readonly<{
|
|
20
|
+
cleanup: () => void;
|
|
21
|
+
uninstall: () => void;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function resolveCleanupSignalAction(signal: CleanupSignal, policy: TerminalCleanupSignalPolicy): {
|
|
24
|
+
type: "none";
|
|
25
|
+
} | {
|
|
26
|
+
type: "exit";
|
|
27
|
+
code: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: "reraise";
|
|
30
|
+
signal: CleanupSignal;
|
|
31
|
+
};
|
|
32
|
+
export declare function installTerminalCleanup(dispose: () => void, options?: TerminalCleanupOptions): TerminalCleanupHandle;
|
|
33
|
+
export declare function createStdinDriver(options: Readonly<{
|
|
34
|
+
dispatch: (event: TerminalEventRecord) => boolean | void;
|
|
35
|
+
stdin?: Stdin;
|
|
36
|
+
stdout?: NodeJS.WriteStream;
|
|
37
|
+
env?: Readonly<Record<string, unknown>>;
|
|
38
|
+
enableMouse?: boolean;
|
|
39
|
+
keyboardProtocol?: KeyboardProtocol;
|
|
40
|
+
/**
|
|
41
|
+
* Enable "any-motion" mouse tracking (xterm DECSET ?1003).
|
|
42
|
+
* This is required for hover interactions in the CLI, but can increase event volume.
|
|
43
|
+
*/
|
|
44
|
+
enableMouseMotion?: boolean;
|
|
45
|
+
onTerminalFocusChange?: (focused: boolean) => void;
|
|
46
|
+
onExit?: () => void;
|
|
47
|
+
autoCleanup?: boolean | TerminalCleanupOptions;
|
|
48
|
+
}>): StdinDriver;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { appendFileSync } from "node:fs";
|
|
2
|
+
export declare const nodeProfilerFileWriter: {
|
|
3
|
+
appendFileSync: typeof appendFileSync;
|
|
4
|
+
};
|
|
5
|
+
export declare function defaultVueTuiProfileLogPath(): string;
|
|
6
|
+
export declare function defaultVueTuiFramePerfLogPath(): string;
|
|
7
|
+
export declare function defaultVueTuiDebugLogPath(): string;
|
|
8
|
+
export declare function defaultVueTuiMouseDebugLogPath(): string;
|
|
9
|
+
export declare function shouldInstallFileWriters(env: Readonly<Record<string, unknown>> | undefined): boolean;
|
|
10
|
+
export declare function installNodeFileWriters(options?: Readonly<{
|
|
11
|
+
force?: boolean;
|
|
12
|
+
}>): void;
|
|
13
|
+
export declare function resetNodeFileWriters(): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TerminalEventRecord } from "../events/recording.js";
|
|
2
|
+
export type KeyMods = Partial<{
|
|
3
|
+
ctrlKey: boolean;
|
|
4
|
+
shiftKey: boolean;
|
|
5
|
+
altKey: boolean;
|
|
6
|
+
metaKey: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export interface ParseResult {
|
|
9
|
+
event: TerminalEventRecord | null;
|
|
10
|
+
handled: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function keyEvent(key: string, code?: string, mods?: KeyMods, repeat?: boolean): TerminalEventRecord;
|
|
13
|
+
export declare function modsFromXtermModifier(mod: number | null | undefined): KeyMods | null;
|
|
14
|
+
export declare function modsFromKittyModifier(mod: number | null | undefined): KeyMods | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { FsDirEntry, FsEntryKind, FsStat, PathPickerProvider, } from "../core/path-provider-types.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PathPickerProvider } from "../core/path-provider-types.js";
|
|
2
|
+
export type { FsDirEntry, FsEntryKind, FsStat, PathPickerProvider, } from "../core/path-provider-types.js";
|
|
3
|
+
export declare function createNodePathPickerProvider(): PathPickerProvider;
|
|
4
|
+
export declare function absPathFromEntry(absDir: string, entryName: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parsePathQuery, resolveUserPath, suggestParentHint, suggestPaths, type PathPickMode, type PathSuggestion, type SuggestPathsResult, } from "../core/path-suggest.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FsDirEntry } from "../core/path-provider-types.js";
|
|
2
|
+
import type { PathPickMode, SuggestPathsResult } from "../core/path-suggest.js";
|
|
3
|
+
export type { PathPickMode, PathSuggestion, SuggestPathsResult } from "../core/path-suggest.js";
|
|
4
|
+
export { parsePathQuery, suggestParentHint } from "../core/path-suggest.js";
|
|
5
|
+
export declare function suggestPaths(options: Readonly<{
|
|
6
|
+
workspaceAbs: string;
|
|
7
|
+
input: string;
|
|
8
|
+
mode: PathPickMode;
|
|
9
|
+
max: number;
|
|
10
|
+
showHidden?: boolean;
|
|
11
|
+
listDir: (absDir: string) => Promise<FsDirEntry[]>;
|
|
12
|
+
maxDepth?: number;
|
|
13
|
+
gitignore?: "blocking" | "nonBlocking";
|
|
14
|
+
}>): Promise<SuggestPathsResult>;
|
|
15
|
+
export declare function resolveUserPath(workspaceAbs: string, input: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TerminalEventRecord } from "../events/recording.js";
|
|
2
|
+
export declare function writeEventLog(path: string, events: readonly TerminalEventRecord[]): Promise<void>;
|
|
3
|
+
export declare function writeSnapshot(path: string, lines: readonly string[]): Promise<void>;
|
|
4
|
+
export declare function readEventLog(path: string): Promise<TerminalEventRecord[]>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { EventEmitter } from "node:events";
|
|
3
|
+
export interface StdinBufferOptions {
|
|
4
|
+
timeout?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Flush timeout used specifically when the buffer contains only a lone ESC.
|
|
7
|
+
*
|
|
8
|
+
* Terminals send many escape sequences (CSI/OSC/SGR mouse) that start with ESC,
|
|
9
|
+
* but stream chunking can split the leading ESC from the rest of the sequence.
|
|
10
|
+
* Using a slightly longer timeout for a lone ESC reduces cases where ESC is
|
|
11
|
+
* emitted as a standalone key and the remaining bytes leak as literal input.
|
|
12
|
+
*/
|
|
13
|
+
escTimeout?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface StdinBufferEventMap {
|
|
16
|
+
data: [string];
|
|
17
|
+
paste: [string];
|
|
18
|
+
}
|
|
19
|
+
export declare class StdinBuffer extends EventEmitter<StdinBufferEventMap> {
|
|
20
|
+
private buffer;
|
|
21
|
+
private timeout;
|
|
22
|
+
private readonly timeoutMs;
|
|
23
|
+
private readonly escTimeoutMs;
|
|
24
|
+
private pendingEscContinuationAt;
|
|
25
|
+
private pasteMode;
|
|
26
|
+
private pasteBuffer;
|
|
27
|
+
constructor(options?: StdinBufferOptions);
|
|
28
|
+
process(data: string | Buffer): void;
|
|
29
|
+
flush(): string[];
|
|
30
|
+
clear(): void;
|
|
31
|
+
getBuffer(): string;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
}
|