@simon_he/vue-tui 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -20
- package/dist/{TSelect-HzILuti9.js → TSelect-DR0FomSu.js} +1 -1
- package/dist/{TTree-ChOot2Bh.js → TTree-kzhlB5P0.js} +3 -3
- package/dist/agent.js +2 -2
- package/dist/cli.cjs +1081 -166
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +846 -164
- package/dist/core/buffer/buffer.d.ts +2 -2
- package/dist/core/types.d.ts +0 -4
- package/dist/core.cjs +20 -5
- package/dist/core.js +1 -1
- package/dist/{create-terminal-C2oiWFJU.js → create-terminal-DBFNYr8f.js} +15 -6
- package/dist/{dom-renderer-BqGijQID.js → dom-renderer-BniJSQyX.js} +1 -1
- package/dist/index.cjs +20 -5
- package/dist/index.js +4 -4
- package/dist/renderer/cli/index.d.ts +1 -1
- package/dist/renderer/cli/stdout-renderer.d.ts +50 -7
- package/dist/renderer-dom.js +2 -2
- package/dist/vue.cjs +20 -5
- package/dist/vue.js +4 -4
- package/package.json +28 -10
|
@@ -31,11 +31,11 @@ export declare function createGridBuffer(cols: number, rows: number, options?: R
|
|
|
31
31
|
}>): GridBuffer;
|
|
32
32
|
export declare function clamp(n: number, min: number, max: number): number;
|
|
33
33
|
/**
|
|
34
|
-
* Register a fingerprint function on the buffer. This enables SoA fingerprint
|
|
34
|
+
* Register or clear a fingerprint function on the buffer. This enables SoA fingerprint
|
|
35
35
|
* pre-computation: cell writes will update fingerprints inline, and the renderer
|
|
36
36
|
* can read them via getRowFingerprints() instead of per-cell hash computation.
|
|
37
37
|
*/
|
|
38
|
-
export declare function setFingerprintFn(buffer: GridBuffer, fn: CellFingerprintFn): void;
|
|
38
|
+
export declare function setFingerprintFn(buffer: GridBuffer, fn: CellFingerprintFn | null): void;
|
|
39
39
|
/**
|
|
40
40
|
* Get pre-computed fingerprints for a logical row as a TypedArray slice.
|
|
41
41
|
* Returns null if fingerprinting is not enabled on this buffer.
|
package/dist/core/types.d.ts
CHANGED
|
@@ -100,8 +100,4 @@ export interface Terminal {
|
|
|
100
100
|
getRow: (y: number) => readonly Cell[];
|
|
101
101
|
setScrollbackLimit: (limit: number) => void;
|
|
102
102
|
getScrollbackLines: (count?: number) => readonly string[];
|
|
103
|
-
/** Register fingerprint function for SoA pre-computation on the composite buffer. */
|
|
104
|
-
setFingerprintFn: (fn: (ch: string, style: Style) => number) => void;
|
|
105
|
-
/** Get pre-computed fingerprints for a composite buffer row (null if not enabled). */
|
|
106
|
-
getRowFingerprints: (y: number) => Uint32Array | null;
|
|
107
103
|
}
|
package/dist/core.cjs
CHANGED
|
@@ -1246,7 +1246,7 @@ function clamp(n, min, max) {
|
|
|
1246
1246
|
function setFingerprintFn(buffer, fn) {
|
|
1247
1247
|
buffer.fingerprintFn = fn;
|
|
1248
1248
|
const len = buffer.rows * buffer.cols;
|
|
1249
|
-
if (!len) {
|
|
1249
|
+
if (!fn || !len) {
|
|
1250
1250
|
buffer.soaFingerprints = null;
|
|
1251
1251
|
return;
|
|
1252
1252
|
}
|
|
@@ -1264,7 +1264,12 @@ function setFingerprintFn(buffer, fn) {
|
|
|
1264
1264
|
function getRowFingerprints(buffer, y) {
|
|
1265
1265
|
if (!buffer.soaFingerprints)
|
|
1266
1266
|
return null;
|
|
1267
|
-
|
|
1267
|
+
if (buffer.rows <= 0 || buffer.cols <= 0)
|
|
1268
|
+
return null;
|
|
1269
|
+
const yy = Math.floor(y);
|
|
1270
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= buffer.rows)
|
|
1271
|
+
return null;
|
|
1272
|
+
const physY = physicalRowIndex(buffer, yy);
|
|
1268
1273
|
const base = physY * buffer.cols;
|
|
1269
1274
|
return buffer.soaFingerprints.subarray(base, base + buffer.cols);
|
|
1270
1275
|
}
|
|
@@ -2535,11 +2540,17 @@ function createTerminal(opts) {
|
|
|
2535
2540
|
},
|
|
2536
2541
|
setFingerprintFn(fn) {
|
|
2537
2542
|
assertNotDisposed();
|
|
2538
|
-
|
|
2543
|
+
const state = getPlaneState(plane);
|
|
2544
|
+
setFingerprintFn(state.buffer, fn);
|
|
2539
2545
|
},
|
|
2540
2546
|
getRowFingerprints(y) {
|
|
2541
2547
|
assertNotDisposed();
|
|
2542
|
-
|
|
2548
|
+
const yy = Math.floor(y);
|
|
2549
|
+
const state = getPlaneState(plane);
|
|
2550
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= state.buffer.rows) {
|
|
2551
|
+
throw new RangeError("Row out of bounds");
|
|
2552
|
+
}
|
|
2553
|
+
return getRowFingerprints(state.buffer, yy);
|
|
2543
2554
|
}
|
|
2544
2555
|
};
|
|
2545
2556
|
planeTerminals.set(plane, api);
|
|
@@ -2733,7 +2744,11 @@ function createTerminal(opts) {
|
|
|
2733
2744
|
},
|
|
2734
2745
|
getRowFingerprints(y) {
|
|
2735
2746
|
assertNotDisposed();
|
|
2736
|
-
|
|
2747
|
+
const yy = Math.floor(y);
|
|
2748
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= compositeBuffer.rows) {
|
|
2749
|
+
throw new RangeError("Row out of bounds");
|
|
2750
|
+
}
|
|
2751
|
+
return getRowFingerprints(compositeBuffer, yy);
|
|
2737
2752
|
}
|
|
2738
2753
|
};
|
|
2739
2754
|
base[TERMINAL_PLANE_INTERNALS] = {
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TERMINAL_RENDER_PLANES, createTerminal } from "./create-terminal-
|
|
1
|
+
import { TERMINAL_RENDER_PLANES, createTerminal } from "./create-terminal-DBFNYr8f.js";
|
|
2
2
|
import { charCellWidth, isSafeRelativeHref, sanitizeDomHref, sanitizeTerminalHref } from "./hyperlink-Bn02UXJb.js";
|
|
3
3
|
import { parseAnsiSgr } from "./sgr-BmzxEjAO.js";
|
|
4
4
|
import { ansiColorRgb } from "./ansi-palette-CNXqFciC.js";
|
|
@@ -106,14 +106,14 @@ function clamp(n, min, max) {
|
|
|
106
106
|
return Math.max(min, Math.min(max, n));
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
* Register a fingerprint function on the buffer. This enables SoA fingerprint
|
|
109
|
+
* Register or clear a fingerprint function on the buffer. This enables SoA fingerprint
|
|
110
110
|
* pre-computation: cell writes will update fingerprints inline, and the renderer
|
|
111
111
|
* can read them via getRowFingerprints() instead of per-cell hash computation.
|
|
112
112
|
*/
|
|
113
113
|
function setFingerprintFn(buffer, fn) {
|
|
114
114
|
buffer.fingerprintFn = fn;
|
|
115
115
|
const len = buffer.rows * buffer.cols;
|
|
116
|
-
if (!len) {
|
|
116
|
+
if (!fn || !len) {
|
|
117
117
|
buffer.soaFingerprints = null;
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
@@ -134,7 +134,10 @@ function setFingerprintFn(buffer, fn) {
|
|
|
134
134
|
*/
|
|
135
135
|
function getRowFingerprints(buffer, y) {
|
|
136
136
|
if (!buffer.soaFingerprints) return null;
|
|
137
|
-
|
|
137
|
+
if (buffer.rows <= 0 || buffer.cols <= 0) return null;
|
|
138
|
+
const yy = Math.floor(y);
|
|
139
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= buffer.rows) return null;
|
|
140
|
+
const physY = physicalRowIndex(buffer, yy);
|
|
138
141
|
const base = physY * buffer.cols;
|
|
139
142
|
return buffer.soaFingerprints.subarray(base, base + buffer.cols);
|
|
140
143
|
}
|
|
@@ -1219,11 +1222,15 @@ function createTerminal(opts) {
|
|
|
1219
1222
|
},
|
|
1220
1223
|
setFingerprintFn(fn) {
|
|
1221
1224
|
assertNotDisposed();
|
|
1222
|
-
|
|
1225
|
+
const state = getPlaneState(plane);
|
|
1226
|
+
setFingerprintFn(state.buffer, fn);
|
|
1223
1227
|
},
|
|
1224
1228
|
getRowFingerprints(y) {
|
|
1225
1229
|
assertNotDisposed();
|
|
1226
|
-
|
|
1230
|
+
const yy = Math.floor(y);
|
|
1231
|
+
const state = getPlaneState(plane);
|
|
1232
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= state.buffer.rows) throw new RangeError("Row out of bounds");
|
|
1233
|
+
return getRowFingerprints(state.buffer, yy);
|
|
1227
1234
|
}
|
|
1228
1235
|
};
|
|
1229
1236
|
planeTerminals.set(plane, api);
|
|
@@ -1397,7 +1404,9 @@ function createTerminal(opts) {
|
|
|
1397
1404
|
},
|
|
1398
1405
|
getRowFingerprints(y) {
|
|
1399
1406
|
assertNotDisposed();
|
|
1400
|
-
|
|
1407
|
+
const yy = Math.floor(y);
|
|
1408
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= compositeBuffer.rows) throw new RangeError("Row out of bounds");
|
|
1409
|
+
return getRowFingerprints(compositeBuffer, yy);
|
|
1401
1410
|
}
|
|
1402
1411
|
};
|
|
1403
1412
|
base[TERMINAL_PLANE_INTERNALS] = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TERMINAL_RENDER_PLANES, getPlaneTerminal } from "./create-terminal-
|
|
1
|
+
import { TERMINAL_RENDER_PLANES, getPlaneTerminal } from "./create-terminal-DBFNYr8f.js";
|
|
2
2
|
import { sanitizeDomHref } from "./hyperlink-Bn02UXJb.js";
|
|
3
3
|
import { ansiColorHex, ansiCssVar, installAnsiPaletteCssVars, isAnsiColorName } from "./ansi-palette-CNXqFciC.js";
|
|
4
4
|
|
package/dist/index.cjs
CHANGED
|
@@ -714,7 +714,7 @@ function clamp(n, min, max) {
|
|
|
714
714
|
function setFingerprintFn(buffer, fn) {
|
|
715
715
|
buffer.fingerprintFn = fn;
|
|
716
716
|
const len = buffer.rows * buffer.cols;
|
|
717
|
-
if (!len) {
|
|
717
|
+
if (!fn || !len) {
|
|
718
718
|
buffer.soaFingerprints = null;
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
@@ -732,7 +732,12 @@ function setFingerprintFn(buffer, fn) {
|
|
|
732
732
|
function getRowFingerprints(buffer, y) {
|
|
733
733
|
if (!buffer.soaFingerprints)
|
|
734
734
|
return null;
|
|
735
|
-
|
|
735
|
+
if (buffer.rows <= 0 || buffer.cols <= 0)
|
|
736
|
+
return null;
|
|
737
|
+
const yy = Math.floor(y);
|
|
738
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= buffer.rows)
|
|
739
|
+
return null;
|
|
740
|
+
const physY = physicalRowIndex(buffer, yy);
|
|
736
741
|
const base = physY * buffer.cols;
|
|
737
742
|
return buffer.soaFingerprints.subarray(base, base + buffer.cols);
|
|
738
743
|
}
|
|
@@ -2015,11 +2020,17 @@ function createTerminal(opts) {
|
|
|
2015
2020
|
},
|
|
2016
2021
|
setFingerprintFn(fn) {
|
|
2017
2022
|
assertNotDisposed();
|
|
2018
|
-
|
|
2023
|
+
const state = getPlaneState(plane);
|
|
2024
|
+
setFingerprintFn(state.buffer, fn);
|
|
2019
2025
|
},
|
|
2020
2026
|
getRowFingerprints(y) {
|
|
2021
2027
|
assertNotDisposed();
|
|
2022
|
-
|
|
2028
|
+
const yy = Math.floor(y);
|
|
2029
|
+
const state = getPlaneState(plane);
|
|
2030
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= state.buffer.rows) {
|
|
2031
|
+
throw new RangeError("Row out of bounds");
|
|
2032
|
+
}
|
|
2033
|
+
return getRowFingerprints(state.buffer, yy);
|
|
2023
2034
|
}
|
|
2024
2035
|
};
|
|
2025
2036
|
planeTerminals.set(plane, api);
|
|
@@ -2213,7 +2224,11 @@ function createTerminal(opts) {
|
|
|
2213
2224
|
},
|
|
2214
2225
|
getRowFingerprints(y) {
|
|
2215
2226
|
assertNotDisposed();
|
|
2216
|
-
|
|
2227
|
+
const yy = Math.floor(y);
|
|
2228
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= compositeBuffer.rows) {
|
|
2229
|
+
throw new RangeError("Row out of bounds");
|
|
2230
|
+
}
|
|
2231
|
+
return getRowFingerprints(compositeBuffer, yy);
|
|
2217
2232
|
}
|
|
2218
2233
|
};
|
|
2219
2234
|
base[TERMINAL_PLANE_INTERNALS] = {
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createTerminal } from "./create-terminal-
|
|
1
|
+
import { createTerminal } from "./create-terminal-DBFNYr8f.js";
|
|
2
2
|
import "./hyperlink-Bn02UXJb.js";
|
|
3
3
|
import "./sgr-BmzxEjAO.js";
|
|
4
4
|
import "./ansi-palette-CNXqFciC.js";
|
|
5
|
-
import { createDomRenderer } from "./dom-renderer-
|
|
5
|
+
import { createDomRenderer } from "./dom-renderer-BniJSQyX.js";
|
|
6
6
|
import "./wheel-scroll-vBRaQ7p-.js";
|
|
7
7
|
import { TView, createTheme, linkifyTextSegments, tuiDefaultTheme } from "./linkify-D_gzn9Xq.js";
|
|
8
8
|
import "./runtime-rfcZCyJq.js";
|
|
9
9
|
import "./trace-CjzYeIxN.js";
|
|
10
10
|
import "./env-Cl8qmNFN.js";
|
|
11
|
-
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-
|
|
11
|
+
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-kzhlB5P0.js";
|
|
12
12
|
import "./terminal-selection-DBinO6p5.js";
|
|
13
|
-
import { TBox, TCommandPalette, TDialog, TInput, TSelect, TText, computeCommandPaletteMatchRanges } from "./TSelect-
|
|
13
|
+
import { TBox, TCommandPalette, TDialog, TInput, TSelect, TText, computeCommandPaletteMatchRanges } from "./TSelect-DR0FomSu.js";
|
|
14
14
|
import "./frame-perf-C6Xfg85O.js";
|
|
15
15
|
import "./path-mnSgEpCm.js";
|
|
16
16
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { StdoutRenderer } from "./stdout-renderer.js";
|
|
1
|
+
export type { CliOutput, DirtyRowPatchMode, StdoutColorMode, StdoutRenderer, StdoutRendererOptions, ThemePalette, } from "./stdout-renderer.js";
|
|
2
2
|
export { createStdoutRenderer } from "./stdout-renderer.js";
|
|
@@ -4,6 +4,11 @@ import type { ThemePalette } from "../../core/ansi-palette.js";
|
|
|
4
4
|
export type CliOutput = Readonly<{
|
|
5
5
|
write: (chunk: string) => unknown;
|
|
6
6
|
isTTY?: boolean;
|
|
7
|
+
fd?: number;
|
|
8
|
+
columns?: number;
|
|
9
|
+
rows?: number;
|
|
10
|
+
on?: (event: "resize", listener: () => void) => unknown;
|
|
11
|
+
off?: (event: "resize", listener: () => void) => unknown;
|
|
7
12
|
}>;
|
|
8
13
|
export type StdoutRenderer = Readonly<{
|
|
9
14
|
capabilities: RendererCapabilities;
|
|
@@ -20,29 +25,67 @@ export type StdoutRenderer = Readonly<{
|
|
|
20
25
|
}>) => void;
|
|
21
26
|
}>;
|
|
22
27
|
export type StdoutColorMode = "auto" | "truecolor" | "ansi256" | "ansi16" | "ansi8";
|
|
28
|
+
export type DirtyRowPatchMode = "auto" | "row" | "span";
|
|
23
29
|
export type { ThemePalette } from "../../core/ansi-palette.js";
|
|
24
|
-
export
|
|
30
|
+
export type StdoutRendererOptions = Readonly<{
|
|
25
31
|
output?: CliOutput;
|
|
26
32
|
clear?: boolean;
|
|
27
33
|
hideCursor?: boolean;
|
|
28
34
|
altScreen?: boolean;
|
|
29
|
-
/** Fallback background color when a cell has no explicit bg. `null` =
|
|
35
|
+
/** Fallback background color when a cell has no explicit bg. `null` = terminal default. */
|
|
30
36
|
defaultBg?: string | null;
|
|
31
37
|
/** Optional ANSI-name palette used when emitting ansi256/truecolor sequences. */
|
|
32
38
|
palette?: ThemePalette | null;
|
|
33
|
-
/** Track TTY resize events
|
|
39
|
+
/** Track TTY resize events and call terminal.resize(). */
|
|
34
40
|
trackResize?: boolean;
|
|
35
|
-
/** Color mode for ANSI output
|
|
41
|
+
/** Color mode for ANSI output. */
|
|
36
42
|
colorMode?: StdoutColorMode;
|
|
37
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Dirty-row stdout patch strategy.
|
|
45
|
+
*
|
|
46
|
+
* - "auto": prefer span patching, with conservative row fallback on
|
|
47
|
+
* terminals that are sensitive to fragmented cursor-addressed writes.
|
|
48
|
+
* - "row": repaint each dirty row.
|
|
49
|
+
* - "span": force row-internal span/contiguous patching where possible.
|
|
50
|
+
* This skips terminal-sensitive conservative row fallback and is intended
|
|
51
|
+
* as an escape hatch when the caller wants maximum partial-row patching.
|
|
52
|
+
* Safety expansion for wide glyphs and stale-tail handling still applies.
|
|
53
|
+
*
|
|
54
|
+
* Env fallback when this option is not provided:
|
|
55
|
+
* VUE_TUI_DIRTY_ROW_PATCH_MODE, DIMCODE_TUI_DIRTY_ROW_RENDER_MODE,
|
|
56
|
+
* or DIMCODE_TUI_DIRTY_ROW_PATCH_MODE.
|
|
57
|
+
*/
|
|
58
|
+
dirtyRowPatchMode?: DirtyRowPatchMode;
|
|
59
|
+
/**
|
|
60
|
+
* Max changed-cell coverage to patch in auto mode on conservative TTYs.
|
|
61
|
+
* Larger dirty rows fall back to full-row repaint.
|
|
62
|
+
*
|
|
63
|
+
* Env fallback when this option is not provided:
|
|
64
|
+
* VUE_TUI_DIRTY_SPAN_MAX_CELLS or DIMCODE_TUI_DIRTY_SPAN_MAX_CELLS.
|
|
65
|
+
*/
|
|
66
|
+
dirtySpanConservativeMaxCells?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Alias for dirtyRowPatchMode.
|
|
69
|
+
*
|
|
70
|
+
* - true => "span"
|
|
71
|
+
* - false => "row"
|
|
72
|
+
* - "auto" => "auto"
|
|
73
|
+
*
|
|
74
|
+
* When both are provided, dirtyRowPatchMode wins.
|
|
75
|
+
*
|
|
76
|
+
* @deprecated Use dirtyRowPatchMode instead.
|
|
77
|
+
*/
|
|
78
|
+
columnDiff?: boolean | "auto";
|
|
79
|
+
/** Optional function to get IME cursor position, included in render output atomically. */
|
|
38
80
|
getImeAnchor?: () => {
|
|
39
81
|
cellX: number;
|
|
40
82
|
cellY: number;
|
|
41
83
|
} | null;
|
|
42
|
-
/** Use DEC 2026 synchronized output mode
|
|
84
|
+
/** Use DEC 2026 synchronized output mode. */
|
|
43
85
|
useSyncOutput?: boolean;
|
|
44
86
|
allowFileUrls?: boolean;
|
|
45
87
|
profileFileWriter?: {
|
|
46
88
|
appendFileSync?: (path: string, data: string) => void;
|
|
47
89
|
};
|
|
48
|
-
}
|
|
90
|
+
}>;
|
|
91
|
+
export declare function createStdoutRenderer(terminal: Terminal, options?: StdoutRendererOptions): StdoutRenderer;
|
package/dist/renderer-dom.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./create-terminal-
|
|
1
|
+
import "./create-terminal-DBFNYr8f.js";
|
|
2
2
|
import "./hyperlink-Bn02UXJb.js";
|
|
3
3
|
import "./sgr-BmzxEjAO.js";
|
|
4
4
|
import "./ansi-palette-CNXqFciC.js";
|
|
5
|
-
import { DOM_RENDERER_CAPABILITIES, createDomRenderer } from "./dom-renderer-
|
|
5
|
+
import { DOM_RENDERER_CAPABILITIES, createDomRenderer } from "./dom-renderer-BniJSQyX.js";
|
|
6
6
|
|
|
7
7
|
export { DOM_RENDERER_CAPABILITIES, createDomRenderer };
|
package/dist/vue.cjs
CHANGED
|
@@ -9553,7 +9553,7 @@ function clamp6(n, min, max) {
|
|
|
9553
9553
|
function setFingerprintFn(buffer, fn) {
|
|
9554
9554
|
buffer.fingerprintFn = fn;
|
|
9555
9555
|
const len = buffer.rows * buffer.cols;
|
|
9556
|
-
if (!len) {
|
|
9556
|
+
if (!fn || !len) {
|
|
9557
9557
|
buffer.soaFingerprints = null;
|
|
9558
9558
|
return;
|
|
9559
9559
|
}
|
|
@@ -9571,7 +9571,12 @@ function setFingerprintFn(buffer, fn) {
|
|
|
9571
9571
|
function getRowFingerprints(buffer, y) {
|
|
9572
9572
|
if (!buffer.soaFingerprints)
|
|
9573
9573
|
return null;
|
|
9574
|
-
|
|
9574
|
+
if (buffer.rows <= 0 || buffer.cols <= 0)
|
|
9575
|
+
return null;
|
|
9576
|
+
const yy = Math.floor(y);
|
|
9577
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= buffer.rows)
|
|
9578
|
+
return null;
|
|
9579
|
+
const physY = physicalRowIndex(buffer, yy);
|
|
9575
9580
|
const base = physY * buffer.cols;
|
|
9576
9581
|
return buffer.soaFingerprints.subarray(base, base + buffer.cols);
|
|
9577
9582
|
}
|
|
@@ -10854,11 +10859,17 @@ function createTerminal(opts) {
|
|
|
10854
10859
|
},
|
|
10855
10860
|
setFingerprintFn(fn) {
|
|
10856
10861
|
assertNotDisposed();
|
|
10857
|
-
|
|
10862
|
+
const state = getPlaneState(plane);
|
|
10863
|
+
setFingerprintFn(state.buffer, fn);
|
|
10858
10864
|
},
|
|
10859
10865
|
getRowFingerprints(y) {
|
|
10860
10866
|
assertNotDisposed();
|
|
10861
|
-
|
|
10867
|
+
const yy = Math.floor(y);
|
|
10868
|
+
const state = getPlaneState(plane);
|
|
10869
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= state.buffer.rows) {
|
|
10870
|
+
throw new RangeError("Row out of bounds");
|
|
10871
|
+
}
|
|
10872
|
+
return getRowFingerprints(state.buffer, yy);
|
|
10862
10873
|
}
|
|
10863
10874
|
};
|
|
10864
10875
|
planeTerminals.set(plane, api);
|
|
@@ -11052,7 +11063,11 @@ function createTerminal(opts) {
|
|
|
11052
11063
|
},
|
|
11053
11064
|
getRowFingerprints(y) {
|
|
11054
11065
|
assertNotDisposed();
|
|
11055
|
-
|
|
11066
|
+
const yy = Math.floor(y);
|
|
11067
|
+
if (!Number.isFinite(yy) || yy < 0 || yy >= compositeBuffer.rows) {
|
|
11068
|
+
throw new RangeError("Row out of bounds");
|
|
11069
|
+
}
|
|
11070
|
+
return getRowFingerprints(compositeBuffer, yy);
|
|
11056
11071
|
}
|
|
11057
11072
|
};
|
|
11058
11073
|
base[TERMINAL_PLANE_INTERNALS] = {
|
package/dist/vue.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./create-terminal-
|
|
1
|
+
import "./create-terminal-DBFNYr8f.js";
|
|
2
2
|
import { charCellWidth } from "./hyperlink-Bn02UXJb.js";
|
|
3
3
|
import "./sgr-BmzxEjAO.js";
|
|
4
4
|
import "./ansi-palette-CNXqFciC.js";
|
|
5
|
-
import "./dom-renderer-
|
|
5
|
+
import "./dom-renderer-BniJSQyX.js";
|
|
6
6
|
import { EventZIndexContextKey, LayoutContextKey, RenderStackKey, TInputPluginsContextKey, TPathPickerProviderContextKey, VisibilityContextKey, applyWheelScroll, createWheelScrollState, injectionKey, intersectRect, padEndByCells$1 as padEndByCells, repeatChar, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useRenderStack, useTerminal, useTerminalNode, useVisibility, wrapByCells } from "./wheel-scroll-vBRaQ7p-.js";
|
|
7
7
|
import { TView, createTheme, linkifyTextSegments, tuiDefaultTheme } from "./linkify-D_gzn9Xq.js";
|
|
8
8
|
import "./runtime-rfcZCyJq.js";
|
|
9
9
|
import "./trace-CjzYeIxN.js";
|
|
10
10
|
import "./env-Cl8qmNFN.js";
|
|
11
|
-
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-
|
|
11
|
+
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-kzhlB5P0.js";
|
|
12
12
|
import "./terminal-selection-DBinO6p5.js";
|
|
13
|
-
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, TText, clamp as clamp$1, clamp$1 as clamp, computeCommandPaletteMatchRanges, createOverlayFocusStack, fitCellText, isCommitMention, isWhitespace, mentionChipStyle, mergeStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-
|
|
13
|
+
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, TText, clamp as clamp$1, clamp$1 as clamp, computeCommandPaletteMatchRanges, createOverlayFocusStack, fitCellText, isCommitMention, isWhitespace, mentionChipStyle, mergeStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-DR0FomSu.js";
|
|
14
14
|
import "./frame-perf-C6Xfg85O.js";
|
|
15
15
|
import { normalizePath, stripTrailingSlash } from "./path-mnSgEpCm.js";
|
|
16
16
|
import { parsePathQuery, resolveUserPath, suggestPaths } from "./path-suggest-BNqcuE3-.js";
|
package/package.json
CHANGED
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simon_he/vue-tui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Vue 3 terminal UI
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Vue 3 terminal UI components and renderers for browser DOM, CLI stdout, logs, markdown transcripts, and agent consoles",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"agent-console",
|
|
7
|
+
"agent-ui",
|
|
6
8
|
"ansi",
|
|
9
|
+
"ansi-renderer",
|
|
10
|
+
"browser-terminal",
|
|
7
11
|
"cli",
|
|
12
|
+
"cli-ui",
|
|
8
13
|
"component-library",
|
|
9
14
|
"dom-renderer",
|
|
10
15
|
"log-viewer",
|
|
11
16
|
"markdown",
|
|
17
|
+
"markdown-renderer",
|
|
18
|
+
"markdown-transcript",
|
|
12
19
|
"stdout",
|
|
20
|
+
"stdout-renderer",
|
|
21
|
+
"streaming-markdown",
|
|
13
22
|
"terminal",
|
|
23
|
+
"terminal-components",
|
|
24
|
+
"terminal-dashboard",
|
|
25
|
+
"terminal-log-viewer",
|
|
26
|
+
"terminal-renderer",
|
|
14
27
|
"terminal-ui",
|
|
15
28
|
"tui",
|
|
29
|
+
"typescript",
|
|
16
30
|
"virtual-list",
|
|
17
31
|
"vue",
|
|
32
|
+
"vue-cli-ui",
|
|
33
|
+
"vue-terminal",
|
|
34
|
+
"vue-tui",
|
|
18
35
|
"vue3"
|
|
19
36
|
],
|
|
20
|
-
"homepage": "https://
|
|
37
|
+
"homepage": "https://vue-tui.pages.dev/",
|
|
21
38
|
"bugs": {
|
|
22
39
|
"url": "https://github.com/Simon-He95/vue-tui/issues"
|
|
23
40
|
},
|
|
@@ -177,10 +194,10 @@
|
|
|
177
194
|
"stream-markdown-parser": "1.0.0"
|
|
178
195
|
},
|
|
179
196
|
"devDependencies": {
|
|
180
|
-
"@arethetypeswrong/core": "^0.18.
|
|
197
|
+
"@arethetypeswrong/core": "^0.18.3",
|
|
181
198
|
"@playwright/test": "^1.60.0",
|
|
182
199
|
"@types/node": "^18.19.130",
|
|
183
|
-
"@vitest/coverage-v8": "^4.1.
|
|
200
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
184
201
|
"bumpp": "^8.2.1",
|
|
185
202
|
"esbuild": "^0.20.2",
|
|
186
203
|
"happy-dom": "^17.6.3",
|
|
@@ -192,12 +209,12 @@
|
|
|
192
209
|
"publint": "^0.3.21",
|
|
193
210
|
"rimraf": "^3.0.2",
|
|
194
211
|
"tsdown": "^0.9.9",
|
|
195
|
-
"tsx": "^4.22.
|
|
212
|
+
"tsx": "^4.22.4",
|
|
196
213
|
"typescript": "^5.9.3",
|
|
197
214
|
"vite": "6.4.1",
|
|
198
215
|
"vitepress": "^1.6.4",
|
|
199
|
-
"vitest": "^4.1.
|
|
200
|
-
"vue": "^3.5.
|
|
216
|
+
"vitest": "^4.1.8",
|
|
217
|
+
"vue": "^3.5.35"
|
|
201
218
|
},
|
|
202
219
|
"peerDependencies": {
|
|
203
220
|
"vue": ">=3.3.0 <4"
|
|
@@ -250,7 +267,7 @@
|
|
|
250
267
|
"publish:npm:patch": "pnpm exec bumpp patch --yes --no-commit --no-tag --no-push && (npm whoami >/dev/null 2>&1 || npm login) && VUE_TUI_ALLOW_DIRECT_PUBLISH=1 pnpm publish --access public --no-git-checks",
|
|
251
268
|
"release:local": "pnpm run release:dry-run && VUE_TUI_ALLOW_DIRECT_PUBLISH=1 npm publish .release/*.tgz --access public --tag rc",
|
|
252
269
|
"release:local:dry-run": "pnpm run release:dry-run && VUE_TUI_ALLOW_DIRECT_PUBLISH=1 npm publish .release/*.tgz --access public --dry-run --tag rc",
|
|
253
|
-
"release:bench": "pnpm run bench:baseline",
|
|
270
|
+
"release:bench": "pnpm run bench:baseline && FRAMES=2000 pnpm run bench:stdout-column-diff",
|
|
254
271
|
"release:check": "pnpm run check:hidden-unicode && pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run test:coverage:core && pnpm run build:checked && pnpm run test:package-exports:dist && pnpm run check:dist-dts && pnpm run test:types:dist && pnpm run test:browser-vite-import:dist && pnpm run docs:build && pnpm run api:diff && git diff --exit-code -- docs/generated",
|
|
255
272
|
"release:dry-run": "pnpm run release:check && pnpm run release:bench && pnpm run release:smoke && pnpm run release:pack-smoke",
|
|
256
273
|
"release:pack": "rimraf .release && pnpm run build:checked && pnpm pack --pack-destination .release",
|
|
@@ -282,6 +299,7 @@
|
|
|
282
299
|
"bench:baseline": "tsx scripts/check-bench-baselines.ts",
|
|
283
300
|
"bench:baseline:timing": "BENCH_TIMING=1 tsx scripts/check-bench-baselines.ts",
|
|
284
301
|
"bench:phase2": "tsx scripts/bench-phase2.ts",
|
|
285
|
-
"bench:scroll-mailbox": "tsx scripts/bench-scroll-mailbox.ts"
|
|
302
|
+
"bench:scroll-mailbox": "tsx scripts/bench-scroll-mailbox.ts",
|
|
303
|
+
"bench:stdout-column-diff": "tsx scripts/bench-stdout-column-diff.ts"
|
|
286
304
|
}
|
|
287
305
|
}
|