@simon_he/vue-tui 0.0.7 → 1.0.0-rc.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 +222 -444
- package/dist/TSelect-BmSkar0D.js +8697 -0
- package/dist/ansi-palette-Bv5Vqr4k.js +1499 -0
- package/dist/ansi-styles.d.ts +200 -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 +12 -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 +10664 -0
- package/dist/cli.d.cts +22 -0
- package/dist/cli.d.ts +22 -0
- package/dist/cli.js +9521 -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 +7 -0
- package/dist/core/terminal/emitter.d.ts +7 -0
- package/dist/core/types.d.ts +107 -0
- package/dist/core.cjs +3072 -0
- package/dist/core.d.cts +14 -0
- package/dist/core.d.ts +14 -0
- package/dist/core.js +422 -0
- package/dist/create-terminal-app.d.ts +34 -0
- package/dist/dom-renderer-CDVQIcIL.js +1172 -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 +9380 -0
- package/dist/experimental.d.cts +39 -0
- package/dist/experimental.d.ts +39 -0
- package/dist/experimental.js +7624 -0
- package/dist/frame-perf-C-w8mjJL.js +98 -0
- package/dist/hyperlink-B5PD7a3Q.js +331 -0
- package/dist/index.cjs +12037 -16507
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -1353
- package/dist/index.js +13 -18738
- package/dist/markdown.cjs +21929 -0
- package/dist/markdown.d.cts +10 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.js +1649 -0
- 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 +13 -0
- package/dist/observability/frame-perf.d.ts +40 -0
- package/dist/observability/trace.d.ts +40 -0
- package/dist/observability/tui-profiler.d.ts +33 -0
- package/dist/observability.cjs +99 -0
- package/dist/observability.d.cts +6 -0
- package/dist/observability.d.ts +6 -0
- package/dist/observability.js +3 -0
- package/dist/path-DDiSCXrQ.js +99 -0
- package/dist/path-suggest-0Q2BDsuj.js +274 -0
- package/dist/path-suggest-Dk9TRLh5.js +3 -0
- package/dist/{path-suggest-CZQYJIIg.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 +1511 -0
- package/dist/renderer-dom.d.cts +4 -0
- package/dist/renderer-dom.d.ts +4 -0
- package/dist/renderer-dom.js +6 -0
- package/dist/runtime/index.d.ts +36 -0
- package/dist/runtime/osc52.d.ts +9 -0
- package/dist/runtime-DtrcQidD.js +1197 -0
- package/dist/runtime.cjs +1697 -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 +122 -0
- package/dist/sgr-DMK2AvuT.js +304 -0
- package/dist/style-cache-i0ZABZRq.js +178 -0
- package/dist/terminal-selection-BCOh9jsL.js +329 -0
- package/dist/utils/env.d.ts +3 -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/components/TAnchor.d.ts +108 -0
- package/dist/vue/components/TBox.d.ts +144 -0
- package/dist/vue/components/TDebugOverlay.d.ts +43 -0
- package/dist/vue/components/TDialog.d.ts +256 -0
- package/dist/vue/components/TFlow.d.ts +85 -0
- package/dist/vue/components/TInput.d.ts +554 -0
- package/dist/vue/components/TInputBox.d.ts +158 -0
- package/dist/vue/components/TJsonEditor.d.ts +165 -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 +502 -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/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 +215 -0
- package/dist/vue/components/TText.d.ts +116 -0
- package/dist/vue/components/TTransition.d.ts +83 -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/TerminalProvider.d.ts +195 -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/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/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 +39 -0
- package/dist/vue/injection-key.d.ts +2 -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 +18 -0
- package/dist/vue/markdown/layout.d.ts +16 -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 +47 -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/utils/frame-task.d.ts +6 -0
- package/dist/vue/utils/rect.d.ts +4 -0
- package/dist/vue/utils/style-cache.d.ts +3 -0
- package/dist/vue/utils/text.d.ts +26 -0
- package/dist/vue/utils/wheel-scroll.d.ts +18 -0
- package/dist/vue.cjs +18882 -0
- package/dist/vue.d.cts +3 -0
- package/dist/vue.d.ts +3 -0
- package/dist/vue.js +3066 -0
- package/dist/wheel-scroll-B-WlFuNB.js +819 -0
- package/package.json +226 -58
- package/dist/path-suggest-DIMby3r0.js +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,1353 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
fg?: AnsiColorName;
|
|
15
|
-
bg?: AnsiColorName;
|
|
16
|
-
bold?: boolean;
|
|
17
|
-
dim?: boolean;
|
|
18
|
-
italic?: boolean;
|
|
19
|
-
underline?: boolean;
|
|
20
|
-
inverse?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Optional terminal hyperlink target (OSC 8).
|
|
23
|
-
* When set, renderers may emit a clickable hyperlink while keeping text width unchanged.
|
|
24
|
-
*/
|
|
25
|
-
href?: string;
|
|
26
|
-
}>;
|
|
27
|
-
type Cell = Readonly<{
|
|
28
|
-
ch: string;
|
|
29
|
-
width: 1 | 2;
|
|
30
|
-
continuation?: true;
|
|
31
|
-
style: Style;
|
|
32
|
-
}>;
|
|
33
|
-
type BufferSnapshot = Readonly<{
|
|
34
|
-
cols: number;
|
|
35
|
-
rows: number;
|
|
36
|
-
lines: readonly string[];
|
|
37
|
-
}>;
|
|
38
|
-
type TerminalSize = Readonly<{
|
|
39
|
-
cols: number;
|
|
40
|
-
rows: number;
|
|
41
|
-
}>;
|
|
42
|
-
type TerminalScrollOperation = Readonly<{
|
|
43
|
-
startY: number;
|
|
44
|
-
endY: number;
|
|
45
|
-
delta: number;
|
|
46
|
-
}>;
|
|
47
|
-
type TerminalCommitEvent = Readonly<{
|
|
48
|
-
dirtyRows: readonly number[] | null;
|
|
49
|
-
planes: TerminalRenderPlanes | null;
|
|
50
|
-
sync?: boolean;
|
|
51
|
-
scrollOperations?: readonly TerminalScrollOperation[] | null;
|
|
52
|
-
}>;
|
|
53
|
-
type TerminalResizeEvent = Readonly<{
|
|
54
|
-
cols: number;
|
|
55
|
-
rows: number;
|
|
56
|
-
}>;
|
|
57
|
-
interface TerminalEventMap {
|
|
58
|
-
commit: TerminalCommitEvent;
|
|
59
|
-
resize: TerminalResizeEvent;
|
|
60
|
-
}
|
|
61
|
-
interface Terminal {
|
|
62
|
-
resize: (cols: number, rows: number) => void;
|
|
63
|
-
clear: (x?: number, y?: number, w?: number, h?: number) => void;
|
|
64
|
-
write: (text: string, opts?: {
|
|
65
|
-
x?: number;
|
|
66
|
-
y?: number;
|
|
67
|
-
style?: Style;
|
|
68
|
-
}) => void;
|
|
69
|
-
writeAnsi: (text: string, opts?: {
|
|
70
|
-
x?: number;
|
|
71
|
-
y?: number;
|
|
72
|
-
}) => void;
|
|
73
|
-
put: (x: number, y: number, ch: string, style?: Style) => void;
|
|
74
|
-
fill: (x: number, y: number, w: number, h: number, ch?: string, style?: Style) => void;
|
|
75
|
-
scroll: (lines: number) => void;
|
|
76
|
-
setCursor: (x: number, y: number, visible?: boolean) => void;
|
|
77
|
-
batch: <T>(fn: () => T) => T;
|
|
78
|
-
commit: (meta?: {
|
|
79
|
-
planes?: TerminalRenderPlanes | null;
|
|
80
|
-
sync?: boolean;
|
|
81
|
-
}) => readonly number[] | null;
|
|
82
|
-
on: <K extends keyof TerminalEventMap>(event: K, cb: (payload: TerminalEventMap[K]) => void) => () => void;
|
|
83
|
-
dispose: () => void;
|
|
84
|
-
size: () => TerminalSize;
|
|
85
|
-
snapshot: () => BufferSnapshot;
|
|
86
|
-
getCell: (x: number, y: number) => Cell;
|
|
87
|
-
getRow: (y: number) => readonly Cell[];
|
|
88
|
-
setScrollbackLimit: (limit: number) => void;
|
|
89
|
-
getScrollbackLines: (count?: number) => readonly string[];
|
|
90
|
-
/** Register fingerprint function for SoA pre-computation on the composite buffer. */
|
|
91
|
-
setFingerprintFn: (fn: (ch: string, style: Style) => number) => void;
|
|
92
|
-
/** Get pre-computed fingerprints for a composite buffer row (null if not enabled). */
|
|
93
|
-
getRowFingerprints: (y: number) => Uint32Array | null;
|
|
94
|
-
} //#endregion
|
|
95
|
-
//#region src/core/ansi/colors.d.ts
|
|
96
|
-
type TerminalColorMode = 'ansi8' | 'ansi16' | 'ansi256' | 'truecolor';
|
|
97
|
-
type TerminalColorLevel = 8 | 16 | 256;
|
|
98
|
-
type AnsiRgb = Readonly<{
|
|
99
|
-
r: number;
|
|
100
|
-
g: number;
|
|
101
|
-
b: number;
|
|
102
|
-
}>;
|
|
103
|
-
declare const SGR_RESET = "\u001B[0m";
|
|
104
|
-
declare function truecolorFgOpen(rgb: AnsiRgb): string;
|
|
105
|
-
declare function truecolorBgOpen(rgb: AnsiRgb): string;
|
|
106
|
-
declare function rgbToAnsi256(rgb: AnsiRgb): number;
|
|
107
|
-
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/ansi-styles.d.ts
|
|
110
|
-
declare const ansiStyles: Readonly<{
|
|
111
|
-
reset: Readonly<{
|
|
112
|
-
open: string;
|
|
113
|
-
close: string;
|
|
114
|
-
}>;
|
|
115
|
-
bold: Readonly<{
|
|
116
|
-
open: string;
|
|
117
|
-
close: string;
|
|
118
|
-
}>;
|
|
119
|
-
dim: Readonly<{
|
|
120
|
-
open: string;
|
|
121
|
-
close: string;
|
|
122
|
-
}>;
|
|
123
|
-
italic: Readonly<{
|
|
124
|
-
open: string;
|
|
125
|
-
close: string;
|
|
126
|
-
}>;
|
|
127
|
-
underline: Readonly<{
|
|
128
|
-
open: string;
|
|
129
|
-
close: string;
|
|
130
|
-
}>;
|
|
131
|
-
inverse: Readonly<{
|
|
132
|
-
open: string;
|
|
133
|
-
close: string;
|
|
134
|
-
}>;
|
|
135
|
-
black: Readonly<{
|
|
136
|
-
open: string;
|
|
137
|
-
close: string;
|
|
138
|
-
}>;
|
|
139
|
-
red: Readonly<{
|
|
140
|
-
open: string;
|
|
141
|
-
close: string;
|
|
142
|
-
}>;
|
|
143
|
-
green: Readonly<{
|
|
144
|
-
open: string;
|
|
145
|
-
close: string;
|
|
146
|
-
}>;
|
|
147
|
-
yellow: Readonly<{
|
|
148
|
-
open: string;
|
|
149
|
-
close: string;
|
|
150
|
-
}>;
|
|
151
|
-
blue: Readonly<{
|
|
152
|
-
open: string;
|
|
153
|
-
close: string;
|
|
154
|
-
}>;
|
|
155
|
-
magenta: Readonly<{
|
|
156
|
-
open: string;
|
|
157
|
-
close: string;
|
|
158
|
-
}>;
|
|
159
|
-
cyan: Readonly<{
|
|
160
|
-
open: string;
|
|
161
|
-
close: string;
|
|
162
|
-
}>;
|
|
163
|
-
white: Readonly<{
|
|
164
|
-
open: string;
|
|
165
|
-
close: string;
|
|
166
|
-
}>;
|
|
167
|
-
blackBright: Readonly<{
|
|
168
|
-
open: string;
|
|
169
|
-
close: string;
|
|
170
|
-
}>;
|
|
171
|
-
redBright: Readonly<{
|
|
172
|
-
open: string;
|
|
173
|
-
close: string;
|
|
174
|
-
}>;
|
|
175
|
-
greenBright: Readonly<{
|
|
176
|
-
open: string;
|
|
177
|
-
close: string;
|
|
178
|
-
}>;
|
|
179
|
-
yellowBright: Readonly<{
|
|
180
|
-
open: string;
|
|
181
|
-
close: string;
|
|
182
|
-
}>;
|
|
183
|
-
blueBright: Readonly<{
|
|
184
|
-
open: string;
|
|
185
|
-
close: string;
|
|
186
|
-
}>;
|
|
187
|
-
magentaBright: Readonly<{
|
|
188
|
-
open: string;
|
|
189
|
-
close: string;
|
|
190
|
-
}>;
|
|
191
|
-
cyanBright: Readonly<{
|
|
192
|
-
open: string;
|
|
193
|
-
close: string;
|
|
194
|
-
}>;
|
|
195
|
-
whiteBright: Readonly<{
|
|
196
|
-
open: string;
|
|
197
|
-
close: string;
|
|
198
|
-
}>;
|
|
199
|
-
bgBlack: Readonly<{
|
|
200
|
-
open: string;
|
|
201
|
-
close: string;
|
|
202
|
-
}>;
|
|
203
|
-
bgRed: Readonly<{
|
|
204
|
-
open: string;
|
|
205
|
-
close: string;
|
|
206
|
-
}>;
|
|
207
|
-
bgGreen: Readonly<{
|
|
208
|
-
open: string;
|
|
209
|
-
close: string;
|
|
210
|
-
}>;
|
|
211
|
-
bgYellow: Readonly<{
|
|
212
|
-
open: string;
|
|
213
|
-
close: string;
|
|
214
|
-
}>;
|
|
215
|
-
bgBlue: Readonly<{
|
|
216
|
-
open: string;
|
|
217
|
-
close: string;
|
|
218
|
-
}>;
|
|
219
|
-
bgMagenta: Readonly<{
|
|
220
|
-
open: string;
|
|
221
|
-
close: string;
|
|
222
|
-
}>;
|
|
223
|
-
bgCyan: Readonly<{
|
|
224
|
-
open: string;
|
|
225
|
-
close: string;
|
|
226
|
-
}>;
|
|
227
|
-
bgWhite: Readonly<{
|
|
228
|
-
open: string;
|
|
229
|
-
close: string;
|
|
230
|
-
}>;
|
|
231
|
-
bgBlackBright: Readonly<{
|
|
232
|
-
open: string;
|
|
233
|
-
close: string;
|
|
234
|
-
}>;
|
|
235
|
-
bgRedBright: Readonly<{
|
|
236
|
-
open: string;
|
|
237
|
-
close: string;
|
|
238
|
-
}>;
|
|
239
|
-
bgGreenBright: Readonly<{
|
|
240
|
-
open: string;
|
|
241
|
-
close: string;
|
|
242
|
-
}>;
|
|
243
|
-
bgYellowBright: Readonly<{
|
|
244
|
-
open: string;
|
|
245
|
-
close: string;
|
|
246
|
-
}>;
|
|
247
|
-
bgBlueBright: Readonly<{
|
|
248
|
-
open: string;
|
|
249
|
-
close: string;
|
|
250
|
-
}>;
|
|
251
|
-
bgMagentaBright: Readonly<{
|
|
252
|
-
open: string;
|
|
253
|
-
close: string;
|
|
254
|
-
}>;
|
|
255
|
-
bgCyanBright: Readonly<{
|
|
256
|
-
open: string;
|
|
257
|
-
close: string;
|
|
258
|
-
}>;
|
|
259
|
-
bgWhiteBright: Readonly<{
|
|
260
|
-
open: string;
|
|
261
|
-
close: string;
|
|
262
|
-
}>;
|
|
263
|
-
color: Readonly<{
|
|
264
|
-
ansi256: (idx: number) => string;
|
|
265
|
-
ansi16m: (r: number, g: number, b: number) => string;
|
|
266
|
-
}>;
|
|
267
|
-
bgColor: Readonly<{
|
|
268
|
-
ansi256: (idx: number) => string;
|
|
269
|
-
ansi16m: (r: number, g: number, b: number) => string;
|
|
270
|
-
}>;
|
|
271
|
-
}>;
|
|
272
|
-
/**
|
|
273
|
-
* Cached palettes for convenience.
|
|
274
|
-
* Note: ANSI 0..15 are terminal-theme-dependent in many terminals; treat `rgb` as an approximation.
|
|
275
|
-
*/
|
|
276
|
-
declare const ANSI8_COLORS: readonly Readonly<{
|
|
277
|
-
level: TerminalColorLevel;
|
|
278
|
-
index: number;
|
|
279
|
-
name?: AnsiColorName;
|
|
280
|
-
rgb: AnsiRgb;
|
|
281
|
-
fgOpen: string;
|
|
282
|
-
bgOpen: string;
|
|
283
|
-
}>[];
|
|
284
|
-
declare const ANSI16_COLORS: readonly Readonly<{
|
|
285
|
-
level: TerminalColorLevel;
|
|
286
|
-
index: number;
|
|
287
|
-
name?: AnsiColorName;
|
|
288
|
-
rgb: AnsiRgb;
|
|
289
|
-
fgOpen: string;
|
|
290
|
-
bgOpen: string;
|
|
291
|
-
}>[];
|
|
292
|
-
declare const ANSI256_COLORS: readonly Readonly<{
|
|
293
|
-
level: TerminalColorLevel;
|
|
294
|
-
index: number;
|
|
295
|
-
name?: AnsiColorName;
|
|
296
|
-
rgb: AnsiRgb;
|
|
297
|
-
fgOpen: string;
|
|
298
|
-
bgOpen: string;
|
|
299
|
-
}>[];
|
|
300
|
-
declare function ansiColors(level: 8 | 16 | 256): readonly Readonly<{
|
|
301
|
-
level: TerminalColorLevel;
|
|
302
|
-
index: number;
|
|
303
|
-
name?: AnsiColorName;
|
|
304
|
-
rgb: AnsiRgb;
|
|
305
|
-
fgOpen: string;
|
|
306
|
-
bgOpen: string;
|
|
307
|
-
}>[]; //#endregion
|
|
308
|
-
//#region src/events/recording.d.ts
|
|
309
|
-
type TerminalEventRecord = Readonly<{
|
|
310
|
-
type: 'keydown' | 'keyup';
|
|
311
|
-
key: string;
|
|
312
|
-
code?: string;
|
|
313
|
-
ctrlKey?: boolean;
|
|
314
|
-
shiftKey?: boolean;
|
|
315
|
-
altKey?: boolean;
|
|
316
|
-
metaKey?: boolean;
|
|
317
|
-
repeat?: boolean;
|
|
318
|
-
time?: number;
|
|
319
|
-
}> | Readonly<{
|
|
320
|
-
type: 'pointerdown' | 'pointerup' | 'pointermove' | 'click' | 'dblclick' | 'contextmenu';
|
|
321
|
-
cellX: number;
|
|
322
|
-
cellY: number;
|
|
323
|
-
clientX?: number;
|
|
324
|
-
clientY?: number;
|
|
325
|
-
button?: number;
|
|
326
|
-
buttons?: number;
|
|
327
|
-
ctrlKey?: boolean;
|
|
328
|
-
shiftKey?: boolean;
|
|
329
|
-
altKey?: boolean;
|
|
330
|
-
metaKey?: boolean;
|
|
331
|
-
time?: number;
|
|
332
|
-
}> | Readonly<{
|
|
333
|
-
type: 'wheel';
|
|
334
|
-
cellX: number;
|
|
335
|
-
cellY: number;
|
|
336
|
-
clientX?: number;
|
|
337
|
-
clientY?: number;
|
|
338
|
-
deltaY: number;
|
|
339
|
-
ctrlKey?: boolean;
|
|
340
|
-
shiftKey?: boolean;
|
|
341
|
-
altKey?: boolean;
|
|
342
|
-
metaKey?: boolean;
|
|
343
|
-
time?: number;
|
|
344
|
-
}> | Readonly<{
|
|
345
|
-
type: 'beforeinput' | 'input' | 'compositionstart' | 'compositionupdate' | 'compositionend' | 'paste';
|
|
346
|
-
data?: string;
|
|
347
|
-
inputType?: string;
|
|
348
|
-
isComposing?: boolean;
|
|
349
|
-
text?: string;
|
|
350
|
-
time?: number;
|
|
351
|
-
}>;
|
|
352
|
-
|
|
353
|
-
//#endregion
|
|
354
|
-
//#region src/cli/input.d.ts
|
|
355
|
-
type Stdin = NodeJS.ReadStream;
|
|
356
|
-
type KeyboardProtocol = 'auto' | 'kitty' | 'xterm' | 'off';
|
|
357
|
-
type StdinDriver = Readonly<{
|
|
358
|
-
dispose: () => void;
|
|
359
|
-
}>;
|
|
360
|
-
declare function createStdinDriver(options: Readonly<{
|
|
361
|
-
dispatch: (event: TerminalEventRecord) => boolean | void;
|
|
362
|
-
stdin?: Stdin;
|
|
363
|
-
stdout?: NodeJS.WriteStream;
|
|
364
|
-
env?: Readonly<Record<string, unknown>>;
|
|
365
|
-
enableMouse?: boolean;
|
|
366
|
-
keyboardProtocol?: KeyboardProtocol;
|
|
367
|
-
/**
|
|
368
|
-
* Enable "any-motion" mouse tracking (xterm DECSET ?1003).
|
|
369
|
-
* This is required for hover interactions in the CLI, but can increase event volume.
|
|
370
|
-
*/
|
|
371
|
-
enableMouseMotion?: boolean;
|
|
372
|
-
onTerminalFocusChange?: (focused: boolean) => void;
|
|
373
|
-
onExit?: () => void;
|
|
374
|
-
}>): StdinDriver;
|
|
375
|
-
|
|
376
|
-
//#endregion
|
|
377
|
-
//#region src/cli/path-suggest-core.d.ts
|
|
378
|
-
type PathPickMode = 'directory' | 'file' | 'any';
|
|
379
|
-
type PathSuggestion = Readonly<{
|
|
380
|
-
kind: 'directory' | 'file';
|
|
381
|
-
display: string;
|
|
382
|
-
completion: string;
|
|
383
|
-
absPath: string;
|
|
384
|
-
}>;
|
|
385
|
-
type SuggestPathsResult = Readonly<{
|
|
386
|
-
baseDirAbs: string;
|
|
387
|
-
dirPrefix: string;
|
|
388
|
-
query: string;
|
|
389
|
-
suggestions: PathSuggestion[];
|
|
390
|
-
}>;
|
|
391
|
-
|
|
392
|
-
//#endregion
|
|
393
|
-
//#region src/cli/path-provider.d.ts
|
|
394
|
-
type FsEntryKind = 'file' | 'directory' | 'other';
|
|
395
|
-
type FsDirEntry = Readonly<{
|
|
396
|
-
name: string;
|
|
397
|
-
kind: FsEntryKind;
|
|
398
|
-
}>;
|
|
399
|
-
type FsStat = Readonly<{
|
|
400
|
-
exists: boolean;
|
|
401
|
-
kind: FsEntryKind;
|
|
402
|
-
}>;
|
|
403
|
-
type PathPickerProvider = Readonly<{
|
|
404
|
-
listDir: (absDir: string) => Promise<FsDirEntry[]>;
|
|
405
|
-
stat: (absPath: string) => Promise<FsStat>;
|
|
406
|
-
suggest?: (info: Readonly<{
|
|
407
|
-
workspaceAbs: string;
|
|
408
|
-
input: string;
|
|
409
|
-
mode: PathPickMode;
|
|
410
|
-
max: number;
|
|
411
|
-
showHidden?: boolean;
|
|
412
|
-
maxDepth?: number;
|
|
413
|
-
gitignore?: 'blocking' | 'nonBlocking';
|
|
414
|
-
}>) => Promise<SuggestPathsResult>;
|
|
415
|
-
resolvePath?: (workspaceAbs: string, input: string) => string | Promise<string>;
|
|
416
|
-
}>;
|
|
417
|
-
declare function createNodePathPickerProvider(): PathPickerProvider;
|
|
418
|
-
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region src/cli/path-suggest.d.ts
|
|
421
|
-
declare function suggestPaths(options: Readonly<{
|
|
422
|
-
workspaceAbs: string;
|
|
423
|
-
input: string;
|
|
424
|
-
mode: PathPickMode;
|
|
425
|
-
max: number;
|
|
426
|
-
showHidden?: boolean;
|
|
427
|
-
listDir: (absDir: string) => Promise<FsDirEntry[]>;
|
|
428
|
-
maxDepth?: number;
|
|
429
|
-
gitignore?: 'blocking' | 'nonBlocking';
|
|
430
|
-
}>): Promise<SuggestPathsResult>;
|
|
431
|
-
declare function resolveUserPath(workspaceAbs: string, input: string): string;
|
|
432
|
-
|
|
433
|
-
//#endregion
|
|
434
|
-
//#region src/cli/recording.d.ts
|
|
435
|
-
declare function writeEventLog(path: string, events: readonly TerminalEventRecord[]): Promise<void>;
|
|
436
|
-
declare function writeSnapshot(path: string, lines: readonly string[]): Promise<void>;
|
|
437
|
-
declare function readEventLog(path: string): Promise<TerminalEventRecord[]>;
|
|
438
|
-
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region src/core/ansi/capability.d.ts
|
|
441
|
-
type TerminalColorCapability = Readonly<{
|
|
442
|
-
mode: TerminalColorMode;
|
|
443
|
-
level: TerminalColorLevel;
|
|
444
|
-
}>;
|
|
445
|
-
/**
|
|
446
|
-
* Detect terminal output color capability.
|
|
447
|
-
*
|
|
448
|
-
* - `mode` is the best-effort actual output mode.
|
|
449
|
-
* - `level` is the CLI theme tier (256/16/8). `truecolor` folds into `256`.
|
|
450
|
-
* - Pass `platform` (e.g. `process.platform`) to improve Windows detection.
|
|
451
|
-
*
|
|
452
|
-
* Env overrides (prefer `DIMCODE_` but keep `VUE_TUI_*` for library consumers):
|
|
453
|
-
* - `DIMCODE_COLOR_MODE` / `VUE_TUI_COLOR_MODE`
|
|
454
|
-
*/
|
|
455
|
-
declare function detectTerminalColorCapability(opts?: Readonly<{
|
|
456
|
-
env?: Record<string, unknown>;
|
|
457
|
-
isTTY?: boolean;
|
|
458
|
-
platform?: string;
|
|
459
|
-
}>): TerminalColorCapability;
|
|
460
|
-
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region src/core/ansi/sgr.d.ts
|
|
463
|
-
interface AnsiSegment {
|
|
464
|
-
text: string;
|
|
465
|
-
style: Style;
|
|
466
|
-
}
|
|
467
|
-
declare function parseAnsiSgr(input: string, baseStyle?: Style): AnsiSegment[];
|
|
468
|
-
|
|
469
|
-
//#endregion
|
|
470
|
-
//#region src/core/buffer/width.d.ts
|
|
471
|
-
declare function charCellWidth(text: string): 1 | 2;
|
|
472
|
-
|
|
473
|
-
//#endregion
|
|
474
|
-
//#region src/core/terminal/create-terminal.d.ts
|
|
475
|
-
declare function createTerminal(opts: {
|
|
476
|
-
cols: number;
|
|
477
|
-
rows: number;
|
|
478
|
-
}): Terminal;
|
|
479
|
-
|
|
480
|
-
//#endregion
|
|
481
|
-
//#region src/renderer/dom/dom-renderer.d.ts
|
|
482
|
-
type CellMetrics = Readonly<{
|
|
483
|
-
cellWidth: number;
|
|
484
|
-
cellHeight: number;
|
|
485
|
-
}>;
|
|
486
|
-
interface DomRenderer {
|
|
487
|
-
readonly container: HTMLElement;
|
|
488
|
-
readonly metrics: CellMetrics;
|
|
489
|
-
dispose: () => void;
|
|
490
|
-
refresh: () => void;
|
|
491
|
-
setPlaneOffset: (plane: TerminalRenderPlane, offsetPx: number) => void;
|
|
492
|
-
setPlaneViewport: (plane: TerminalRenderPlane, viewport: Readonly<{
|
|
493
|
-
topPx: number;
|
|
494
|
-
heightPx: number;
|
|
495
|
-
}> | null) => void;
|
|
496
|
-
}
|
|
497
|
-
declare function createDomRenderer(terminal: Terminal, container: HTMLElement): DomRenderer;
|
|
498
|
-
|
|
499
|
-
//#endregion
|
|
500
|
-
//#region src/events/manager/types.d.ts
|
|
501
|
-
type Rect = Readonly<{
|
|
502
|
-
x: number;
|
|
503
|
-
y: number;
|
|
504
|
-
w: number;
|
|
505
|
-
h: number;
|
|
506
|
-
}>;
|
|
507
|
-
type TerminalEventType = 'click' | 'dblclick' | 'contextmenu' | 'pointerdown' | 'pointerup' | 'pointermove' | 'pointerenter' | 'pointerleave' | 'wheel' | 'keydown' | 'keyup' | 'beforeinput' | 'input' | 'compositionstart' | 'compositionupdate' | 'compositionend' | 'paste' | 'focus' | 'blur';
|
|
508
|
-
interface TerminalBaseEvent {
|
|
509
|
-
type: TerminalEventType;
|
|
510
|
-
target: TerminalNode | null;
|
|
511
|
-
currentTarget: TerminalNode | null;
|
|
512
|
-
eventPhase: 1 | 2 | 3;
|
|
513
|
-
bubbles: boolean;
|
|
514
|
-
cancelable: boolean;
|
|
515
|
-
defaultPrevented: boolean;
|
|
516
|
-
timeStamp: number;
|
|
517
|
-
stopPropagation: () => void;
|
|
518
|
-
preventDefault: () => void;
|
|
519
|
-
composedPath: () => TerminalNode[];
|
|
520
|
-
nativeEvent?: Event;
|
|
521
|
-
}
|
|
522
|
-
type TerminalPointerEvent = TerminalBaseEvent & {
|
|
523
|
-
clientX: number;
|
|
524
|
-
clientY: number;
|
|
525
|
-
cellX: number;
|
|
526
|
-
cellY: number;
|
|
527
|
-
button?: number;
|
|
528
|
-
buttons?: number;
|
|
529
|
-
ctrlKey?: boolean;
|
|
530
|
-
shiftKey?: boolean;
|
|
531
|
-
altKey?: boolean;
|
|
532
|
-
metaKey?: boolean;
|
|
533
|
-
deltaY?: number;
|
|
534
|
-
};
|
|
535
|
-
type TerminalKeyboardEvent = TerminalBaseEvent & {
|
|
536
|
-
key: string;
|
|
537
|
-
code: string;
|
|
538
|
-
combo: string;
|
|
539
|
-
ctrlKey?: boolean;
|
|
540
|
-
shiftKey?: boolean;
|
|
541
|
-
altKey?: boolean;
|
|
542
|
-
metaKey?: boolean;
|
|
543
|
-
repeat?: boolean;
|
|
544
|
-
};
|
|
545
|
-
type TerminalInputEvent = TerminalBaseEvent & {
|
|
546
|
-
inputType?: string;
|
|
547
|
-
data?: string;
|
|
548
|
-
isComposing?: boolean;
|
|
549
|
-
text?: string;
|
|
550
|
-
};
|
|
551
|
-
type TerminalEventHandlerMap = Partial<{
|
|
552
|
-
clickCapture: (e: TerminalPointerEvent) => void;
|
|
553
|
-
click: (e: TerminalPointerEvent) => void;
|
|
554
|
-
dblclickCapture: (e: TerminalPointerEvent) => void;
|
|
555
|
-
dblclick: (e: TerminalPointerEvent) => void;
|
|
556
|
-
contextmenuCapture: (e: TerminalPointerEvent) => void;
|
|
557
|
-
contextmenu: (e: TerminalPointerEvent) => void;
|
|
558
|
-
pointerdownCapture: (e: TerminalPointerEvent) => void;
|
|
559
|
-
pointerdown: (e: TerminalPointerEvent) => void;
|
|
560
|
-
pointerupCapture: (e: TerminalPointerEvent) => void;
|
|
561
|
-
pointerup: (e: TerminalPointerEvent) => void;
|
|
562
|
-
pointermoveCapture: (e: TerminalPointerEvent) => void;
|
|
563
|
-
pointermove: (e: TerminalPointerEvent) => void;
|
|
564
|
-
pointerenterCapture: (e: TerminalPointerEvent) => void;
|
|
565
|
-
pointerenter: (e: TerminalPointerEvent) => void;
|
|
566
|
-
pointerleaveCapture: (e: TerminalPointerEvent) => void;
|
|
567
|
-
pointerleave: (e: TerminalPointerEvent) => void;
|
|
568
|
-
wheelCapture: (e: TerminalPointerEvent) => void;
|
|
569
|
-
wheel: (e: TerminalPointerEvent) => void;
|
|
570
|
-
keydownCapture: (e: TerminalKeyboardEvent) => void;
|
|
571
|
-
keydown: (e: TerminalKeyboardEvent) => void;
|
|
572
|
-
keyupCapture: (e: TerminalKeyboardEvent) => void;
|
|
573
|
-
keyup: (e: TerminalKeyboardEvent) => void;
|
|
574
|
-
beforeinputCapture: (e: TerminalInputEvent) => void;
|
|
575
|
-
beforeinput: (e: TerminalInputEvent) => void;
|
|
576
|
-
inputCapture: (e: TerminalInputEvent) => void;
|
|
577
|
-
input: (e: TerminalInputEvent) => void;
|
|
578
|
-
compositionstartCapture: (e: TerminalInputEvent) => void;
|
|
579
|
-
compositionstart: (e: TerminalInputEvent) => void;
|
|
580
|
-
compositionupdateCapture: (e: TerminalInputEvent) => void;
|
|
581
|
-
compositionupdate: (e: TerminalInputEvent) => void;
|
|
582
|
-
compositionendCapture: (e: TerminalInputEvent) => void;
|
|
583
|
-
compositionend: (e: TerminalInputEvent) => void;
|
|
584
|
-
pasteCapture: (e: TerminalInputEvent) => void;
|
|
585
|
-
paste: (e: TerminalInputEvent) => void;
|
|
586
|
-
focusCapture: (e: TerminalBaseEvent) => void;
|
|
587
|
-
focus: (e: TerminalBaseEvent) => void;
|
|
588
|
-
blurCapture: (e: TerminalBaseEvent) => void;
|
|
589
|
-
blur: (e: TerminalBaseEvent) => void;
|
|
590
|
-
}>;
|
|
591
|
-
interface TerminalNode {
|
|
592
|
-
id: string;
|
|
593
|
-
rect: Rect;
|
|
594
|
-
zIndex: number;
|
|
595
|
-
visible?: boolean;
|
|
596
|
-
focusable?: boolean;
|
|
597
|
-
selectable?: boolean;
|
|
598
|
-
handlers: TerminalEventHandlerMap;
|
|
599
|
-
}
|
|
600
|
-
type TerminalDebugNode = Readonly<{
|
|
601
|
-
id: string;
|
|
602
|
-
rect: Rect;
|
|
603
|
-
zIndex: number;
|
|
604
|
-
visible: boolean;
|
|
605
|
-
focusable: boolean;
|
|
606
|
-
}>;
|
|
607
|
-
|
|
608
|
-
//#endregion
|
|
609
|
-
//#region src/events/manager/cli-event-manager.d.ts
|
|
610
|
-
interface CliEventManager {
|
|
611
|
-
register: (node: Omit<TerminalNode, 'id'> & {
|
|
612
|
-
id?: string;
|
|
613
|
-
}) => TerminalNode;
|
|
614
|
-
update: (id: string, next: Partial<Omit<TerminalNode, 'id'>>) => void;
|
|
615
|
-
unregister: (id: string) => void;
|
|
616
|
-
setMetrics: (next: CellMetrics) => void;
|
|
617
|
-
focus: (id: string | null) => void;
|
|
618
|
-
getFocused: () => string | null;
|
|
619
|
-
dispatch: (event: TerminalEventRecord) => boolean;
|
|
620
|
-
debugNodes: () => TerminalDebugNode[];
|
|
621
|
-
dispose: () => void;
|
|
622
|
-
}
|
|
623
|
-
declare function createCliEventManager(options?: Readonly<{
|
|
624
|
-
record?: (event: TerminalEventRecord) => void;
|
|
625
|
-
onFocusChange?: (prev: string | null, next: string | null) => void;
|
|
626
|
-
}>): CliEventManager;
|
|
627
|
-
|
|
628
|
-
//#endregion
|
|
629
|
-
//#region src/events/manager/event-manager.d.ts
|
|
630
|
-
interface EventManager {
|
|
631
|
-
register: (node: Omit<TerminalNode, 'id'> & {
|
|
632
|
-
id?: string;
|
|
633
|
-
}) => TerminalNode;
|
|
634
|
-
update: (id: string, next: Partial<Omit<TerminalNode, 'id'>>) => void;
|
|
635
|
-
unregister: (id: string) => void;
|
|
636
|
-
setMetrics: (next: CellMetrics) => void;
|
|
637
|
-
focus: (id: string | null) => void;
|
|
638
|
-
getFocused: () => string | null;
|
|
639
|
-
debugNodes: () => TerminalDebugNode[];
|
|
640
|
-
dispose: () => void;
|
|
641
|
-
}
|
|
642
|
-
declare function createEventManager(container: HTMLElement, metrics: CellMetrics, options?: Readonly<{
|
|
643
|
-
record?: (event: TerminalEventRecord) => void;
|
|
644
|
-
textInputTarget?: HTMLElement | null;
|
|
645
|
-
debugIme?: boolean;
|
|
646
|
-
onFocusChange?: (prev: string | null, next: string | null) => void;
|
|
647
|
-
}>): EventManager;
|
|
648
|
-
|
|
649
|
-
//#endregion
|
|
650
|
-
//#region src/observability/trace.d.ts
|
|
651
|
-
type TraceRecord = Readonly<{
|
|
652
|
-
type: 'event';
|
|
653
|
-
at: number;
|
|
654
|
-
event: TerminalEventRecord;
|
|
655
|
-
}> | Readonly<{
|
|
656
|
-
type: 'focus';
|
|
657
|
-
at: number;
|
|
658
|
-
prev: string | null;
|
|
659
|
-
next: string | null;
|
|
660
|
-
}> | Readonly<{
|
|
661
|
-
type: 'commit';
|
|
662
|
-
at: number;
|
|
663
|
-
dirtyRows: readonly number[] | null;
|
|
664
|
-
planes: TerminalRenderPlanes | null;
|
|
665
|
-
focusedId: string | null;
|
|
666
|
-
}>;
|
|
667
|
-
type TraceStore = Readonly<{
|
|
668
|
-
enabled: Ref<boolean>;
|
|
669
|
-
records: TraceRecord[];
|
|
670
|
-
push: (record: TraceRecord) => void;
|
|
671
|
-
clear: () => void;
|
|
672
|
-
snapshot: () => TraceRecord[];
|
|
673
|
-
}>;
|
|
674
|
-
declare function createTraceStore(opts?: Readonly<{
|
|
675
|
-
enabled?: boolean;
|
|
676
|
-
max?: number;
|
|
677
|
-
}>): TraceStore;
|
|
678
|
-
|
|
679
|
-
//#endregion
|
|
680
|
-
//#region src/renderer/cli/stdout-renderer.d.ts
|
|
681
|
-
type CliOutput = Readonly<{
|
|
682
|
-
write: (chunk: string) => unknown;
|
|
683
|
-
isTTY?: boolean;
|
|
684
|
-
}>;
|
|
685
|
-
type StdoutRenderer = Readonly<{
|
|
686
|
-
render: () => void;
|
|
687
|
-
dispose: () => void;
|
|
688
|
-
/** Move terminal cursor to specified cell position for IME input */
|
|
689
|
-
setCursor: (x: number, y: number) => void;
|
|
690
|
-
/** Show or hide the terminal cursor */
|
|
691
|
-
showCursor: (visible: boolean) => void;
|
|
692
|
-
/** Update palette/default background without recreating the renderer. */
|
|
693
|
-
updateTheme?: (next: Readonly<{
|
|
694
|
-
defaultBg?: AnsiColorName;
|
|
695
|
-
palette?: Partial<Record<AnsiColorName, string>>;
|
|
696
|
-
}>) => void;
|
|
697
|
-
}>;
|
|
698
|
-
type StdoutColorMode = 'auto' | 'truecolor' | 'ansi256' | 'ansi16' | 'ansi8';
|
|
699
|
-
declare function createStdoutRenderer(terminal: Terminal, options?: Readonly<{
|
|
700
|
-
output?: CliOutput;
|
|
701
|
-
clear?: boolean;
|
|
702
|
-
hideCursor?: boolean;
|
|
703
|
-
altScreen?: boolean;
|
|
704
|
-
/** Fallback background color when a cell has no explicit bg. */
|
|
705
|
-
defaultBg?: AnsiColorName;
|
|
706
|
-
palette?: Partial<Record<AnsiColorName, string>>;
|
|
707
|
-
/** Track TTY resize events (process.stdout 'resize') and call terminal.resize(). */
|
|
708
|
-
trackResize?: boolean;
|
|
709
|
-
/** Color mode for ANSI output (auto detects truecolor via env). */
|
|
710
|
-
colorMode?: StdoutColorMode;
|
|
711
|
-
/** Optional function to get IME cursor position, included in render output for atomic write */
|
|
712
|
-
getImeAnchor?: () => {
|
|
713
|
-
cellX: number;
|
|
714
|
-
cellY: number;
|
|
715
|
-
} | null;
|
|
716
|
-
/** Use DEC 2026 synchronized output mode (default: false for compatibility) */
|
|
717
|
-
useSyncOutput?: boolean;
|
|
718
|
-
}>): StdoutRenderer;
|
|
719
|
-
|
|
720
|
-
//#endregion
|
|
721
|
-
//#region src/vue/render/render-manager.d.ts
|
|
722
|
-
type RenderRect = Readonly<{
|
|
723
|
-
x: number;
|
|
724
|
-
y: number;
|
|
725
|
-
w: number;
|
|
726
|
-
h: number;
|
|
727
|
-
}>;
|
|
728
|
-
type RenderStack = Readonly<{
|
|
729
|
-
id: string;
|
|
730
|
-
parent: RenderStack | null;
|
|
731
|
-
zIndex: number;
|
|
732
|
-
order: number;
|
|
733
|
-
}>;
|
|
734
|
-
type RenderNode = Readonly<{
|
|
735
|
-
id: string;
|
|
736
|
-
stack: RenderStack;
|
|
737
|
-
plane: TerminalRenderPlane;
|
|
738
|
-
zIndex: number;
|
|
739
|
-
order: number;
|
|
740
|
-
rect: RenderRect | null;
|
|
741
|
-
rectY0: number;
|
|
742
|
-
rectY1: number;
|
|
743
|
-
paint: (dirtyRows?: readonly number[]) => void;
|
|
744
|
-
}>;
|
|
745
|
-
type RenderManager = Readonly<{
|
|
746
|
-
rootStack: RenderStack;
|
|
747
|
-
createStack: (parent: RenderStack, zIndex: number) => RenderStack;
|
|
748
|
-
invalidatePlane: (plane: TerminalRenderPlane) => void;
|
|
749
|
-
scrollPlane: (plane: TerminalRenderPlane, startY: number, endY: number, delta: number) => void;
|
|
750
|
-
register: (node: {
|
|
751
|
-
stack: RenderStack;
|
|
752
|
-
plane?: TerminalRenderPlane;
|
|
753
|
-
zIndex?: number;
|
|
754
|
-
rect?: RenderRect | null;
|
|
755
|
-
paint: (dirtyRows?: readonly number[]) => void;
|
|
756
|
-
}) => RenderNode;
|
|
757
|
-
update: (id: string, next: Partial<{
|
|
758
|
-
stack: RenderStack;
|
|
759
|
-
plane: TerminalRenderPlane;
|
|
760
|
-
zIndex: number;
|
|
761
|
-
rect: RenderRect | null;
|
|
762
|
-
dirtyRowsHint: readonly number[];
|
|
763
|
-
paint: (dirtyRows?: readonly number[]) => void;
|
|
764
|
-
}>) => void;
|
|
765
|
-
unregister: (id: string) => void;
|
|
766
|
-
render: (options?: {
|
|
767
|
-
activePlanes?: TerminalRenderPlanes | null;
|
|
768
|
-
}) => RenderStats | null;
|
|
769
|
-
}>;
|
|
770
|
-
type RenderStats = Readonly<{
|
|
771
|
-
rows: number;
|
|
772
|
-
scannedNodes: number;
|
|
773
|
-
paintedNodes: number;
|
|
774
|
-
candidatePlanes: readonly TerminalRenderPlane[];
|
|
775
|
-
}>;
|
|
776
|
-
|
|
777
|
-
//#endregion
|
|
778
|
-
//#region src/vue/context.d.ts
|
|
779
|
-
interface LayoutContext {
|
|
780
|
-
originX: number;
|
|
781
|
-
originY: number;
|
|
782
|
-
clipRect: Rect | null;
|
|
783
|
-
}
|
|
784
|
-
type TerminalSchedulerPriority = 'high' | 'normal' | 'low';
|
|
785
|
-
type TerminalSchedulerInvalidateOptions = Readonly<{
|
|
786
|
-
priority?: TerminalSchedulerPriority;
|
|
787
|
-
plane?: TerminalRenderPlane;
|
|
788
|
-
}>;
|
|
789
|
-
type TerminalScheduler = Readonly<{
|
|
790
|
-
invalidate: (options?: TerminalSchedulerInvalidateOptions) => void;
|
|
791
|
-
flush: () => void;
|
|
792
|
-
flushNow: () => void;
|
|
793
|
-
}>;
|
|
794
|
-
type TerminalRuntimeHandle = Readonly<{
|
|
795
|
-
update: (props: Record<string, unknown>) => void;
|
|
796
|
-
move: (x: number, y: number) => void;
|
|
797
|
-
unmount: () => void;
|
|
798
|
-
}>;
|
|
799
|
-
type TerminalRuntime = Readonly<{
|
|
800
|
-
mount: (component: Component$1, props: Record<string, unknown>, options?: Readonly<{
|
|
801
|
-
plane?: TerminalRenderPlane;
|
|
802
|
-
}>) => TerminalRuntimeHandle;
|
|
803
|
-
}>;
|
|
804
|
-
type ImeAnchor = Readonly<{
|
|
805
|
-
cellX: number;
|
|
806
|
-
cellY: number;
|
|
807
|
-
ownerId?: string;
|
|
808
|
-
}>;
|
|
809
|
-
type TerminalContext = Readonly<{
|
|
810
|
-
terminal: Terminal;
|
|
811
|
-
renderer: Ref<DomRenderer | null>;
|
|
812
|
-
events: Ref<EventManager | null>;
|
|
813
|
-
scheduler: TerminalScheduler;
|
|
814
|
-
runtime: TerminalRuntime;
|
|
815
|
-
observability: Readonly<{
|
|
816
|
-
trace: TraceStore;
|
|
817
|
-
}>;
|
|
818
|
-
defaultStyle: Ref<Style>;
|
|
819
|
-
render: RenderManager;
|
|
820
|
-
}>;
|
|
821
|
-
declare const TInputPluginsContextKey: InjectionKey<Readonly<Ref<readonly TInputPlugin[]>>>;
|
|
822
|
-
|
|
823
|
-
//#endregion
|
|
824
|
-
//#region src/vue/components/input/host.d.ts
|
|
825
|
-
type ResolveTInputPathInfo = Readonly<{
|
|
826
|
-
workspace: string;
|
|
827
|
-
input: string;
|
|
828
|
-
preserveBackslash?: boolean;
|
|
829
|
-
homeDir?: string;
|
|
830
|
-
}>;
|
|
831
|
-
type TInputHostAdapter = Readonly<{
|
|
832
|
-
isTerminalLike?: boolean;
|
|
833
|
-
resolvePath?: (info: ResolveTInputPathInfo) => string;
|
|
834
|
-
pathToHref?: (pathLike: string) => string | undefined;
|
|
835
|
-
readClipboardText?: () => Promise<string>;
|
|
836
|
-
writeClipboardText?: (text: string) => Promise<boolean>;
|
|
837
|
-
showToast?: (message: string) => void;
|
|
838
|
-
}>;
|
|
839
|
-
|
|
840
|
-
//#endregion
|
|
841
|
-
//#region src/vue/components/input/plugins/types.d.ts
|
|
842
|
-
type PromptSuggestion = Readonly<{
|
|
843
|
-
value: string;
|
|
844
|
-
insert?: string;
|
|
845
|
-
label?: string;
|
|
846
|
-
detail?: string;
|
|
847
|
-
keywords?: readonly string[];
|
|
848
|
-
mentionValue?: string;
|
|
849
|
-
mentionBehavior?: 'collect' | 'inline';
|
|
850
|
-
onSelect?: (info: Readonly<{
|
|
851
|
-
value: string;
|
|
852
|
-
query: string;
|
|
853
|
-
}>) => void | boolean;
|
|
854
|
-
}>;
|
|
855
|
-
type TInputPluginContext = Readonly<{
|
|
856
|
-
getProps: () => Readonly<{
|
|
857
|
-
zIndex: number;
|
|
858
|
-
style?: Style;
|
|
859
|
-
promptSuggestions: readonly PromptSuggestion[];
|
|
860
|
-
promptTrigger: string;
|
|
861
|
-
promptTriggers?: readonly string[];
|
|
862
|
-
promptMaxItems: number;
|
|
863
|
-
promptAlign: 'input' | 'center';
|
|
864
|
-
promptSelectedStyle?: Style;
|
|
865
|
-
mentionTrigger: string;
|
|
866
|
-
mentionWorkspace: string;
|
|
867
|
-
mentionMode: PathPickMode;
|
|
868
|
-
mentionShowHidden: boolean;
|
|
869
|
-
mentionSuggestions: readonly PromptSuggestion[];
|
|
870
|
-
mentionMaxItems: number;
|
|
871
|
-
collectMentions: boolean;
|
|
872
|
-
mentions: readonly string[];
|
|
873
|
-
skillTrigger?: string;
|
|
874
|
-
skillSuggestions?: readonly PromptSuggestion[];
|
|
875
|
-
}>;
|
|
876
|
-
emit: (event: string, ...args: any[]) => void;
|
|
877
|
-
terminal: Terminal;
|
|
878
|
-
scheduler: TerminalScheduler;
|
|
879
|
-
defaultStyle: Ref<Style>;
|
|
880
|
-
render: Readonly<{
|
|
881
|
-
rootStack: any;
|
|
882
|
-
createStack: (parent: any, z: number) => any;
|
|
883
|
-
invalidatePlane: (plane: TerminalRenderPlane) => void;
|
|
884
|
-
}>;
|
|
885
|
-
visible: Ref<boolean>;
|
|
886
|
-
rawAbsRect: ComputedRef<Rect>;
|
|
887
|
-
eventZ: ComputedRef<number>;
|
|
888
|
-
focused: Ref<boolean>;
|
|
889
|
-
cursor: Ref<number>;
|
|
890
|
-
getValue: () => string;
|
|
891
|
-
insertText: (text: string) => void;
|
|
892
|
-
pushUndoSnapshot: (nextValue: string) => void;
|
|
893
|
-
applyEdit: (nextValue: string, nextCursor: number) => void;
|
|
894
|
-
registerKeydownInterceptor: (fn: (e: TerminalKeyboardEvent) => boolean) => void;
|
|
895
|
-
registerTextFilter: (fn: (info: Readonly<{
|
|
896
|
-
text: string;
|
|
897
|
-
value: string;
|
|
898
|
-
cursor: number;
|
|
899
|
-
selection: null | Readonly<{
|
|
900
|
-
start: number;
|
|
901
|
-
end: number;
|
|
902
|
-
}>;
|
|
903
|
-
}>) => string) => void;
|
|
904
|
-
registerChipStyleProvider: (provider: Readonly<{
|
|
905
|
-
getStyle: (baseStyle: Style, chip: Readonly<{
|
|
906
|
-
kind: 'multiline' | 'mention';
|
|
907
|
-
absPath?: string;
|
|
908
|
-
}>) => Style | null | undefined;
|
|
909
|
-
version: Ref<number>;
|
|
910
|
-
}> | null) => void;
|
|
911
|
-
registerHostAdapter: (adapter: TInputHostAdapter | null) => void;
|
|
912
|
-
resolvePath: (input: string, opts?: Readonly<{
|
|
913
|
-
preserveBackslash?: boolean;
|
|
914
|
-
}>) => string;
|
|
915
|
-
mentionToken: string;
|
|
916
|
-
}>;
|
|
917
|
-
type TInputPlugin = Readonly<{
|
|
918
|
-
name: string;
|
|
919
|
-
install: (ctx: TInputPluginContext) => void;
|
|
920
|
-
}>;
|
|
921
|
-
|
|
922
|
-
//#endregion
|
|
923
|
-
//#region src/create-terminal-app.d.ts
|
|
924
|
-
type TerminalApp = Readonly<{
|
|
925
|
-
app: App;
|
|
926
|
-
terminal: Terminal;
|
|
927
|
-
events: CliEventManager;
|
|
928
|
-
scheduler: {
|
|
929
|
-
invalidate: (options?: TerminalSchedulerInvalidateOptions) => void;
|
|
930
|
-
flush: () => void;
|
|
931
|
-
flushNow: () => void;
|
|
932
|
-
};
|
|
933
|
-
defaultStyle: Ref<Style>;
|
|
934
|
-
/** Returns the current IME anchor position (cursor position in cell coordinates), or null if no input is focused */
|
|
935
|
-
getImeAnchor: () => ImeAnchor | null;
|
|
936
|
-
mount: () => void;
|
|
937
|
-
dispose: () => void;
|
|
938
|
-
}>;
|
|
939
|
-
type CreateTerminalAppOptions = Readonly<{
|
|
940
|
-
cols: number;
|
|
941
|
-
rows: number;
|
|
942
|
-
component: Component$1;
|
|
943
|
-
props?: Record<string, unknown>;
|
|
944
|
-
defaultStyle?: Style;
|
|
945
|
-
inputPlugins?: readonly TInputPlugin[];
|
|
946
|
-
pathPickerProvider?: PathPickerProvider;
|
|
947
|
-
}>;
|
|
948
|
-
declare function createTerminalApp(options: CreateTerminalAppOptions): TerminalApp;
|
|
949
|
-
|
|
950
|
-
//#endregion
|
|
951
|
-
//#region src/observability/cli-latency.d.ts
|
|
952
|
-
type StageEvent = Readonly<Record<string, unknown>> & {
|
|
953
|
-
type?: unknown;
|
|
954
|
-
key?: unknown;
|
|
955
|
-
code?: unknown;
|
|
956
|
-
};
|
|
957
|
-
type CliLatencyProfiler = Readonly<{
|
|
958
|
-
enabled: true;
|
|
959
|
-
recordRawInput: (info?: Readonly<{
|
|
960
|
-
bytes?: number;
|
|
961
|
-
}>) => void;
|
|
962
|
-
recordStdinDispatch: (event: StageEvent, info?: Readonly<{
|
|
963
|
-
parser?: string | null;
|
|
964
|
-
}>) => void;
|
|
965
|
-
recordEventDispatchStart: (event: StageEvent) => void;
|
|
966
|
-
recordEventDispatchEnd: (event: StageEvent, info: Readonly<{
|
|
967
|
-
defaultPrevented: boolean;
|
|
968
|
-
}>) => void;
|
|
969
|
-
recordSchedulerInvalidate: (info?: Readonly<{
|
|
970
|
-
priority?: string | null;
|
|
971
|
-
plane?: string | null;
|
|
972
|
-
}>) => void;
|
|
973
|
-
recordFlushStart: (info?: Readonly<{
|
|
974
|
-
sync?: boolean;
|
|
975
|
-
activePlanes?: readonly string[] | null;
|
|
976
|
-
}>) => void;
|
|
977
|
-
recordFlushEnd: () => void;
|
|
978
|
-
recordCommit: (info?: Readonly<{
|
|
979
|
-
sync?: boolean;
|
|
980
|
-
dirtyRows?: readonly number[] | null;
|
|
981
|
-
planes?: readonly string[] | null;
|
|
982
|
-
}>) => void;
|
|
983
|
-
recordStdoutQueued: (delayMs: number) => void;
|
|
984
|
-
recordStdoutRenderStart: () => void;
|
|
985
|
-
recordStdoutNoOutput: () => void;
|
|
986
|
-
recordStdoutWrite: (info: Readonly<{
|
|
987
|
-
durationMs: number;
|
|
988
|
-
bytes: number;
|
|
989
|
-
mode: string;
|
|
990
|
-
}>) => void;
|
|
991
|
-
markOperation: (operation: string) => void;
|
|
992
|
-
}>;
|
|
993
|
-
declare function getCliLatencyProfiler(): CliLatencyProfiler | null;
|
|
994
|
-
|
|
995
|
-
//#endregion
|
|
996
|
-
//#region src/renderer/cli/stdout-metrics.d.ts
|
|
997
|
-
type StdoutRendererWriteMode = 'stream' | 'sync' | 'chunked';
|
|
998
|
-
interface StdoutRendererMetrics {
|
|
999
|
-
lastFrameAt: number;
|
|
1000
|
-
lastFrameBytes: number;
|
|
1001
|
-
lastWriteMs: number;
|
|
1002
|
-
writeEmaMs: number;
|
|
1003
|
-
writeMode: StdoutRendererWriteMode;
|
|
1004
|
-
fps: number;
|
|
1005
|
-
bytesPerSec: number;
|
|
1006
|
-
}
|
|
1007
|
-
declare function getStdoutRendererMetrics(): StdoutRendererMetrics;
|
|
1008
|
-
|
|
1009
|
-
//#endregion
|
|
1010
|
-
//#region src/runtime/index.d.ts
|
|
1011
|
-
type RuntimeEnv = 'browser' | 'terminal' | 'unknown';
|
|
1012
|
-
type TimerApi = Readonly<{
|
|
1013
|
-
setTimeout: typeof setTimeout;
|
|
1014
|
-
clearTimeout: typeof clearTimeout;
|
|
1015
|
-
setInterval: typeof setInterval;
|
|
1016
|
-
clearInterval: typeof clearInterval;
|
|
1017
|
-
}>;
|
|
1018
|
-
type RafApi = Readonly<{
|
|
1019
|
-
request: (cb: FrameRequestCallback) => number;
|
|
1020
|
-
cancel: (id: number) => void;
|
|
1021
|
-
}>;
|
|
1022
|
-
type ClipboardApi = Readonly<{
|
|
1023
|
-
supported: boolean;
|
|
1024
|
-
readText: () => Promise<string>;
|
|
1025
|
-
writeText: (text: string) => Promise<void>;
|
|
1026
|
-
}>;
|
|
1027
|
-
type Runtime = Readonly<{
|
|
1028
|
-
env: Readonly<{
|
|
1029
|
-
kind: RuntimeEnv;
|
|
1030
|
-
isBrowser: boolean;
|
|
1031
|
-
isTerminal: boolean;
|
|
1032
|
-
}>;
|
|
1033
|
-
now: () => number;
|
|
1034
|
-
timer: TimerApi;
|
|
1035
|
-
raf: RafApi;
|
|
1036
|
-
clipboard: ClipboardApi;
|
|
1037
|
-
getWindow: () => Window | null;
|
|
1038
|
-
getDocument: () => Document | null;
|
|
1039
|
-
measureText: (text: string, opts?: Readonly<{
|
|
1040
|
-
font?: string;
|
|
1041
|
-
}>) => number | null;
|
|
1042
|
-
}>;
|
|
1043
|
-
declare function createRuntime(kind?: RuntimeEnv): Runtime;
|
|
1044
|
-
|
|
1045
|
-
//#endregion
|
|
1046
|
-
//#region src/utils/newlines.d.ts
|
|
1047
|
-
declare function normalizeNewlines(text: string): string;
|
|
1048
|
-
|
|
1049
|
-
//#endregion
|
|
1050
|
-
//#region src/vue/components/input/plugins/hostPlugin.d.ts
|
|
1051
|
-
declare function createTInputHostPlugin(adapterOrFactory: TInputHostAdapter | (() => TInputHostAdapter)): TInputPlugin;
|
|
1052
|
-
declare function createDefaultTInputHostAdapter(): TInputHostAdapter;
|
|
1053
|
-
declare const defaultTInputHostPlugin: Readonly<{
|
|
1054
|
-
name: string;
|
|
1055
|
-
install: (ctx: TInputPluginContext) => void;
|
|
1056
|
-
}>;
|
|
1057
|
-
|
|
1058
|
-
//#endregion
|
|
1059
|
-
//#region src/vue/components/input/plugins/promptMentionState.d.ts
|
|
1060
|
-
type PromptSuggestion$1 = Readonly<{
|
|
1061
|
-
value: string;
|
|
1062
|
-
insert?: string;
|
|
1063
|
-
label?: string;
|
|
1064
|
-
detail?: string;
|
|
1065
|
-
keywords?: readonly string[];
|
|
1066
|
-
mentionValue?: string;
|
|
1067
|
-
mentionBehavior?: 'collect' | 'inline';
|
|
1068
|
-
onSelect?: (info: Readonly<{
|
|
1069
|
-
value: string;
|
|
1070
|
-
query: string;
|
|
1071
|
-
}>) => void | boolean;
|
|
1072
|
-
}>;
|
|
1073
|
-
type MentionSuggestionProvider = (info: Readonly<{
|
|
1074
|
-
query: string;
|
|
1075
|
-
tokenText: string;
|
|
1076
|
-
trigger: string;
|
|
1077
|
-
workspace: string;
|
|
1078
|
-
maxItems: number;
|
|
1079
|
-
}>) => readonly PromptSuggestion$1[] | Promise<readonly PromptSuggestion$1[]>;
|
|
1080
|
-
type MentionPathProvider = Readonly<{
|
|
1081
|
-
stat?: (absPath: string) => FsEntryKind | null | undefined | Promise<FsEntryKind | null | undefined>;
|
|
1082
|
-
suggest?: (info: Readonly<{
|
|
1083
|
-
workspaceAbs: string;
|
|
1084
|
-
input: string;
|
|
1085
|
-
mode: PathPickMode;
|
|
1086
|
-
max: number;
|
|
1087
|
-
showHidden: boolean;
|
|
1088
|
-
maxDepth: number;
|
|
1089
|
-
}>) => readonly PathSuggestion[] | Promise<readonly PathSuggestion[]>;
|
|
1090
|
-
}>;
|
|
1091
|
-
|
|
1092
|
-
//#endregion
|
|
1093
|
-
//#region src/vue/components/input/plugins/nodeMentionPathProvider.d.ts
|
|
1094
|
-
declare function createNodeMentionPathProvider(): MentionPathProvider;
|
|
1095
|
-
|
|
1096
|
-
//#endregion
|
|
1097
|
-
//#region src/vue/components/input/plugins/promptMentionPlugin.d.ts
|
|
1098
|
-
type PromptMentionPluginOptions = Readonly<{
|
|
1099
|
-
mentionSuggestionProviders?: readonly MentionSuggestionProvider[];
|
|
1100
|
-
mentionPathProvider?: MentionPathProvider;
|
|
1101
|
-
}>;
|
|
1102
|
-
declare function createPromptMentionPlugin(options?: PromptMentionPluginOptions): TInputPlugin;
|
|
1103
|
-
|
|
1104
|
-
//#endregion
|
|
1105
|
-
//#region src/vue/components/input/plugins/restrictText.d.ts
|
|
1106
|
-
type TextRestrictionRule = Readonly<{
|
|
1107
|
-
allowChars: RegExp;
|
|
1108
|
-
} | {
|
|
1109
|
-
denyChars: RegExp;
|
|
1110
|
-
} | {
|
|
1111
|
-
replace: Readonly<{
|
|
1112
|
-
from: RegExp;
|
|
1113
|
-
to: string;
|
|
1114
|
-
}>;
|
|
1115
|
-
} | {
|
|
1116
|
-
allow: RegExp;
|
|
1117
|
-
} | {
|
|
1118
|
-
filter: (info: Readonly<{
|
|
1119
|
-
text: string;
|
|
1120
|
-
value: string;
|
|
1121
|
-
cursor: number;
|
|
1122
|
-
selection: null | Readonly<{
|
|
1123
|
-
start: number;
|
|
1124
|
-
end: number;
|
|
1125
|
-
}>;
|
|
1126
|
-
}>) => string;
|
|
1127
|
-
}>;
|
|
1128
|
-
declare function createTextRestrictionPlugin(options: Readonly<{
|
|
1129
|
-
name?: string;
|
|
1130
|
-
rules: readonly TextRestrictionRule[];
|
|
1131
|
-
}>): TInputPlugin;
|
|
1132
|
-
|
|
1133
|
-
//#endregion
|
|
1134
|
-
//#region src/vue/components/TAnchor.d.ts
|
|
1135
|
-
declare const TAnchor: any;
|
|
1136
|
-
|
|
1137
|
-
//#endregion
|
|
1138
|
-
//#region src/vue/components/TBox.d.ts
|
|
1139
|
-
declare const TBox: any;
|
|
1140
|
-
|
|
1141
|
-
//#endregion
|
|
1142
|
-
//#region src/vue/components/TDebugOverlay.d.ts
|
|
1143
|
-
declare const TDebugOverlay: any;
|
|
1144
|
-
|
|
1145
|
-
//#endregion
|
|
1146
|
-
//#region src/vue/components/TDialog.d.ts
|
|
1147
|
-
declare const TDialog: any;
|
|
1148
|
-
|
|
1149
|
-
//#endregion
|
|
1150
|
-
//#region src/vue/components/TerminalProvider.d.ts
|
|
1151
|
-
declare const TerminalProvider: any;
|
|
1152
|
-
|
|
1153
|
-
//#endregion
|
|
1154
|
-
//#region src/vue/components/TFlow.d.ts
|
|
1155
|
-
declare const TFlow: any;
|
|
1156
|
-
|
|
1157
|
-
//#endregion
|
|
1158
|
-
//#region src/vue/components/TInput.d.ts
|
|
1159
|
-
declare const TInput: any;
|
|
1160
|
-
|
|
1161
|
-
//#endregion
|
|
1162
|
-
//#region src/vue/components/TInputBox.d.ts
|
|
1163
|
-
declare const TInputBox: any;
|
|
1164
|
-
|
|
1165
|
-
//#endregion
|
|
1166
|
-
//#region src/vue/components/TJsonEditor.d.ts
|
|
1167
|
-
type JsonLintStatus = Readonly<{
|
|
1168
|
-
state: 'idle' | 'success' | 'error';
|
|
1169
|
-
message?: string;
|
|
1170
|
-
line?: number;
|
|
1171
|
-
column?: number;
|
|
1172
|
-
}>;
|
|
1173
|
-
declare function lintJsonText(input: string): JsonLintStatus;
|
|
1174
|
-
declare const TJsonEditor: any;
|
|
1175
|
-
|
|
1176
|
-
//#endregion
|
|
1177
|
-
//#region src/vue/components/TList.d.ts
|
|
1178
|
-
declare const TList: any;
|
|
1179
|
-
|
|
1180
|
-
//#endregion
|
|
1181
|
-
//#region src/vue/components/TMultilineModal.d.ts
|
|
1182
|
-
declare const TMultilineModal: any;
|
|
1183
|
-
|
|
1184
|
-
//#endregion
|
|
1185
|
-
//#region src/vue/components/TPathPicker.d.ts
|
|
1186
|
-
declare const TPathPicker: any;
|
|
1187
|
-
|
|
1188
|
-
//#endregion
|
|
1189
|
-
//#region src/vue/components/TRenderLayer.d.ts
|
|
1190
|
-
declare const TRenderLayer: any;
|
|
1191
|
-
|
|
1192
|
-
//#endregion
|
|
1193
|
-
//#region src/vue/components/TRenderPlane.d.ts
|
|
1194
|
-
declare const TRenderPlane: any;
|
|
1195
|
-
|
|
1196
|
-
//#endregion
|
|
1197
|
-
//#region src/vue/components/TSelect.d.ts
|
|
1198
|
-
declare const TSelect: any;
|
|
1199
|
-
|
|
1200
|
-
//#endregion
|
|
1201
|
-
//#region src/vue/components/TText.d.ts
|
|
1202
|
-
declare const TText: any;
|
|
1203
|
-
|
|
1204
|
-
//#endregion
|
|
1205
|
-
//#region src/vue/components/TTransition.d.ts
|
|
1206
|
-
declare const TTransition: any;
|
|
1207
|
-
|
|
1208
|
-
//#endregion
|
|
1209
|
-
//#region src/vue/components/TView.d.ts
|
|
1210
|
-
declare const TView: any;
|
|
1211
|
-
|
|
1212
|
-
//#endregion
|
|
1213
|
-
//#region src/vue/composables/use-layout.d.ts
|
|
1214
|
-
declare function useLayout(): LayoutContext;
|
|
1215
|
-
|
|
1216
|
-
//#endregion
|
|
1217
|
-
//#region src/vue/composables/use-render-node.d.ts
|
|
1218
|
-
interface RenderNodeOptions {
|
|
1219
|
-
zIndex?: number;
|
|
1220
|
-
stack?: RenderStack;
|
|
1221
|
-
rect?: RenderRect | null;
|
|
1222
|
-
dirtyRowsHint?: readonly number[];
|
|
1223
|
-
priority?: TerminalSchedulerPriority;
|
|
1224
|
-
deps?: unknown;
|
|
1225
|
-
paint: (dirtyRows?: readonly number[]) => void;
|
|
1226
|
-
}
|
|
1227
|
-
declare function useRenderNode(getOptions: () => RenderNodeOptions): {
|
|
1228
|
-
id: Ref<string | null>;
|
|
1229
|
-
};
|
|
1230
|
-
|
|
1231
|
-
//#endregion
|
|
1232
|
-
//#region src/vue/composables/use-runtime.d.ts
|
|
1233
|
-
declare function useTerminalRuntime(): Readonly<{
|
|
1234
|
-
mount: (component: Component, props: Record<string, unknown>, options?: Readonly<{
|
|
1235
|
-
plane?: TerminalRenderPlane;
|
|
1236
|
-
}>) => TerminalRuntimeHandle;
|
|
1237
|
-
}>;
|
|
1238
|
-
|
|
1239
|
-
//#endregion
|
|
1240
|
-
//#region src/vue/composables/use-terminal-node.d.ts
|
|
1241
|
-
interface TerminalNodeOptions {
|
|
1242
|
-
rect: Rect;
|
|
1243
|
-
zIndex?: number;
|
|
1244
|
-
visible?: boolean;
|
|
1245
|
-
focusable?: boolean;
|
|
1246
|
-
selectable?: boolean;
|
|
1247
|
-
handlers?: TerminalEventHandlerMap;
|
|
1248
|
-
}
|
|
1249
|
-
declare function useTerminalNode(getOptions: () => TerminalNodeOptions): {
|
|
1250
|
-
id: Ref<string | null>;
|
|
1251
|
-
};
|
|
1252
|
-
|
|
1253
|
-
//#endregion
|
|
1254
|
-
//#region src/vue/composables/use-terminal.d.ts
|
|
1255
|
-
declare function useTerminal(): TerminalContext;
|
|
1256
|
-
|
|
1257
|
-
//#endregion
|
|
1258
|
-
//#region src/vue/composables/use-visibility.d.ts
|
|
1259
|
-
type VisibilityRootProps = Readonly<{
|
|
1260
|
-
style: Readonly<Record<string, string | number>>;
|
|
1261
|
-
onVnodeBeforeMount: (vnode: VNode) => void;
|
|
1262
|
-
onVnodeBeforeUnmount: (vnode: VNode) => void;
|
|
1263
|
-
}>;
|
|
1264
|
-
declare function useVisibility(options?: {
|
|
1265
|
-
provide?: boolean;
|
|
1266
|
-
}): Readonly<{
|
|
1267
|
-
visible: ComputedRef<boolean>;
|
|
1268
|
-
rootProps: VisibilityRootProps;
|
|
1269
|
-
}>;
|
|
1270
|
-
|
|
1271
|
-
//#endregion
|
|
1272
|
-
//#region src/vue/router/types.d.ts
|
|
1273
|
-
type TerminalRoute = Readonly<{
|
|
1274
|
-
name: string;
|
|
1275
|
-
params?: Readonly<Record<string, string>>;
|
|
1276
|
-
meta?: unknown;
|
|
1277
|
-
}>;
|
|
1278
|
-
type TerminalRouteRecord = Readonly<{
|
|
1279
|
-
name: string;
|
|
1280
|
-
component: Component$1;
|
|
1281
|
-
meta?: unknown;
|
|
1282
|
-
onEnter?: (to: TerminalRoute, from: TerminalRoute | null) => void | Promise<void>;
|
|
1283
|
-
onLeave?: (to: TerminalRoute, from: TerminalRoute | null) => void | Promise<void>;
|
|
1284
|
-
}>;
|
|
1285
|
-
type TerminalRouteLocationRaw = string | Readonly<{
|
|
1286
|
-
name: string;
|
|
1287
|
-
params?: Record<string, string>;
|
|
1288
|
-
}>;
|
|
1289
|
-
type NavigationGuardReturn = void | boolean | TerminalRouteLocationRaw;
|
|
1290
|
-
type NavigationGuard = (to: TerminalRoute, from: TerminalRoute | null) => NavigationGuardReturn | Promise<NavigationGuardReturn>;
|
|
1291
|
-
type TerminalRouter = Readonly<{
|
|
1292
|
-
currentRoute: vue12.Ref<TerminalRoute>;
|
|
1293
|
-
push: (to: TerminalRouteLocationRaw) => Promise<void>;
|
|
1294
|
-
replace: (to: TerminalRouteLocationRaw) => Promise<void>;
|
|
1295
|
-
back: () => Promise<void>;
|
|
1296
|
-
beforeEach: (guard: NavigationGuard) => () => void;
|
|
1297
|
-
beforeResolve: (guard: NavigationGuard) => () => void;
|
|
1298
|
-
afterEach: (guard: (to: TerminalRoute, from: TerminalRoute | null) => void) => () => void;
|
|
1299
|
-
install: (app: vue13.App) => void;
|
|
1300
|
-
}>;
|
|
1301
|
-
|
|
1302
|
-
//#endregion
|
|
1303
|
-
//#region src/vue/router/composables.d.ts
|
|
1304
|
-
declare function useRouter(): TerminalRouter;
|
|
1305
|
-
declare function useRoute(): ComputedRef<TerminalRoute>;
|
|
1306
|
-
|
|
1307
|
-
//#endregion
|
|
1308
|
-
//#region src/vue/router/router.d.ts
|
|
1309
|
-
declare function createTerminalRouter(options: Readonly<{
|
|
1310
|
-
routes: readonly TerminalRouteRecord[];
|
|
1311
|
-
initialRoute: TerminalRouteLocationRaw;
|
|
1312
|
-
}>): TerminalRouter;
|
|
1313
|
-
|
|
1314
|
-
//#endregion
|
|
1315
|
-
//#region src/vue/router/RouterView.d.ts
|
|
1316
|
-
declare const TRouterView: any;
|
|
1317
|
-
|
|
1318
|
-
//#endregion
|
|
1319
|
-
//#region src/vue/utils/text.d.ts
|
|
1320
|
-
declare function sanitizeInlineText(text: string): string;
|
|
1321
|
-
declare function sanitizeTextBlock(text: string): string;
|
|
1322
|
-
declare function textCellWidth(text: string): number;
|
|
1323
|
-
declare function spaces(count: number): string;
|
|
1324
|
-
declare function sliceByCells(text: string, maxCells: number): string;
|
|
1325
|
-
declare function sliceByCellsRange(text: string, startCells: number, endCells: number): string;
|
|
1326
|
-
declare function padEndByCells(text: string, width: number): string;
|
|
1327
|
-
declare function formatInlineCellLine(text: string, width: number): string;
|
|
1328
|
-
declare function clearTextCaches(): void;
|
|
1329
|
-
declare function wrapByCells(text: string, width: number): readonly string[];
|
|
1330
|
-
|
|
1331
|
-
//#endregion
|
|
1332
|
-
//#region src/vue/utils/wheel-scroll.d.ts
|
|
1333
|
-
interface WheelScrollState {
|
|
1334
|
-
accumulator: number;
|
|
1335
|
-
lastAt: number;
|
|
1336
|
-
lastEdgeDir: number;
|
|
1337
|
-
lastEdgeAt: number;
|
|
1338
|
-
lastLineUnitDir: number;
|
|
1339
|
-
}
|
|
1340
|
-
interface WheelScrollResult {
|
|
1341
|
-
nextTop: number;
|
|
1342
|
-
dir: -1 | 0 | 1;
|
|
1343
|
-
lines: number;
|
|
1344
|
-
}
|
|
1345
|
-
type WheelDeltaMode = 'auto' | 'line' | 'pixel';
|
|
1346
|
-
interface WheelScrollOptions {
|
|
1347
|
-
disableAcceleration?: boolean;
|
|
1348
|
-
}
|
|
1349
|
-
declare function createWheelScrollState(): WheelScrollState;
|
|
1350
|
-
declare function applyWheelScroll(state: WheelScrollState, deltaY: number, scrollTop: number, maxTop: number, now?: number, deltaMode?: WheelDeltaMode, options?: WheelScrollOptions): WheelScrollResult;
|
|
1351
|
-
|
|
1352
|
-
//#endregion
|
|
1353
|
-
export { ANSI16_COLORS, ANSI256_COLORS, ANSI8_COLORS, AnsiColorName, BufferSnapshot, Cell, CellMetrics, CliEventManager, ClipboardApi, CreateTerminalAppOptions, DomRenderer, EventManager, FsDirEntry, FsEntryKind, FsStat, LayoutContext, MentionPathProvider, MentionSuggestionProvider, PathPickMode, PathPickerProvider, PathSuggestion, PromptMentionPluginOptions, PromptSuggestion, RafApi, Rect, Runtime, RuntimeEnv, SGR_RESET, StdinDriver, StdoutRenderer, StdoutRendererMetrics, Style, SuggestPathsResult, TAnchor, TBox, TDebugOverlay, TDialog, TERMINAL_RENDER_PLANES, TFlow, TInput, TInputBox, TInputHostAdapter, TInputPlugin, TInputPluginContext, TInputPluginsContextKey, TJsonEditor, TList, TMultilineModal, TPathPicker, TRenderLayer, TRenderPlane, TRouterView, TSelect, TText, TTransition, TView, Terminal, TerminalApp, TerminalBaseEvent, TerminalColorCapability, TerminalColorLevel, TerminalColorMode, TerminalCommitEvent, TerminalContext, TerminalDebugNode, TerminalEventHandlerMap, TerminalEventMap, TerminalEventRecord, TerminalEventType, TerminalInputEvent, TerminalKeyboardEvent, TerminalNode, TerminalPointerEvent, TerminalProvider, TerminalRenderPlane, TerminalRenderPlanes, TerminalResizeEvent, TerminalRoute, TerminalRouteLocationRaw, TerminalRouteRecord, TerminalRouter, TerminalRuntime, TerminalRuntimeHandle, TerminalScheduler, TerminalSchedulerInvalidateOptions, TerminalScrollOperation, TimerApi, TraceRecord, TraceStore, ansiColors, ansiStyles, applyWheelScroll, charCellWidth, clearTextCaches, createCliEventManager, createDefaultTInputHostAdapter, createDomRenderer, createEventManager, createNodeMentionPathProvider, createNodePathPickerProvider, createPromptMentionPlugin, createRuntime, createStdinDriver, createStdoutRenderer, createTInputHostPlugin, createTerminal, createTerminalApp, createTerminalRouter, createTextRestrictionPlugin, createTraceStore, createWheelScrollState, defaultTInputHostPlugin, detectTerminalColorCapability, formatInlineCellLine, getCliLatencyProfiler, getStdoutRendererMetrics, lintJsonText, normalizeNewlines, padEndByCells, parseAnsiSgr, readEventLog, resolveUserPath, rgbToAnsi256, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, suggestPaths, textCellWidth, truecolorBgOpen, truecolorFgOpen, useLayout, useRenderNode, useRoute, useRouter, useTerminal, useTerminalNode, useTerminalRuntime, useVisibility, wrapByCells, writeEventLog, writeSnapshot };
|
|
1
|
+
export { createTerminal } from "./core/index.js";
|
|
2
|
+
export type { BuiltinWidthProvider, Cell, CellWidth, Style, Terminal, TerminalOptions, WidthProvider, } from "./core/index.js";
|
|
3
|
+
export { createDomRenderer } from "./renderer/dom/dom-renderer.js";
|
|
4
|
+
export { TerminalProvider } from "./vue/components/TerminalProvider.js";
|
|
5
|
+
export { TBox } from "./vue/components/TBox.js";
|
|
6
|
+
export { TDialog } from "./vue/components/TDialog.js";
|
|
7
|
+
export { TInput } from "./vue/components/TInput.js";
|
|
8
|
+
export type { TInputHostAdapter } from "./vue/components/input/host.js";
|
|
9
|
+
export { createTInputHostPlugin } from "./vue/components/input/plugins/hostPlugin.js";
|
|
10
|
+
export { TList } from "./vue/components/TList.js";
|
|
11
|
+
export { TSelect } from "./vue/components/TSelect.js";
|
|
12
|
+
export { TText } from "./vue/components/TText.js";
|
|
13
|
+
export { TView } from "./vue/components/TView.js";
|