@simon_he/vue-tui 1.0.2 → 1.1.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 +84 -26
- package/dist/TMermaidText-frVr8Ysb.js +885 -0
- package/dist/{TSelect-DR0FomSu.js → TSelect-tJ87rKPM.js} +59 -242
- package/dist/{TTree-kzhlB5P0.js → TTree-CGdE-CYu.js} +138 -102
- package/dist/agent/mermaid.cjs +2 -0
- package/dist/agent/mermaid.d.cts +2 -0
- package/dist/agent/mermaid.d.ts +2 -0
- package/dist/agent/mermaid.js +1 -0
- package/dist/agent.cjs +31188 -24907
- package/dist/agent.d.cts +11 -1
- package/dist/agent.d.ts +11 -1
- package/dist/agent.js +516 -11
- package/dist/{block-source-CKUOnkgT.js → block-source-CrlmaBM5.js} +1039 -66
- package/dist/cli/input.d.ts +8 -0
- package/dist/cli/stdin-buffer.d.ts +1 -1
- package/dist/cli/video/ffmpeg-frame-source.d.ts +10 -0
- package/dist/cli/video/png-frame-parser.d.ts +4 -0
- package/dist/cli/video/raw-frame-parser.d.ts +1 -0
- package/dist/cli/video/yt-dlp-frame-source.d.ts +11 -0
- package/dist/cli.cjs +5146 -6767
- package/dist/cli.d.cts +5 -1
- package/dist/cli.d.ts +5 -1
- package/dist/cli.js +2869 -154
- package/dist/core/buffer/eaw-ranges-unicode-17.d.ts +14 -0
- package/dist/core/perf/instrumentation-noop.d.ts +48 -0
- package/dist/core/perf/instrumentation.d.ts +136 -0
- package/dist/core/terminal/create-terminal.d.ts +1 -0
- package/dist/core.cjs +843 -1469
- package/dist/core.js +4 -5
- package/dist/create-terminal-app.d.ts +24 -1
- package/dist/debug-logger-CmsGI4of.js +74 -0
- package/dist/{dom-renderer-BniJSQyX.js → dom-renderer-DXx8fWzD.js} +2 -3
- package/dist/experimental/3d/bun/contributor-avatar-atlas.d.ts +12 -0
- package/dist/experimental/3d/bun/png.d.ts +1 -0
- package/dist/experimental/3d/bun/terminal-badge-scene.d.ts +11 -0
- package/dist/experimental/3d/bun/terminal-badge.wgsl.d.ts +1 -0
- package/dist/experimental/3d/bun/webgpu-renderer.d.ts +26 -0
- package/dist/experimental/3d/bun.cjs +7271 -0
- package/dist/experimental/3d/bun.d.cts +4 -0
- package/dist/experimental/3d/bun.d.ts +4 -0
- package/dist/experimental/3d/bun.js +7390 -0
- package/dist/experimental/video/node.cjs +497 -0
- package/dist/experimental/video/node.d.cts +4 -0
- package/dist/experimental/video/node.d.ts +4 -0
- package/dist/experimental/video/node.js +610 -0
- package/dist/experimental.cjs +6876 -6192
- package/dist/experimental.d.cts +7 -0
- package/dist/experimental.d.ts +7 -0
- package/dist/experimental.js +3005 -9
- package/dist/frame-perf-CHpWhbC4.js +111 -0
- package/dist/{create-terminal-DBFNYr8f.js → hyperlink-_1FAj7Wq.js} +440 -13
- package/dist/index.cjs +5017 -10339
- package/dist/index.js +14 -13
- package/dist/{linkify-D_gzn9Xq.js → linkify-D68T7rdW.js} +193 -3
- package/dist/markdown.cjs +21295 -12691
- package/dist/markdown.d.cts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js +211 -51
- package/dist/mermaid-BNhM1jAZ.js +123 -0
- package/dist/mermaid.cjs +1707 -0
- package/dist/mermaid.d.cts +3 -0
- package/dist/mermaid.d.ts +3 -0
- package/dist/mermaid.js +6 -0
- package/dist/observability/frame-perf-store.d.ts +2 -1
- package/dist/observability/frame-perf.d.ts +33 -0
- package/dist/observability.cjs +106 -107
- package/dist/observability.d.cts +2 -2
- package/dist/observability.d.ts +2 -2
- package/dist/observability.js +3 -3
- package/dist/{wheel-scroll-vBRaQ7p-.js → rect-DUpeDfBg.js} +253 -117
- package/dist/renderer/cli/stdout-metrics.d.ts +10 -0
- package/dist/renderer/cli/stdout-renderer.d.ts +3 -0
- package/dist/renderer/terminal-graphic-render-queue.d.ts +50 -0
- package/dist/renderer/terminal-graphics-trace.d.ts +53 -0
- package/dist/renderer/terminal-graphics.d.ts +147 -0
- package/dist/renderer-dom.cjs +364 -903
- package/dist/renderer-dom.js +4 -5
- package/dist/runtime/index.d.ts +2 -0
- package/dist/{runtime-rfcZCyJq.js → runtime-Byf8XXOT.js} +28 -15
- package/dist/runtime.cjs +427 -889
- package/dist/runtime.js +2 -2
- package/dist/terminal-graphics-Bbe83wSr.js +597 -0
- package/dist/{terminal-selection-DBinO6p5.js → terminal-selection-4W1SJj4c.js} +4 -1
- package/dist/{tlog-theme-CvLFNMwk.js → tlog-theme-Bul2Na3u.js} +1237 -12
- package/dist/{trace-CjzYeIxN.js → trace-Bh8WnoMo.js} +5 -0
- package/dist/vue/agent/create-png-terminal-graphic-renderer.d.ts +19 -0
- package/dist/vue/components/T3DViewport.d.ts +473 -0
- package/dist/vue/components/TAgentTerminalGraphic.d.ts +494 -0
- package/dist/vue/components/TCharts.d.ts +1121 -0
- package/dist/vue/components/TFeedback.d.ts +1 -1
- package/dist/vue/components/TFlex.d.ts +389 -0
- package/dist/vue/components/TForm.d.ts +4 -4
- package/dist/vue/components/TLogSearchBar.d.ts +3 -3
- package/dist/vue/components/TLogSearchPager.d.ts +2 -2
- package/dist/vue/components/TMarkdownText.d.ts +162 -4
- package/dist/vue/components/TMermaidText.d.ts +900 -0
- package/dist/vue/components/TVideo.d.ts +291 -0
- package/dist/vue/components/TVirtualList.d.ts +9 -0
- package/dist/vue/components/TVirtualMarkdown.d.ts +170 -9
- package/dist/vue/components/TVirtualRows.d.ts +9 -0
- package/dist/vue/components/TerminalProvider.d.ts +2 -0
- package/dist/vue/context.d.ts +24 -0
- package/dist/vue/index.d.ts +5 -0
- package/dist/vue/layout/flex.d.ts +67 -0
- package/dist/vue/markdown/ast.d.ts +5 -2
- package/dist/vue/markdown/document.d.ts +5 -0
- package/dist/vue/markdown/image-actions.d.ts +14 -0
- package/dist/vue/markdown/image.d.ts +11 -0
- package/dist/vue/markdown/link-actions.d.ts +14 -0
- package/dist/vue/markdown/math-actions.d.ts +14 -0
- package/dist/vue/markdown/math.d.ts +6 -0
- package/dist/vue/markdown/render.d.ts +28 -0
- package/dist/vue/markdown/types.d.ts +78 -0
- package/dist/vue/mermaid/beautiful-mermaid.d.ts +1436 -0
- package/dist/vue/render/render-manager.d.ts +7 -0
- package/dist/vue/video/types.d.ts +39 -0
- package/dist/vue.cjs +7207 -12437
- package/dist/vue.js +704 -38
- package/dist/wheel-scroll-DASkEZr-.js +106 -0
- package/dist/{hyperlink-Bn02UXJb.js → width-GqllnV8C.js} +166 -111
- package/package.json +119 -14
- package/dist/frame-perf-C6Xfg85O.js +0 -24
- package/dist/sgr-BmzxEjAO.js +0 -304
- /package/dist/{ansi-palette-CNXqFciC.js → ansi-palette-CH6jc2Z7.js} +0 -0
- /package/dist/{path-suggest-BNqcuE3-.js → path-suggest-Dndu4dTi.js} +0 -0
package/dist/core.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TERMINAL_RENDER_PLANES, createTerminal } from "./
|
|
2
|
-
import { charCellWidth
|
|
3
|
-
import {
|
|
4
|
-
import { ansiColorRgb } from "./ansi-palette-CNXqFciC.js";
|
|
1
|
+
import { TERMINAL_RENDER_PLANES, createTerminal, isSafeRelativeHref, parseAnsiSgr, sanitizeDomHref, sanitizeTerminalHref } from "./hyperlink-_1FAj7Wq.js";
|
|
2
|
+
import { charCellWidth } from "./width-GqllnV8C.js";
|
|
3
|
+
import { ansiColorRgb } from "./ansi-palette-CH6jc2Z7.js";
|
|
5
4
|
import { firstNonEmptyEnv } from "./env-Cl8qmNFN.js";
|
|
6
5
|
import { normalizeNewlines } from "./path-mnSgEpCm.js";
|
|
7
|
-
import { parsePathQuery, resolveUserPath, suggestParentHint, suggestPaths } from "./path-suggest-
|
|
6
|
+
import { parsePathQuery, resolveUserPath, suggestParentHint, suggestPaths } from "./path-suggest-Dndu4dTi.js";
|
|
8
7
|
|
|
9
8
|
//#region src/core/ansi/colors.ts
|
|
10
9
|
const ANSI8_COLOR_NAMES = Object.freeze([
|
|
@@ -5,15 +5,38 @@ import type { Style, Terminal } from "./core/types.js";
|
|
|
5
5
|
import type { CliEventManager } from "./events/index.js";
|
|
6
6
|
import type { ClipboardApi } from "./runtime/index.js";
|
|
7
7
|
import type { TerminalLinkOpenerLike } from "./vue/components/link/host.js";
|
|
8
|
-
import type { TerminalSelectionConfig, TerminalSelectionCopyPayload } from "./selection/terminal-selection.js";
|
|
8
|
+
import type { SelectionTextProvider, TerminalSelectionConfig, TerminalSelectionCopyPayload, TerminalSelectionRefreshOptions } from "./selection/terminal-selection.js";
|
|
9
9
|
import type { TInputPlugin } from "./vue/components/input/plugins/types.js";
|
|
10
10
|
import type { ImeAnchor, TerminalScheduler } from "./vue/context.js";
|
|
11
|
+
export type TerminalSelectionContext = Readonly<{
|
|
12
|
+
registerTextProvider(provider: SelectionTextProvider): () => void;
|
|
13
|
+
onCopy(handler: (payload: TerminalSelectionCopyPayload) => void): () => void;
|
|
14
|
+
refresh(options?: TerminalSelectionRefreshOptions): void;
|
|
15
|
+
clear(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Update the selection copy strategy at runtime. Only `autoCopy`,
|
|
18
|
+
* `copyOnMouseUp`, and `style` take effect dynamically — `enabled` is
|
|
19
|
+
* resolved at app creation time (it gates overlay node registration and
|
|
20
|
+
* the pointer-event selection path) and cannot be toggled afterwards.
|
|
21
|
+
* Triggers a refresh so the new options apply immediately.
|
|
22
|
+
*
|
|
23
|
+
* This does NOT toggle mouse capture — that is owned by the stdin driver
|
|
24
|
+
* layer. To let the terminal perform native selection, disable mouse
|
|
25
|
+
* capture at stdin-driver startup time, or rely on the terminal's
|
|
26
|
+
* Shift+drag escape hatch.
|
|
27
|
+
*/
|
|
28
|
+
setConfig(config: TerminalSelectionConfig): void;
|
|
29
|
+
}>;
|
|
11
30
|
export type TerminalApp = Readonly<{
|
|
12
31
|
app: App;
|
|
13
32
|
terminal: Terminal;
|
|
14
33
|
events: CliEventManager;
|
|
15
34
|
scheduler: TerminalScheduler;
|
|
16
35
|
defaultStyle: Ref<Style>;
|
|
36
|
+
/** The active clipboard instance used by selection copy and exposed for upper-layer copy actions. */
|
|
37
|
+
clipboard: ClipboardApi;
|
|
38
|
+
/** Selection controller surface: register text providers, observe copy events, refresh/clear. */
|
|
39
|
+
selection: TerminalSelectionContext;
|
|
17
40
|
/** Returns the current IME anchor position (cursor position in cell coordinates), or null if no input is focused */
|
|
18
41
|
getImeAnchor: () => ImeAnchor | null;
|
|
19
42
|
mount: () => void;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { envFlag, envString } from "./env-Cl8qmNFN.js";
|
|
2
|
+
|
|
3
|
+
//#region src/core/debug-logger.ts
|
|
4
|
+
const DEFAULT_LOG_FILE = "vue-tui-debug.log";
|
|
5
|
+
let debugFileWriter = null;
|
|
6
|
+
let debugLogDefaultPath = DEFAULT_LOG_FILE;
|
|
7
|
+
const initializedDebugLogPaths = new Set();
|
|
8
|
+
function getFileWriter() {
|
|
9
|
+
const writer = globalThis.__VT_DEBUG_FILE_WRITER__;
|
|
10
|
+
if (writer && typeof writer === "object") return writer;
|
|
11
|
+
return debugFileWriter;
|
|
12
|
+
}
|
|
13
|
+
function resolveDebugLogPath(env, fallback = DEFAULT_LOG_FILE) {
|
|
14
|
+
return envString(env, "VUE_TUI_DEBUG_LOG_PATH", "DIMCODE_DEBUG_LOG_PATH", fallback);
|
|
15
|
+
}
|
|
16
|
+
function debugLogPath() {
|
|
17
|
+
const env = globalThis.process?.env;
|
|
18
|
+
return resolveDebugLogPath(env, debugLogDefaultPath);
|
|
19
|
+
}
|
|
20
|
+
function safeJson(value) {
|
|
21
|
+
try {
|
|
22
|
+
return JSON.stringify(value);
|
|
23
|
+
} catch {
|
|
24
|
+
return "[unserializable]";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function createDebugLogger(enable = false) {
|
|
28
|
+
const enabled = enable;
|
|
29
|
+
const ensureHeader = () => {
|
|
30
|
+
if (!enabled) return;
|
|
31
|
+
const writer = getFileWriter();
|
|
32
|
+
if (!writer?.writeFileSync) return;
|
|
33
|
+
const path = debugLogPath();
|
|
34
|
+
if (initializedDebugLogPaths.has(path)) return;
|
|
35
|
+
try {
|
|
36
|
+
const data = `=== Vue TUI Debug Log Started at ${new Date().toISOString()} ===\n\n`;
|
|
37
|
+
writer.writeFileSync(path, data);
|
|
38
|
+
initializedDebugLogPaths.add(path);
|
|
39
|
+
} catch {}
|
|
40
|
+
};
|
|
41
|
+
const write = (data) => {
|
|
42
|
+
if (!enabled) return;
|
|
43
|
+
ensureHeader();
|
|
44
|
+
try {
|
|
45
|
+
getFileWriter()?.appendFileSync?.(debugLogPath(), data);
|
|
46
|
+
} catch {}
|
|
47
|
+
};
|
|
48
|
+
const log = (category, message) => {
|
|
49
|
+
if (!enabled) return;
|
|
50
|
+
const timestamp = new Date().toISOString().split("T")[1].slice(0, -1);
|
|
51
|
+
write(`[${timestamp}] ${category} ${message}\n`);
|
|
52
|
+
};
|
|
53
|
+
ensureHeader();
|
|
54
|
+
return {
|
|
55
|
+
render: (message) => log("[RENDER]", message),
|
|
56
|
+
stream: (message) => log("[STREAM]", message),
|
|
57
|
+
error: (message, ...args) => {
|
|
58
|
+
if (!enabled) return;
|
|
59
|
+
const timestamp = new Date().toISOString().split("T")[1].slice(0, -1);
|
|
60
|
+
const fullMessage = `[${timestamp}] [ERROR] ${message}${args.length ? ` ${safeJson(args)}` : ""}`;
|
|
61
|
+
write(`${fullMessage}\n`);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Check if debug logging is enabled via environment variable
|
|
67
|
+
*/
|
|
68
|
+
function isDebugEnabled() {
|
|
69
|
+
const env = globalThis.process?.env;
|
|
70
|
+
return envFlag(env, "VUE_TUI_DEBUG", "DIMCODE_DEBUG") || env?.DEBUG === "1";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
export { createDebugLogger, isDebugEnabled };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { TERMINAL_RENDER_PLANES, getPlaneTerminal } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { ansiColorHex, ansiCssVar, installAnsiPaletteCssVars, isAnsiColorName } from "./ansi-palette-CNXqFciC.js";
|
|
1
|
+
import { TERMINAL_RENDER_PLANES, getPlaneTerminal, sanitizeDomHref } from "./hyperlink-_1FAj7Wq.js";
|
|
2
|
+
import { ansiColorHex, ansiCssVar, installAnsiPaletteCssVars, isAnsiColorName } from "./ansi-palette-CH6jc2Z7.js";
|
|
4
3
|
|
|
5
4
|
//#region src/renderer/capabilities.ts
|
|
6
5
|
const DOM_RENDERER_CAPABILITIES = Object.freeze({
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixed, offline 32px avatar atlas for the top 100 human Vue core contributors.
|
|
3
|
+
* Ordered by the GitHub contributors API response after filtering bot accounts.
|
|
4
|
+
* Source: https://github.com/vuejs/core/graphs/contributors
|
|
5
|
+
* Avatars: https://avatars.githubusercontent.com (retrieved 2026-07-24).
|
|
6
|
+
*/
|
|
7
|
+
export declare const contributorAvatarLogins: readonly ["yyx990803", "edison1105", "sxzz", "HcySunYang", "pikax", "underfin", "Alfred-Skyblue", "jh-leong", "cexbrayat", "LinusBorg", "skirtles-code", "baiwusanyu-c", "dsseng", "haoqunjiang", "KazariEX", "linzhe141", "posva", "yangmingshan", "btea", "yangxiuxiu1115", "Akryum", "webfansplz", "zhangenming", "zhangzhonghe", "johnsoncodehk", "antfu", "a631807682", "jiangying000", "liulinboyi", "Doctor-wu", "ygj6", "unbyte", "himself65", "shengxinjing", "fisker", "danielroe", "CyberAP", "loiacon", "HerringtonDarkholme", "znck", "caozhong1996", "OnlyWick", "Picknight", "hareku", "zh-lx", "CodinCat", "godxiaoji", "lidlanca", "meteorlxy", "rudyxu1102", "wsypower", "basvanmeurs", "liuseen-l", "alex-snezhko", "fnlctrl", "CodeDaraW", "rzzf", "ztplz", "zqran", "Bigfish8", "Mini-ghost", "zzzzzhowie", "Amour1688", "zhiyuanzmj", "ysj16", "TerenceZ", "shadowings-zy", "inottn", "Rudeus3Greyrat", "KaelWD", "theniceangel", "JayFate", "xanf", "Justineo", "zhmushan", "susiwen8", "jods4", "ifer47", "chenfan0", "Zardddddd60", "jo0ger", "dsonet", "69hunter", "DV8FromTheWorld", "AjaiKN", "nandi95", "PengBoUESTC", "Notryag", "wonderful-panda", "wxsms", "yyyanghj", "javastation", "dlxqlig", "leaon4", "LongTengDao", "iiio2", "serkodev", "cuixiaorui", "sudongyuer", "hyfdev"];
|
|
8
|
+
export declare const contributorAvatarAtlas: {
|
|
9
|
+
readonly width: 512;
|
|
10
|
+
readonly height: 224;
|
|
11
|
+
readonly rgba: Uint8Array<ArrayBufferLike>;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function encodeRgbaPng(rgba: Uint8Array, width: number, height: number): Uint8Array;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { T3DHitResult, T3DHitTestContext } from "../../../vue/components/T3DViewport.js";
|
|
2
|
+
export declare const TERMINAL_BADGE_CONTRIBUTOR_COUNT = 100;
|
|
3
|
+
export declare const terminalBadgeContributorRadiusScales: readonly number[];
|
|
4
|
+
export type TerminalBadgeContributorSphere = Readonly<{
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
z: number;
|
|
8
|
+
radius: number;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const terminalBadgeContributorSpheres: readonly TerminalBadgeContributorSphere[];
|
|
11
|
+
export declare function pickTerminalBadgeContributor(context: T3DHitTestContext): T3DHitResult | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const terminalBadge3DWgsl: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { T3DRenderer } from "../../../vue/components/T3DViewport.js";
|
|
2
|
+
export type BunWebGPUTextureData = Readonly<{
|
|
3
|
+
/** Texture width in pixels. */
|
|
4
|
+
width: number;
|
|
5
|
+
/** Texture height in pixels. */
|
|
6
|
+
height: number;
|
|
7
|
+
/** Tightly packed RGBA8 pixels, ordered from top-left to bottom-right. */
|
|
8
|
+
rgba: Uint8Array;
|
|
9
|
+
}>;
|
|
10
|
+
export type BunWebGPU3DRendererOptions = Readonly<{
|
|
11
|
+
/** Compute shader with the T3D uniform block at binding 0 and RGBA8 storage output at binding 1. */
|
|
12
|
+
shader: string;
|
|
13
|
+
/** Optional RGBA8 sampled texture exposed to the shader at binding 2. */
|
|
14
|
+
texture?: BunWebGPUTextureData;
|
|
15
|
+
/** Label included in WebGPU resources and error messages. */
|
|
16
|
+
label?: string;
|
|
17
|
+
}>;
|
|
18
|
+
export type TerminalBadge3DRendererOptions = Readonly<{
|
|
19
|
+
/** Label included in WebGPU resources and error messages. */
|
|
20
|
+
label?: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function rgbaToGray8(rgba: Uint8Array): Uint8Array;
|
|
23
|
+
/** Creates a Bun-only Pull renderer backed by a raw WGSL compute shader. */
|
|
24
|
+
export declare function createBunWebGPU3DRenderer(options: BunWebGPU3DRendererOptions): T3DRenderer;
|
|
25
|
+
/** Creates the direction-E vue-tui terminal badge renderer. */
|
|
26
|
+
export declare function createTerminalBadge3DRenderer(options?: TerminalBadge3DRendererOptions): T3DRenderer;
|