@simon_he/vue-tui 0.0.1

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.
@@ -0,0 +1,684 @@
1
+ import ansiStyles from "ansi-styles";
2
+ import * as vue1 from "vue";
3
+ import * as vue2 from "vue";
4
+ import { App, Component as Component$1, ComputedRef, Ref, VNode } from "vue";
5
+
6
+ //#region src/events/recording.d.ts
7
+ type TerminalEventRecord = Readonly<{
8
+ type: 'keydown' | 'keyup';
9
+ key: string;
10
+ code?: string;
11
+ ctrlKey?: boolean;
12
+ shiftKey?: boolean;
13
+ altKey?: boolean;
14
+ metaKey?: boolean;
15
+ repeat?: boolean;
16
+ time?: number;
17
+ }> | Readonly<{
18
+ type: 'pointerdown' | 'pointerup' | 'pointermove' | 'click' | 'dblclick' | 'contextmenu';
19
+ cellX: number;
20
+ cellY: number;
21
+ clientX?: number;
22
+ clientY?: number;
23
+ button?: number;
24
+ buttons?: number;
25
+ ctrlKey?: boolean;
26
+ shiftKey?: boolean;
27
+ altKey?: boolean;
28
+ metaKey?: boolean;
29
+ time?: number;
30
+ }> | Readonly<{
31
+ type: 'wheel';
32
+ cellX: number;
33
+ cellY: number;
34
+ clientX?: number;
35
+ clientY?: number;
36
+ deltaY: number;
37
+ ctrlKey?: boolean;
38
+ shiftKey?: boolean;
39
+ altKey?: boolean;
40
+ metaKey?: boolean;
41
+ time?: number;
42
+ }> | Readonly<{
43
+ type: 'beforeinput' | 'input' | 'compositionstart' | 'compositionupdate' | 'compositionend' | 'paste';
44
+ data?: string;
45
+ inputType?: string;
46
+ isComposing?: boolean;
47
+ text?: string;
48
+ time?: number;
49
+ }>; //#endregion
50
+ //#region src/cli/input.d.ts
51
+ type Stdin = NodeJS.ReadStream;
52
+ type StdinDriver = Readonly<{
53
+ dispose: () => void;
54
+ }>;
55
+ declare function createStdinDriver(options: Readonly<{
56
+ dispatch: (event: TerminalEventRecord) => void;
57
+ stdin?: Stdin;
58
+ stdout?: NodeJS.WriteStream;
59
+ enableMouse?: boolean;
60
+ onExit?: () => void;
61
+ }>): StdinDriver;
62
+
63
+ //#endregion
64
+ //#region src/cli/path-provider.d.ts
65
+ type FsEntryKind = 'file' | 'directory' | 'other';
66
+ type FsDirEntry = Readonly<{
67
+ name: string;
68
+ kind: FsEntryKind;
69
+ }>;
70
+ type FsStat = Readonly<{
71
+ exists: boolean;
72
+ kind: FsEntryKind;
73
+ }>;
74
+ type PathPickerProvider = Readonly<{
75
+ listDir: (absDir: string) => Promise<FsDirEntry[]>;
76
+ stat: (absPath: string) => Promise<FsStat>;
77
+ }>;
78
+ declare function createNodePathPickerProvider(): PathPickerProvider;
79
+
80
+ //#endregion
81
+ //#region src/cli/recording.d.ts
82
+ declare function writeEventLog(path: string, events: readonly TerminalEventRecord[]): Promise<void>;
83
+ declare function writeSnapshot(path: string, lines: readonly string[]): Promise<void>;
84
+ declare function readEventLog(path: string): Promise<TerminalEventRecord[]>;
85
+
86
+ //#endregion
87
+ //#region src/cli/path-suggest.d.ts
88
+ declare function resolveUserPath(workspaceAbs: string, input: string): string;
89
+
90
+ //#endregion
91
+ //#region src/core/buffer/width.d.ts
92
+ declare function charCellWidth(text: string): 1 | 2;
93
+
94
+ //#endregion
95
+ //#region src/core/types.d.ts
96
+ type AnsiColorName = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'blackBright' | 'redBright' | 'greenBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright';
97
+ type Style = Readonly<{
98
+ fg?: AnsiColorName;
99
+ bg?: AnsiColorName;
100
+ bold?: boolean;
101
+ dim?: boolean;
102
+ italic?: boolean;
103
+ underline?: boolean;
104
+ inverse?: boolean;
105
+ }>;
106
+ type Cell = Readonly<{
107
+ ch: string;
108
+ width: 1 | 2;
109
+ continuation?: true;
110
+ style: Style;
111
+ }>;
112
+ type BufferSnapshot = Readonly<{
113
+ cols: number;
114
+ rows: number;
115
+ lines: readonly string[];
116
+ }>;
117
+ type TerminalCommitEvent = Readonly<{
118
+ dirtyRows: readonly number[];
119
+ }>;
120
+ type TerminalResizeEvent = Readonly<{
121
+ cols: number;
122
+ rows: number;
123
+ }>;
124
+ interface TerminalEventMap {
125
+ commit: TerminalCommitEvent;
126
+ resize: TerminalResizeEvent;
127
+ }
128
+ interface Terminal {
129
+ resize: (cols: number, rows: number) => void;
130
+ clear: (x?: number, y?: number, w?: number, h?: number) => void;
131
+ write: (text: string, opts?: {
132
+ x?: number;
133
+ y?: number;
134
+ style?: Style;
135
+ }) => void;
136
+ writeAnsi: (text: string, opts?: {
137
+ x?: number;
138
+ y?: number;
139
+ }) => void;
140
+ put: (x: number, y: number, ch: string, style?: Style) => void;
141
+ fill: (x: number, y: number, w: number, h: number, ch?: string, style?: Style) => void;
142
+ scroll: (lines: number) => void;
143
+ setCursor: (x: number, y: number, visible?: boolean) => void;
144
+ batch: <T>(fn: () => T) => T;
145
+ commit: () => readonly number[];
146
+ on: <K extends keyof TerminalEventMap>(event: K, cb: (payload: TerminalEventMap[K]) => void) => () => void;
147
+ dispose: () => void;
148
+ snapshot: () => BufferSnapshot;
149
+ getCell: (x: number, y: number) => Cell;
150
+ getRow: (y: number) => readonly Cell[];
151
+ setScrollbackLimit: (limit: number) => void;
152
+ getScrollbackLines: (count?: number) => readonly string[];
153
+ }
154
+
155
+ //#endregion
156
+ //#region src/core/ansi/sgr.d.ts
157
+ interface AnsiSegment {
158
+ text: string;
159
+ style: Style;
160
+ }
161
+ declare function parseAnsiSgr(input: string, baseStyle?: Style): AnsiSegment[];
162
+
163
+ //#endregion
164
+ //#region src/core/terminal/create-terminal.d.ts
165
+ declare function createTerminal(opts: {
166
+ cols: number;
167
+ rows: number;
168
+ }): Terminal;
169
+
170
+ //#endregion
171
+ //#region src/renderer/dom/dom-renderer.d.ts
172
+ type CellMetrics = Readonly<{
173
+ cellWidth: number;
174
+ cellHeight: number;
175
+ }>;
176
+ interface DomRenderer {
177
+ readonly container: HTMLElement;
178
+ readonly metrics: CellMetrics;
179
+ dispose: () => void;
180
+ refresh: () => void;
181
+ }
182
+ declare function createDomRenderer(terminal: Terminal, container: HTMLElement): DomRenderer;
183
+
184
+ //#endregion
185
+ //#region src/events/manager/types.d.ts
186
+ type Rect = Readonly<{
187
+ x: number;
188
+ y: number;
189
+ w: number;
190
+ h: number;
191
+ }>;
192
+ type TerminalEventType = 'click' | 'dblclick' | 'contextmenu' | 'pointerdown' | 'pointerup' | 'pointermove' | 'wheel' | 'keydown' | 'keyup' | 'beforeinput' | 'input' | 'compositionstart' | 'compositionupdate' | 'compositionend' | 'paste' | 'focus' | 'blur';
193
+ interface TerminalBaseEvent {
194
+ type: TerminalEventType;
195
+ target: TerminalNode | null;
196
+ currentTarget: TerminalNode | null;
197
+ eventPhase: 1 | 2 | 3;
198
+ bubbles: boolean;
199
+ cancelable: boolean;
200
+ defaultPrevented: boolean;
201
+ timeStamp: number;
202
+ stopPropagation: () => void;
203
+ preventDefault: () => void;
204
+ composedPath: () => TerminalNode[];
205
+ nativeEvent?: Event;
206
+ }
207
+ type TerminalPointerEvent = TerminalBaseEvent & {
208
+ clientX: number;
209
+ clientY: number;
210
+ cellX: number;
211
+ cellY: number;
212
+ button?: number;
213
+ buttons?: number;
214
+ ctrlKey?: boolean;
215
+ shiftKey?: boolean;
216
+ altKey?: boolean;
217
+ metaKey?: boolean;
218
+ deltaY?: number;
219
+ };
220
+ type TerminalKeyboardEvent = TerminalBaseEvent & {
221
+ key: string;
222
+ code: string;
223
+ combo: string;
224
+ ctrlKey?: boolean;
225
+ shiftKey?: boolean;
226
+ altKey?: boolean;
227
+ metaKey?: boolean;
228
+ repeat?: boolean;
229
+ };
230
+ type TerminalInputEvent = TerminalBaseEvent & {
231
+ inputType?: string;
232
+ data?: string;
233
+ isComposing?: boolean;
234
+ text?: string;
235
+ };
236
+ type TerminalEventHandlerMap = Partial<{
237
+ clickCapture: (e: TerminalPointerEvent) => void;
238
+ click: (e: TerminalPointerEvent) => void;
239
+ dblclickCapture: (e: TerminalPointerEvent) => void;
240
+ dblclick: (e: TerminalPointerEvent) => void;
241
+ contextmenuCapture: (e: TerminalPointerEvent) => void;
242
+ contextmenu: (e: TerminalPointerEvent) => void;
243
+ pointerdownCapture: (e: TerminalPointerEvent) => void;
244
+ pointerdown: (e: TerminalPointerEvent) => void;
245
+ pointerupCapture: (e: TerminalPointerEvent) => void;
246
+ pointerup: (e: TerminalPointerEvent) => void;
247
+ pointermoveCapture: (e: TerminalPointerEvent) => void;
248
+ pointermove: (e: TerminalPointerEvent) => void;
249
+ wheelCapture: (e: TerminalPointerEvent) => void;
250
+ wheel: (e: TerminalPointerEvent) => void;
251
+ keydownCapture: (e: TerminalKeyboardEvent) => void;
252
+ keydown: (e: TerminalKeyboardEvent) => void;
253
+ keyupCapture: (e: TerminalKeyboardEvent) => void;
254
+ keyup: (e: TerminalKeyboardEvent) => void;
255
+ beforeinputCapture: (e: TerminalInputEvent) => void;
256
+ beforeinput: (e: TerminalInputEvent) => void;
257
+ inputCapture: (e: TerminalInputEvent) => void;
258
+ input: (e: TerminalInputEvent) => void;
259
+ compositionstartCapture: (e: TerminalInputEvent) => void;
260
+ compositionstart: (e: TerminalInputEvent) => void;
261
+ compositionupdateCapture: (e: TerminalInputEvent) => void;
262
+ compositionupdate: (e: TerminalInputEvent) => void;
263
+ compositionendCapture: (e: TerminalInputEvent) => void;
264
+ compositionend: (e: TerminalInputEvent) => void;
265
+ pasteCapture: (e: TerminalInputEvent) => void;
266
+ paste: (e: TerminalInputEvent) => void;
267
+ focusCapture: (e: TerminalBaseEvent) => void;
268
+ focus: (e: TerminalBaseEvent) => void;
269
+ blurCapture: (e: TerminalBaseEvent) => void;
270
+ blur: (e: TerminalBaseEvent) => void;
271
+ }>;
272
+ interface TerminalNode {
273
+ id: string;
274
+ rect: Rect;
275
+ zIndex: number;
276
+ visible?: boolean;
277
+ focusable?: boolean;
278
+ selectable?: boolean;
279
+ handlers: TerminalEventHandlerMap;
280
+ }
281
+ type TerminalDebugNode = Readonly<{
282
+ id: string;
283
+ rect: Rect;
284
+ zIndex: number;
285
+ visible: boolean;
286
+ focusable: boolean;
287
+ }>;
288
+
289
+ //#endregion
290
+ //#region src/events/manager/cli-event-manager.d.ts
291
+ interface CliEventManager {
292
+ register: (node: Omit<TerminalNode, 'id'> & {
293
+ id?: string;
294
+ }) => TerminalNode;
295
+ update: (id: string, next: Partial<Omit<TerminalNode, 'id'>>) => void;
296
+ unregister: (id: string) => void;
297
+ setMetrics: (next: CellMetrics) => void;
298
+ focus: (id: string | null) => void;
299
+ getFocused: () => string | null;
300
+ dispatch: (event: TerminalEventRecord) => void;
301
+ debugNodes: () => TerminalDebugNode[];
302
+ dispose: () => void;
303
+ }
304
+ declare function createCliEventManager(options?: Readonly<{
305
+ record?: (event: TerminalEventRecord) => void;
306
+ onFocusChange?: (prev: string | null, next: string | null) => void;
307
+ }>): CliEventManager;
308
+
309
+ //#endregion
310
+ //#region src/events/manager/event-manager.d.ts
311
+ interface EventManager {
312
+ register: (node: Omit<TerminalNode, 'id'> & {
313
+ id?: string;
314
+ }) => TerminalNode;
315
+ update: (id: string, next: Partial<Omit<TerminalNode, 'id'>>) => void;
316
+ unregister: (id: string) => void;
317
+ setMetrics: (next: CellMetrics) => void;
318
+ focus: (id: string | null) => void;
319
+ getFocused: () => string | null;
320
+ debugNodes: () => TerminalDebugNode[];
321
+ dispose: () => void;
322
+ }
323
+ declare function createEventManager(container: HTMLElement, metrics: CellMetrics, options?: Readonly<{
324
+ record?: (event: TerminalEventRecord) => void;
325
+ textInputTarget?: HTMLElement | null;
326
+ debugIme?: boolean;
327
+ onFocusChange?: (prev: string | null, next: string | null) => void;
328
+ }>): EventManager;
329
+
330
+ //#endregion
331
+ //#region src/observability/trace.d.ts
332
+ type TraceRecord = Readonly<{
333
+ type: 'event';
334
+ at: number;
335
+ event: TerminalEventRecord;
336
+ }> | Readonly<{
337
+ type: 'focus';
338
+ at: number;
339
+ prev: string | null;
340
+ next: string | null;
341
+ }> | Readonly<{
342
+ type: 'commit';
343
+ at: number;
344
+ dirtyRows: readonly number[];
345
+ focusedId: string | null;
346
+ }>;
347
+ type TraceStore = Readonly<{
348
+ enabled: Ref<boolean>;
349
+ records: TraceRecord[];
350
+ push: (record: TraceRecord) => void;
351
+ clear: () => void;
352
+ snapshot: () => TraceRecord[];
353
+ }>;
354
+ declare function createTraceStore(opts?: Readonly<{
355
+ enabled?: boolean;
356
+ max?: number;
357
+ }>): TraceStore;
358
+
359
+ //#endregion
360
+ //#region src/renderer/cli/stdout-renderer.d.ts
361
+ type CliOutput = Readonly<{
362
+ write: (chunk: string) => unknown;
363
+ isTTY?: boolean;
364
+ }>;
365
+ type StdoutRenderer = Readonly<{
366
+ render: () => void;
367
+ dispose: () => void;
368
+ /** Move terminal cursor to specified cell position for IME input */
369
+ setCursor: (x: number, y: number) => void;
370
+ /** Show or hide the terminal cursor */
371
+ showCursor: (visible: boolean) => void;
372
+ }>;
373
+ type StdoutColorMode = 'auto' | 'truecolor' | 'ansi16' | 'ansi256';
374
+ declare function createStdoutRenderer(terminal: Terminal, options?: Readonly<{
375
+ output?: CliOutput;
376
+ clear?: boolean;
377
+ hideCursor?: boolean;
378
+ altScreen?: boolean;
379
+ /** Fallback background color when a cell has no explicit bg. */
380
+ defaultBg?: AnsiColorName;
381
+ palette?: Partial<Record<AnsiColorName, string>>;
382
+ /** Track TTY resize events (process.stdout 'resize') and call terminal.resize(). */
383
+ trackResize?: boolean;
384
+ /** Color mode for ANSI output (auto detects truecolor via env). */
385
+ colorMode?: StdoutColorMode;
386
+ }>): StdoutRenderer;
387
+
388
+ //#endregion
389
+ //#region src/vue/render/render-manager.d.ts
390
+ type RenderRect = Readonly<{
391
+ x: number;
392
+ y: number;
393
+ w: number;
394
+ h: number;
395
+ }>;
396
+ type RenderStack = Readonly<{
397
+ id: string;
398
+ parent: RenderStack | null;
399
+ zIndex: number;
400
+ order: number;
401
+ }>;
402
+ type RenderNode = Readonly<{
403
+ id: string;
404
+ stack: RenderStack;
405
+ zIndex: number;
406
+ order: number;
407
+ rect: RenderRect | null;
408
+ paint: (dirtyRows?: readonly number[]) => void;
409
+ }>;
410
+ type RenderManager = Readonly<{
411
+ rootStack: RenderStack;
412
+ createStack: (parent: RenderStack, zIndex: number) => RenderStack;
413
+ register: (node: {
414
+ stack: RenderStack;
415
+ zIndex?: number;
416
+ rect?: RenderRect | null;
417
+ paint: (dirtyRows?: readonly number[]) => void;
418
+ }) => RenderNode;
419
+ update: (id: string, next: Partial<{
420
+ stack: RenderStack;
421
+ zIndex: number;
422
+ rect: RenderRect | null;
423
+ paint: (dirtyRows?: readonly number[]) => void;
424
+ }>) => void;
425
+ unregister: (id: string) => void;
426
+ render: () => void;
427
+ }>;
428
+
429
+ //#endregion
430
+ //#region src/vue/context.d.ts
431
+ interface LayoutContext {
432
+ originX: number;
433
+ originY: number;
434
+ clipRect: Rect | null;
435
+ }
436
+ type TerminalScheduler = Readonly<{
437
+ invalidate: () => void;
438
+ flush: () => void;
439
+ }>;
440
+ type TerminalRuntimeHandle = Readonly<{
441
+ update: (props: Record<string, unknown>) => void;
442
+ move: (x: number, y: number) => void;
443
+ unmount: () => void;
444
+ }>;
445
+ type TerminalRuntime = Readonly<{
446
+ mount: (component: Component$1, props: Record<string, unknown>) => TerminalRuntimeHandle;
447
+ }>;
448
+ type ImeAnchor = Readonly<{
449
+ cellX: number;
450
+ cellY: number;
451
+ }>;
452
+ type TerminalContext = Readonly<{
453
+ terminal: Terminal;
454
+ renderer: Ref<DomRenderer | null>;
455
+ events: Ref<EventManager | null>;
456
+ scheduler: TerminalScheduler;
457
+ runtime: TerminalRuntime;
458
+ observability: Readonly<{
459
+ trace: TraceStore;
460
+ }>;
461
+ defaultStyle: Ref<Style>;
462
+ render: RenderManager;
463
+ }>;
464
+
465
+ //#endregion
466
+ //#region src/create-terminal-app.d.ts
467
+ type TerminalApp = Readonly<{
468
+ app: App;
469
+ terminal: Terminal;
470
+ events: CliEventManager;
471
+ scheduler: {
472
+ invalidate: () => void;
473
+ flush: () => void;
474
+ };
475
+ /** Returns the current IME anchor position (cursor position in cell coordinates), or null if no input is focused */
476
+ getImeAnchor: () => ImeAnchor | null;
477
+ mount: () => void;
478
+ dispose: () => void;
479
+ }>;
480
+ type CreateTerminalAppOptions = Readonly<{
481
+ cols: number;
482
+ rows: number;
483
+ component: Component$1;
484
+ props?: Record<string, unknown>;
485
+ defaultStyle?: Style;
486
+ }>;
487
+ declare function createTerminalApp(options: CreateTerminalAppOptions): TerminalApp;
488
+
489
+ //#endregion
490
+ //#region src/runtime/index.d.ts
491
+ type RuntimeEnv = 'browser' | 'terminal' | 'unknown';
492
+ type TimerApi = Readonly<{
493
+ setTimeout: typeof setTimeout;
494
+ clearTimeout: typeof clearTimeout;
495
+ setInterval: typeof setInterval;
496
+ clearInterval: typeof clearInterval;
497
+ }>;
498
+ type RafApi = Readonly<{
499
+ request: (cb: FrameRequestCallback) => number;
500
+ cancel: (id: number) => void;
501
+ }>;
502
+ type ClipboardApi = Readonly<{
503
+ supported: boolean;
504
+ readText: () => Promise<string>;
505
+ writeText: (text: string) => Promise<void>;
506
+ }>;
507
+ type Runtime = Readonly<{
508
+ env: Readonly<{
509
+ kind: RuntimeEnv;
510
+ isBrowser: boolean;
511
+ isTerminal: boolean;
512
+ }>;
513
+ now: () => number;
514
+ timer: TimerApi;
515
+ raf: RafApi;
516
+ clipboard: ClipboardApi;
517
+ getWindow: () => Window | null;
518
+ getDocument: () => Document | null;
519
+ measureText: (text: string, opts?: Readonly<{
520
+ font?: string;
521
+ }>) => number | null;
522
+ }>;
523
+ declare function createRuntime(kind?: RuntimeEnv): Runtime;
524
+
525
+ //#endregion
526
+ //#region src/utils/newlines.d.ts
527
+ declare function normalizeNewlines(text: string): string;
528
+
529
+ //#endregion
530
+ //#region src/vue/components/TAnchor.d.ts
531
+ declare const TAnchor: any;
532
+
533
+ //#endregion
534
+ //#region src/vue/components/TBox.d.ts
535
+ declare const TBox: any;
536
+
537
+ //#endregion
538
+ //#region src/vue/components/TDebugOverlay.d.ts
539
+ declare const TDebugOverlay: any;
540
+
541
+ //#endregion
542
+ //#region src/vue/components/TDialog.d.ts
543
+ declare const TDialog: any;
544
+
545
+ //#endregion
546
+ //#region src/vue/components/TerminalProvider.d.ts
547
+ declare const TerminalProvider: any;
548
+
549
+ //#endregion
550
+ //#region src/vue/components/TFlow.d.ts
551
+ declare const TFlow: any;
552
+
553
+ //#endregion
554
+ //#region src/vue/components/TInput.d.ts
555
+ declare const TInput: any;
556
+
557
+ //#endregion
558
+ //#region src/vue/components/TInputBox.d.ts
559
+ declare const TInputBox: any;
560
+
561
+ //#endregion
562
+ //#region src/vue/components/TList.d.ts
563
+ declare const TList: any;
564
+
565
+ //#endregion
566
+ //#region src/vue/components/TPathPicker.d.ts
567
+ declare const TPathPicker: any;
568
+
569
+ //#endregion
570
+ //#region src/vue/components/TSelect.d.ts
571
+ declare const TSelect: any;
572
+
573
+ //#endregion
574
+ //#region src/vue/components/TText.d.ts
575
+ declare const TText: any;
576
+
577
+ //#endregion
578
+ //#region src/vue/components/TTransition.d.ts
579
+ declare const TTransition: any;
580
+
581
+ //#endregion
582
+ //#region src/vue/components/TView.d.ts
583
+ declare const TView: any;
584
+
585
+ //#endregion
586
+ //#region src/vue/composables/use-layout.d.ts
587
+ declare function useLayout(): LayoutContext;
588
+
589
+ //#endregion
590
+ //#region src/vue/composables/use-runtime.d.ts
591
+ declare function useTerminalRuntime(): Readonly<{
592
+ mount: (component: Component, props: Record<string, unknown>) => TerminalRuntimeHandle;
593
+ }>;
594
+
595
+ //#endregion
596
+ //#region src/vue/composables/use-terminal-node.d.ts
597
+ interface TerminalNodeOptions {
598
+ rect: Rect;
599
+ zIndex?: number;
600
+ visible?: boolean;
601
+ focusable?: boolean;
602
+ selectable?: boolean;
603
+ handlers?: TerminalEventHandlerMap;
604
+ }
605
+ declare function useTerminalNode(getOptions: () => TerminalNodeOptions): {
606
+ id: Ref<string | null>;
607
+ };
608
+
609
+ //#endregion
610
+ //#region src/vue/composables/use-terminal.d.ts
611
+ declare function useTerminal(): TerminalContext;
612
+
613
+ //#endregion
614
+ //#region src/vue/composables/use-visibility.d.ts
615
+ type VisibilityRootProps = Readonly<{
616
+ style: Readonly<Record<string, string | number>>;
617
+ onVnodeBeforeMount: (vnode: VNode) => void;
618
+ onVnodeBeforeUnmount: (vnode: VNode) => void;
619
+ }>;
620
+ declare function useVisibility(options?: {
621
+ provide?: boolean;
622
+ }): Readonly<{
623
+ visible: ComputedRef<boolean>;
624
+ rootProps: VisibilityRootProps;
625
+ }>;
626
+
627
+ //#endregion
628
+ //#region src/vue/router/types.d.ts
629
+ type TerminalRoute = Readonly<{
630
+ name: string;
631
+ params?: Readonly<Record<string, string>>;
632
+ meta?: unknown;
633
+ }>;
634
+ type TerminalRouteRecord = Readonly<{
635
+ name: string;
636
+ component: Component$1;
637
+ meta?: unknown;
638
+ onEnter?: (to: TerminalRoute, from: TerminalRoute | null) => void | Promise<void>;
639
+ onLeave?: (to: TerminalRoute, from: TerminalRoute | null) => void | Promise<void>;
640
+ }>;
641
+ type TerminalRouteLocationRaw = string | Readonly<{
642
+ name: string;
643
+ params?: Record<string, string>;
644
+ }>;
645
+ type NavigationGuardReturn = void | boolean | TerminalRouteLocationRaw;
646
+ type NavigationGuard = (to: TerminalRoute, from: TerminalRoute | null) => NavigationGuardReturn | Promise<NavigationGuardReturn>;
647
+ type TerminalRouter = Readonly<{
648
+ currentRoute: vue1.Ref<TerminalRoute>;
649
+ push: (to: TerminalRouteLocationRaw) => Promise<void>;
650
+ replace: (to: TerminalRouteLocationRaw) => Promise<void>;
651
+ back: () => Promise<void>;
652
+ beforeEach: (guard: NavigationGuard) => () => void;
653
+ beforeResolve: (guard: NavigationGuard) => () => void;
654
+ afterEach: (guard: (to: TerminalRoute, from: TerminalRoute | null) => void) => () => void;
655
+ install: (app: vue2.App) => void;
656
+ }>;
657
+
658
+ //#endregion
659
+ //#region src/vue/router/composables.d.ts
660
+ declare function useRouter(): TerminalRouter;
661
+ declare function useRoute(): ComputedRef<TerminalRoute>;
662
+
663
+ //#endregion
664
+ //#region src/vue/router/router.d.ts
665
+ declare function createTerminalRouter(options: Readonly<{
666
+ routes: readonly TerminalRouteRecord[];
667
+ initialRoute: TerminalRouteLocationRaw;
668
+ }>): TerminalRouter;
669
+
670
+ //#endregion
671
+ //#region src/vue/router/RouterView.d.ts
672
+ declare const TRouterView: any;
673
+
674
+ //#endregion
675
+ //#region src/vue/utils/text.d.ts
676
+ declare function sanitizeInlineText(text: string): string;
677
+ declare function sanitizeTextBlock(text: string): string;
678
+ declare function textCellWidth(text: string): number;
679
+ declare function sliceByCells(text: string, maxCells: number): string;
680
+ declare function padEndByCells(text: string, width: number): string;
681
+ declare function wrapByCells(text: string, width: number): string[];
682
+
683
+ //#endregion
684
+ export { AnsiColorName, BufferSnapshot, Cell, CellMetrics, CliEventManager, ClipboardApi, CreateTerminalAppOptions, DomRenderer, EventManager, FsDirEntry, FsEntryKind, FsStat, LayoutContext, PathPickerProvider, RafApi, Rect, Runtime, RuntimeEnv, StdinDriver, StdoutRenderer, Style, TAnchor, TBox, TDebugOverlay, TDialog, TFlow, TInput, TInputBox, TList, TPathPicker, TRouterView, TSelect, TText, TTransition, TView, Terminal, TerminalApp, TerminalBaseEvent, TerminalCommitEvent, TerminalContext, TerminalDebugNode, TerminalEventHandlerMap, TerminalEventMap, TerminalEventRecord, TerminalEventType, TerminalInputEvent, TerminalKeyboardEvent, TerminalNode, TerminalPointerEvent, TerminalProvider, TerminalResizeEvent, TerminalRoute, TerminalRouteLocationRaw, TerminalRouteRecord, TerminalRouter, TerminalRuntime, TerminalRuntimeHandle, TerminalScheduler, TimerApi, TraceRecord, TraceStore, ansiStyles, charCellWidth, createCliEventManager, createDomRenderer, createEventManager, createNodePathPickerProvider, createRuntime, createStdinDriver, createStdoutRenderer, createTerminal, createTerminalApp, createTerminalRouter, createTraceStore, normalizeNewlines, padEndByCells, parseAnsiSgr, readEventLog, resolveUserPath, sanitizeInlineText, sanitizeTextBlock, sliceByCells, textCellWidth, useLayout, useRoute, useRouter, useTerminal, useTerminalNode, useTerminalRuntime, useVisibility, wrapByCells, writeEventLog, writeSnapshot };