@simon_he/vue-tui 1.1.2 → 1.1.4
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/dist/{TMermaidText-frVr8Ysb.js → TMermaidText-wLnMMvVS.js} +1 -1
- package/dist/{TSelect-tJ87rKPM.js → TSelect-CMBOOFwK.js} +4 -4
- package/dist/{TTree-CGdE-CYu.js → TTree-kk8ntrpg.js} +6 -5
- package/dist/agent/mermaid.d.cts +2 -2
- package/dist/agent/mermaid.d.ts +2 -2
- package/dist/agent.cjs +3896 -13616
- package/dist/agent.js +25 -82
- package/dist/{block-source-CrlmaBM5.js → block-source-D3YGTErb.js} +447 -326
- package/dist/cli.cjs +52 -15
- package/dist/cli.js +69 -14
- package/dist/core.js +3 -3
- package/dist/{hyperlink-_1FAj7Wq.js → create-terminal-Db_-UGVQ.js} +474 -102
- package/dist/{dom-renderer-DXx8fWzD.js → dom-renderer-BfwAEQMf.js} +3 -2
- package/dist/experimental.cjs +99 -66
- package/dist/experimental.js +20 -74
- package/dist/hyperlink-clbb_ha_.js +100 -0
- package/dist/index.js +8 -8
- package/dist/{linkify-D68T7rdW.js → linkify-CL9wwnZN.js} +2 -2
- package/dist/markdown.cjs +3376 -13056
- package/dist/markdown.d.cts +4 -0
- package/dist/markdown.d.ts +4 -0
- package/dist/markdown.js +79 -8
- package/dist/math-image-BZhmfUeu.js +308 -0
- package/dist/mermaid-uEfRItDe.js +1205 -0
- package/dist/mermaid.cjs +1089 -3
- package/dist/mermaid.d.cts +4 -0
- package/dist/mermaid.d.ts +4 -0
- package/dist/mermaid.js +7 -5
- package/dist/{rect-DUpeDfBg.js → rect-JzWMJxxc.js} +1 -1
- package/dist/renderer/cli/stdout-renderer.d.ts +44 -0
- package/dist/renderer/terminal-graphics.d.ts +44 -0
- package/dist/renderer-dom.js +4 -4
- package/dist/{terminal-graphics-Bbe83wSr.js → terminal-graphics-DWZrl3oh.js} +85 -2
- package/dist/{tlog-theme-Bul2Na3u.js → tlog-theme-DqnF_zNe.js} +5 -4
- package/dist/vue/components/TAgentTerminalGraphic.d.ts +1 -1
- package/dist/vue/components/TMarkdownText.d.ts +70 -2
- package/dist/vue/components/TMermaidImage.d.ts +733 -0
- package/dist/vue/components/TMermaidText.d.ts +2 -2
- package/dist/vue/components/TVirtualMarkdown.d.ts +70 -2
- package/dist/vue/markdown/ast.d.ts +5 -0
- package/dist/vue/markdown/document.d.ts +3 -0
- package/dist/vue/markdown/math-image.d.ts +68 -0
- package/dist/vue/markdown/math.d.ts +2 -0
- package/dist/vue/markdown/theme.d.ts +12 -0
- package/dist/vue/markdown/types.d.ts +12 -2
- package/dist/vue/mermaid/beautiful-mermaid.d.ts +4 -4
- package/dist/vue/mermaid/mermaid-image.d.ts +65 -0
- package/dist/vue.js +9 -9
- package/package.json +20 -3
- package/dist/mermaid-BNhM1jAZ.js +0 -123
- package/dist/width-GqllnV8C.js +0 -474
- /package/dist/{ansi-palette-CH6jc2Z7.js → ansi-palette-BHF1rN7R.js} +0 -0
package/dist/mermaid.d.cts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export type { TMermaidAsciiOptions, TMermaidAsciiTheme, TMermaidCopyPayload, TMermaidRenderer, TMermaidRenderEligibility, TMermaidRenderEligibilityContext, TMermaidResolvedAsciiOptions, TMermaidTextProps, TMermaidTransientErrorClassifier, TMermaidTransientErrorContext, } from "./vue/components/TMermaidText.js";
|
|
2
2
|
export { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal, } from "./vue/components/TMermaidText.js";
|
|
3
3
|
export { beautifulMermaidRenderer, createBeautifulMermaidRenderer, TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidText, } from "./vue/mermaid/beautiful-mermaid.js";
|
|
4
|
+
export { TMermaidImage } from "./vue/components/TMermaidImage.js";
|
|
5
|
+
export type { TMermaidImageCopyPayload, TMermaidImageProps, } from "./vue/components/TMermaidImage.js";
|
|
6
|
+
export { clearMermaidImageCache, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, loadMermaidImageRenderer, normalizeMermaidImageOptions, resolveMermaidImageColor, setMermaidImageRasterizer, subscribeMermaidImage, } from "./vue/mermaid/mermaid-image.js";
|
|
7
|
+
export type { TuiMermaidImageCells, TuiMermaidImageOptions, TuiMermaidImageRasterizer, } from "./vue/mermaid/mermaid-image.js";
|
package/dist/mermaid.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export type { TMermaidAsciiOptions, TMermaidAsciiTheme, TMermaidCopyPayload, TMermaidRenderer, TMermaidRenderEligibility, TMermaidRenderEligibilityContext, TMermaidResolvedAsciiOptions, TMermaidTextProps, TMermaidTransientErrorClassifier, TMermaidTransientErrorContext, } from "./vue/components/TMermaidText.js";
|
|
2
2
|
export { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal, } from "./vue/components/TMermaidText.js";
|
|
3
3
|
export { beautifulMermaidRenderer, createBeautifulMermaidRenderer, TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidText, } from "./vue/mermaid/beautiful-mermaid.js";
|
|
4
|
+
export { TMermaidImage } from "./vue/components/TMermaidImage.js";
|
|
5
|
+
export type { TMermaidImageCopyPayload, TMermaidImageProps, } from "./vue/components/TMermaidImage.js";
|
|
6
|
+
export { clearMermaidImageCache, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, loadMermaidImageRenderer, normalizeMermaidImageOptions, resolveMermaidImageColor, setMermaidImageRasterizer, subscribeMermaidImage, } from "./vue/mermaid/mermaid-image.js";
|
|
7
|
+
export type { TuiMermaidImageCells, TuiMermaidImageOptions, TuiMermaidImageRasterizer, } from "./vue/mermaid/mermaid-image.js";
|
package/dist/mermaid.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./rect-
|
|
3
|
-
import { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal } from "./TMermaidText-
|
|
4
|
-
import
|
|
1
|
+
import "./create-terminal-Db_-UGVQ.js";
|
|
2
|
+
import "./rect-JzWMJxxc.js";
|
|
3
|
+
import { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal } from "./TMermaidText-wLnMMvVS.js";
|
|
4
|
+
import "./terminal-graphics-DWZrl3oh.js";
|
|
5
|
+
import "./math-image-BZhmfUeu.js";
|
|
6
|
+
import { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidImage, TMermaidText, beautifulMermaidRenderer, clearMermaidImageCache, createBeautifulMermaidRenderer, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, loadMermaidImageRenderer, normalizeMermaidImageOptions, resolveMermaidImageColor, setMermaidImageRasterizer, subscribeMermaidImage } from "./mermaid-uEfRItDe.js";
|
|
5
7
|
|
|
6
|
-
export { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidText, beautifulMermaidRenderer, createBeautifulMermaidRenderer, isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal };
|
|
8
|
+
export { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidImage, TMermaidText, beautifulMermaidRenderer, clearMermaidImageCache, createBeautifulMermaidRenderer, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, isSimpleMermaidFlowchartSource, loadMermaidImageRenderer, markMermaidRenderErrorFatal, normalizeMermaidImageOptions, resolveMermaidImageColor, setMermaidImageRasterizer, subscribeMermaidImage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { charCellWidth, segmentedGraphemes } from "./
|
|
1
|
+
import { charCellWidth, segmentedGraphemes } from "./create-terminal-Db_-UGVQ.js";
|
|
2
2
|
import { computed, inject, onBeforeUnmount, provide, readonly, ref, vShow, watchEffect } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/vue/injection-key.ts
|
|
@@ -15,6 +15,13 @@ export type StdoutRenderer = Readonly<{
|
|
|
15
15
|
capabilities: RendererCapabilities;
|
|
16
16
|
graphicsCapabilities?: TerminalGraphicsCapabilities;
|
|
17
17
|
render: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Force an immediate full repaint of the renderer's rows, bypassing frame
|
|
20
|
+
* throttling. For `anchor: "bottom"` (REPL bar) callers this re-anchors the
|
|
21
|
+
* bar and re-establishes the scroll region after the terminal resized or
|
|
22
|
+
* after native output was written above the bar.
|
|
23
|
+
*/
|
|
24
|
+
forceRender: () => void;
|
|
18
25
|
dispose: () => void;
|
|
19
26
|
/** Move terminal cursor to specified cell position for IME input */
|
|
20
27
|
setCursor: (x: number, y: number) => void;
|
|
@@ -34,6 +41,43 @@ export type StdoutRendererOptions = Readonly<{
|
|
|
34
41
|
clear?: boolean;
|
|
35
42
|
hideCursor?: boolean;
|
|
36
43
|
altScreen?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* How the TUI buffer is anchored on the terminal screen.
|
|
46
|
+
*
|
|
47
|
+
* - `"top"` (default): buffer row 0 maps to screen row 1 — the renderer owns
|
|
48
|
+
* the whole terminal screen (full-screen TUIs).
|
|
49
|
+
* - `"bottom"`: the buffer is pinned to the bottom `rows` of the terminal
|
|
50
|
+
* screen (a REPL-style prompt bar). Everything above the buffer is native
|
|
51
|
+
* terminal output owned by the caller (scrollback, right-click paste,
|
|
52
|
+
* native scrolling) — the renderer only ever writes to its own pinned rows
|
|
53
|
+
* and never clears or repaints the area above.
|
|
54
|
+
*
|
|
55
|
+
* In bottom mode the renderer:
|
|
56
|
+
* - initially scrolls existing terminal contents upward to reserve the bar
|
|
57
|
+
* rows and one fresh native-output row without overwriting prior history;
|
|
58
|
+
* - repaints the full (small) buffer every frame, so an externally scrolled
|
|
59
|
+
* screen can never leave stale bar rows behind;
|
|
60
|
+
* - never emits buffer scroll operations that would disturb the caller's
|
|
61
|
+
* scroll region above the bar;
|
|
62
|
+
* - skips the whole-screen clear even when `clear` is true;
|
|
63
|
+
* - establishes a scroll region that excludes the bar (`ESC[1;<screenRows-rows>r`)
|
|
64
|
+
* so output written by the caller scrolls natively above the bar, and
|
|
65
|
+
* restores it on dispose.
|
|
66
|
+
*/
|
|
67
|
+
anchor?: "top" | "bottom";
|
|
68
|
+
/**
|
|
69
|
+
* Rows of blank space reserved between the native output region and the
|
|
70
|
+
* pinned bar in `anchor: "bottom"` mode. The bar stays at the very bottom;
|
|
71
|
+
* the scroll region the renderer establishes shrinks by `barGap` rows so
|
|
72
|
+
* caller output scrolls above a persistent blank gap. Default 0.
|
|
73
|
+
*/
|
|
74
|
+
barGap?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Live provider of the terminal screen height in rows (cells). Used only for
|
|
77
|
+
* `anchor: "bottom"` to compute the bar's pinned offset. Falls back to
|
|
78
|
+
* `output.rows` and then `process.stdout.rows` when omitted.
|
|
79
|
+
*/
|
|
80
|
+
screenRows?: () => number;
|
|
37
81
|
/** Fallback background color when a cell has no explicit bg. `null` = terminal default. */
|
|
38
82
|
defaultBg?: string | null;
|
|
39
83
|
/** Optional ANSI-name palette used when emitting ansi256/truecolor sequences. */
|
|
@@ -145,3 +145,47 @@ export declare function createIterm2InlineImageSequence(base64Data: string, opti
|
|
|
145
145
|
doNotMoveCursor?: boolean;
|
|
146
146
|
}>): string;
|
|
147
147
|
export declare function wrapTerminalGraphicsForMultiplexer(sequence: string, capabilities: TerminalGraphicsCapabilities): string;
|
|
148
|
+
export type TerminalGraphicPngViewport = Readonly<{
|
|
149
|
+
x: number;
|
|
150
|
+
y: number;
|
|
151
|
+
w: number;
|
|
152
|
+
h: number;
|
|
153
|
+
}>;
|
|
154
|
+
export type CreateTerminalGraphicPngSequenceOptions = Readonly<{
|
|
155
|
+
protocol: "kitty" | "iterm2";
|
|
156
|
+
base64: string;
|
|
157
|
+
imageId: number;
|
|
158
|
+
placementId: number;
|
|
159
|
+
cols?: number;
|
|
160
|
+
rows?: number;
|
|
161
|
+
sourceWidth?: number;
|
|
162
|
+
sourceHeight?: number;
|
|
163
|
+
placementColumns?: number;
|
|
164
|
+
placementRows?: number;
|
|
165
|
+
rect?: TerminalGraphicPngViewport;
|
|
166
|
+
fullRect?: TerminalGraphicPngViewport;
|
|
167
|
+
zIndex?: number;
|
|
168
|
+
freeImageData?: boolean;
|
|
169
|
+
fallback?: string;
|
|
170
|
+
}>;
|
|
171
|
+
export type TerminalGraphicPngSequenceResult = Readonly<{
|
|
172
|
+
type: "sequence";
|
|
173
|
+
protocol: "kitty" | "iterm2";
|
|
174
|
+
sequence: string;
|
|
175
|
+
resizeSequence?: string;
|
|
176
|
+
clearSequence?: string;
|
|
177
|
+
fallback?: string;
|
|
178
|
+
cols?: number;
|
|
179
|
+
rows?: number;
|
|
180
|
+
sourceWidth?: number;
|
|
181
|
+
sourceHeight?: number;
|
|
182
|
+
zIndex?: number;
|
|
183
|
+
}>;
|
|
184
|
+
/**
|
|
185
|
+
* Build a kitty/iTerm2 graphics sequence that renders one PNG. Shared by the
|
|
186
|
+
* image renderer factory (`createPngTerminalGraphicRenderer`) and the video
|
|
187
|
+
* frame renderer (`TVideo`) so both emit the same terminal sequences.
|
|
188
|
+
*
|
|
189
|
+
* Returns null for protocols this helper does not handle (callers fall back).
|
|
190
|
+
*/
|
|
191
|
+
export declare function createTerminalGraphicPngSequence(options: CreateTerminalGraphicPngSequenceOptions): TerminalGraphicPngSequenceResult | null;
|
package/dist/renderer-dom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import { DOM_RENDERER_CAPABILITIES, createDomRenderer } from "./dom-renderer-
|
|
1
|
+
import "./create-terminal-Db_-UGVQ.js";
|
|
2
|
+
import "./ansi-palette-BHF1rN7R.js";
|
|
3
|
+
import "./hyperlink-clbb_ha_.js";
|
|
4
|
+
import { DOM_RENDERER_CAPABILITIES, createDomRenderer } from "./dom-renderer-BfwAEQMf.js";
|
|
5
5
|
|
|
6
6
|
export { DOM_RENDERER_CAPABILITIES, createDomRenderer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRootTerminal } from "./
|
|
1
|
+
import { getRootTerminal } from "./create-terminal-Db_-UGVQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/renderer/terminal-graphics.ts
|
|
4
4
|
const TERMINAL_GRAPHICS_PROTOCOL_PRIORITY = [
|
|
@@ -592,6 +592,89 @@ function formatItermDimension(value) {
|
|
|
592
592
|
const raw = String(value ?? "").trim();
|
|
593
593
|
return validateIterm2Dimension(raw) ? raw : "auto";
|
|
594
594
|
}
|
|
595
|
+
function resolveKittyPngSourceCrop(rect, fullRect, sourceWidth, sourceHeight) {
|
|
596
|
+
if (fullRect.w <= 0 || fullRect.h <= 0) return null;
|
|
597
|
+
const offsetX = Math.max(0, rect.x - fullRect.x);
|
|
598
|
+
const offsetY = Math.max(0, rect.y - fullRect.y);
|
|
599
|
+
const visibleW = Math.max(0, Math.min(rect.w, fullRect.w - offsetX));
|
|
600
|
+
const visibleH = Math.max(0, Math.min(rect.h, fullRect.h - offsetY));
|
|
601
|
+
if (offsetX <= 0 && offsetY <= 0 && visibleW >= fullRect.w && visibleH >= fullRect.h) return null;
|
|
602
|
+
const sourceX = Math.max(0, Math.min(sourceWidth - 1, Math.floor(offsetX * sourceWidth / fullRect.w)));
|
|
603
|
+
const sourceY = Math.max(0, Math.min(sourceHeight - 1, Math.floor(offsetY * sourceHeight / fullRect.h)));
|
|
604
|
+
const sourceRight = Math.max(sourceX + 1, Math.min(sourceWidth, Math.ceil((offsetX + visibleW) * sourceWidth / fullRect.w)));
|
|
605
|
+
const sourceBottom = Math.max(sourceY + 1, Math.min(sourceHeight, Math.ceil((offsetY + visibleH) * sourceHeight / fullRect.h)));
|
|
606
|
+
return {
|
|
607
|
+
sourceX,
|
|
608
|
+
sourceY,
|
|
609
|
+
sourceWidth: sourceRight - sourceX,
|
|
610
|
+
sourceHeight: sourceBottom - sourceY
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Build a kitty/iTerm2 graphics sequence that renders one PNG. Shared by the
|
|
615
|
+
* image renderer factory (`createPngTerminalGraphicRenderer`) and the video
|
|
616
|
+
* frame renderer (`TVideo`) so both emit the same terminal sequences.
|
|
617
|
+
*
|
|
618
|
+
* Returns null for protocols this helper does not handle (callers fall back).
|
|
619
|
+
*/
|
|
620
|
+
function createTerminalGraphicPngSequence(options) {
|
|
621
|
+
if (options.protocol === "kitty") {
|
|
622
|
+
let placement = {
|
|
623
|
+
columns: options.placementColumns,
|
|
624
|
+
rows: options.placementRows
|
|
625
|
+
};
|
|
626
|
+
if (options.rect && options.fullRect && options.sourceWidth && options.sourceHeight) {
|
|
627
|
+
const crop = resolveKittyPngSourceCrop(options.rect, options.fullRect, options.sourceWidth, options.sourceHeight);
|
|
628
|
+
if (crop) placement = {
|
|
629
|
+
...placement,
|
|
630
|
+
...crop
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
return {
|
|
634
|
+
type: "sequence",
|
|
635
|
+
protocol: "kitty",
|
|
636
|
+
sequence: createKittyGraphicsSequence(options.base64, {
|
|
637
|
+
imageId: options.imageId,
|
|
638
|
+
placementId: options.placementId,
|
|
639
|
+
zIndex: options.zIndex,
|
|
640
|
+
...placement
|
|
641
|
+
}),
|
|
642
|
+
resizeSequence: createKittyPlacementSequence({
|
|
643
|
+
imageId: options.imageId,
|
|
644
|
+
placementId: options.placementId,
|
|
645
|
+
zIndex: options.zIndex,
|
|
646
|
+
...placement
|
|
647
|
+
}),
|
|
648
|
+
clearSequence: createKittyDeleteGraphicsSequence({
|
|
649
|
+
imageId: options.imageId,
|
|
650
|
+
placementId: options.placementId,
|
|
651
|
+
freeImageData: options.freeImageData
|
|
652
|
+
}),
|
|
653
|
+
...options.fallback != null ? { fallback: options.fallback } : {},
|
|
654
|
+
...options.cols != null ? { cols: options.cols } : {},
|
|
655
|
+
...options.rows != null ? { rows: options.rows } : {},
|
|
656
|
+
...options.sourceWidth != null ? { sourceWidth: options.sourceWidth } : {},
|
|
657
|
+
...options.sourceHeight != null ? { sourceHeight: options.sourceHeight } : {},
|
|
658
|
+
...options.zIndex != null ? { zIndex: options.zIndex } : {}
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
if (options.protocol === "iterm2") return {
|
|
662
|
+
type: "sequence",
|
|
663
|
+
protocol: "iterm2",
|
|
664
|
+
sequence: createIterm2InlineImageSequence(options.base64, {
|
|
665
|
+
width: options.cols,
|
|
666
|
+
height: options.rows,
|
|
667
|
+
preserveAspectRatio: true,
|
|
668
|
+
doNotMoveCursor: true
|
|
669
|
+
}),
|
|
670
|
+
...options.fallback != null ? { fallback: options.fallback } : {},
|
|
671
|
+
...options.cols != null ? { cols: options.cols } : {},
|
|
672
|
+
...options.rows != null ? { rows: options.rows } : {},
|
|
673
|
+
...options.sourceWidth != null ? { sourceWidth: options.sourceWidth } : {},
|
|
674
|
+
...options.sourceHeight != null ? { sourceHeight: options.sourceHeight } : {}
|
|
675
|
+
};
|
|
676
|
+
return null;
|
|
677
|
+
}
|
|
595
678
|
|
|
596
679
|
//#endregion
|
|
597
|
-
export { canDrawTerminalGraphicRect, createIterm2InlineImageSequence, createKittyDeleteGraphicsSequence, createKittyGraphicsSequence, createKittyPlacementSequence, detectTerminalGraphicsCapabilities, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, hashTerminalGraphicsString, isSafeTerminalGraphicsSequence, isTerminalGraphicsProtocol, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, stableTerminalGraphicNumericId, subscribeTerminalGraphicsOutput };
|
|
680
|
+
export { canDrawTerminalGraphicRect, createIterm2InlineImageSequence, createKittyDeleteGraphicsSequence, createKittyGraphicsSequence, createKittyPlacementSequence, createTerminalGraphicPngSequence, detectTerminalGraphicsCapabilities, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, hashTerminalGraphicsString, isSafeTerminalGraphicsSequence, isTerminalGraphicsProtocol, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, stableTerminalGraphicNumericId, subscribeTerminalGraphicsOutput };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { applyAnsiSgrStyle, parseAnsiSgr
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { applyAnsiSgrStyle, parseAnsiSgr } from "./create-terminal-Db_-UGVQ.js";
|
|
2
|
+
import { sanitizeTerminalHref } from "./hyperlink-clbb_ha_.js";
|
|
3
|
+
import { EventZIndexContextKey, LayoutContextKey, RenderPlaneContextKey, RenderStackKey, TerminalGraphicsActivityKey, createCombinedTerminalGraphicsActivity, createTerminalGraphicsActivity, forEachTextCellSegment, formatInlineCellLine, intersectRect, normalizeCellRect, nowTerminalGraphicTraceTime, padEndByCells$1 as padEndByCells, recordTerminalGraphicTrace, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useRenderStack, useTerminal, useTerminalNode, useVisibility, withTextWidthProvider, wrapByCells } from "./rect-JzWMJxxc.js";
|
|
4
|
+
import { TView, TuiThemeContextKey, createFrameMailbox, defaultActiveStyle, linkifyTextSegments, tuiDefaultTheme } from "./linkify-CL9wwnZN.js";
|
|
4
5
|
import { framePerfNow } from "./frame-perf-CHpWhbC4.js";
|
|
5
6
|
import { terminalSelectionRowSpans, terminalSelectionVisibleRowSpans } from "./terminal-selection-4W1SJj4c.js";
|
|
6
7
|
import { applyWheelScroll, createWheelScrollState, resetWheelScrollState } from "./wheel-scroll-DASkEZr-.js";
|
|
7
|
-
import { canDrawTerminalGraphicRect, createKittyDeleteGraphicsSequence, createKittyPlacementSequence, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, isSafeTerminalGraphicsSequence, isTerminalGraphicsProtocol, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, stableTerminalGraphicNumericId, subscribeTerminalGraphicsOutput } from "./terminal-graphics-
|
|
8
|
+
import { canDrawTerminalGraphicRect, createKittyDeleteGraphicsSequence, createKittyPlacementSequence, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, isSafeTerminalGraphicsSequence, isTerminalGraphicsProtocol, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, stableTerminalGraphicNumericId, subscribeTerminalGraphicsOutput } from "./terminal-graphics-DWZrl3oh.js";
|
|
8
9
|
import { computed, defineComponent, getCurrentInstance, h, inject, markRaw, onBeforeUnmount, provide, ref, shallowReactive, shallowRef, watch, watchEffect } from "vue";
|
|
9
10
|
|
|
10
11
|
//#region src/vue/utils/row-scroll.ts
|
|
@@ -453,11 +453,11 @@ export declare const TAgentTerminalGraphic: import("vue").DefineComponent<import
|
|
|
453
453
|
readonly zIndex: number;
|
|
454
454
|
readonly clear: boolean;
|
|
455
455
|
readonly placementMoveWithoutClear: boolean;
|
|
456
|
+
readonly fallback: string;
|
|
456
457
|
readonly trace: (event: TAgentTerminalGraphicTraceEvent) => void;
|
|
457
458
|
readonly scrolling: boolean;
|
|
458
459
|
readonly renderer: TAgentTerminalGraphicRenderer;
|
|
459
460
|
readonly loadingText: string;
|
|
460
|
-
readonly fallback: string;
|
|
461
461
|
readonly loadingStyle: Readonly<{
|
|
462
462
|
fg?: string;
|
|
463
463
|
bg?: string;
|
|
@@ -76,6 +76,34 @@ export declare const TMarkdownText: import("vue").DefineComponent<import("vue").
|
|
|
76
76
|
type: BooleanConstructor;
|
|
77
77
|
default: boolean;
|
|
78
78
|
};
|
|
79
|
+
mathImages: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
mathCellWidthPx: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
default: undefined;
|
|
86
|
+
};
|
|
87
|
+
mathCellHeightPx: {
|
|
88
|
+
type: NumberConstructor;
|
|
89
|
+
default: undefined;
|
|
90
|
+
};
|
|
91
|
+
mathScale: {
|
|
92
|
+
type: NumberConstructor;
|
|
93
|
+
default: undefined;
|
|
94
|
+
};
|
|
95
|
+
mathColor: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
mathMaxWidthCells: {
|
|
100
|
+
type: NumberConstructor;
|
|
101
|
+
default: undefined;
|
|
102
|
+
};
|
|
103
|
+
mathBaselineRatio: {
|
|
104
|
+
type: NumberConstructor;
|
|
105
|
+
default: undefined;
|
|
106
|
+
};
|
|
79
107
|
imageActions: {
|
|
80
108
|
type: BooleanConstructor;
|
|
81
109
|
default: boolean;
|
|
@@ -171,6 +199,34 @@ export declare const TMarkdownText: import("vue").DefineComponent<import("vue").
|
|
|
171
199
|
type: BooleanConstructor;
|
|
172
200
|
default: boolean;
|
|
173
201
|
};
|
|
202
|
+
mathImages: {
|
|
203
|
+
type: BooleanConstructor;
|
|
204
|
+
default: boolean;
|
|
205
|
+
};
|
|
206
|
+
mathCellWidthPx: {
|
|
207
|
+
type: NumberConstructor;
|
|
208
|
+
default: undefined;
|
|
209
|
+
};
|
|
210
|
+
mathCellHeightPx: {
|
|
211
|
+
type: NumberConstructor;
|
|
212
|
+
default: undefined;
|
|
213
|
+
};
|
|
214
|
+
mathScale: {
|
|
215
|
+
type: NumberConstructor;
|
|
216
|
+
default: undefined;
|
|
217
|
+
};
|
|
218
|
+
mathColor: {
|
|
219
|
+
type: StringConstructor;
|
|
220
|
+
default: undefined;
|
|
221
|
+
};
|
|
222
|
+
mathMaxWidthCells: {
|
|
223
|
+
type: NumberConstructor;
|
|
224
|
+
default: undefined;
|
|
225
|
+
};
|
|
226
|
+
mathBaselineRatio: {
|
|
227
|
+
type: NumberConstructor;
|
|
228
|
+
default: undefined;
|
|
229
|
+
};
|
|
174
230
|
imageActions: {
|
|
175
231
|
type: BooleanConstructor;
|
|
176
232
|
default: boolean;
|
|
@@ -193,6 +249,8 @@ export declare const TMarkdownText: import("vue").DefineComponent<import("vue").
|
|
|
193
249
|
source: string;
|
|
194
250
|
raw: string;
|
|
195
251
|
rendered: boolean;
|
|
252
|
+
pendingImage?: boolean;
|
|
253
|
+
mode?: "inline" | "display";
|
|
196
254
|
}>;
|
|
197
255
|
rect: Readonly<{
|
|
198
256
|
x: number;
|
|
@@ -207,9 +265,11 @@ export declare const TMarkdownText: import("vue").DefineComponent<import("vue").
|
|
|
207
265
|
}>) => any) | undefined;
|
|
208
266
|
onImageAction?: ((_payload: Readonly<{
|
|
209
267
|
image: Readonly<{
|
|
210
|
-
kind: "image";
|
|
211
|
-
src
|
|
268
|
+
kind: "image" | "math";
|
|
269
|
+
src?: string;
|
|
212
270
|
alt?: string;
|
|
271
|
+
tex?: string;
|
|
272
|
+
raw?: string;
|
|
213
273
|
mime?: string;
|
|
214
274
|
base64?: string;
|
|
215
275
|
originalBase64?: string;
|
|
@@ -273,6 +333,7 @@ export declare const TMarkdownText: import("vue").DefineComponent<import("vue").
|
|
|
273
333
|
codeBlock: Partial<Style>;
|
|
274
334
|
thematicBreak: Partial<Style>;
|
|
275
335
|
html: Partial<Style>;
|
|
336
|
+
math: Partial<Style>;
|
|
276
337
|
}>>;
|
|
277
338
|
imageRenderer: TuiMarkdownImageResolver;
|
|
278
339
|
imageMinWidth: number;
|
|
@@ -280,6 +341,13 @@ export declare const TMarkdownText: import("vue").DefineComponent<import("vue").
|
|
|
280
341
|
imageMinHeight: number;
|
|
281
342
|
imageMaxHeight: number;
|
|
282
343
|
imagePreserveAspectRatio: boolean;
|
|
344
|
+
mathImages: boolean;
|
|
345
|
+
mathCellWidthPx: number;
|
|
346
|
+
mathCellHeightPx: number;
|
|
347
|
+
mathScale: number;
|
|
348
|
+
mathColor: string;
|
|
349
|
+
mathMaxWidthCells: number;
|
|
350
|
+
mathBaselineRatio: number;
|
|
283
351
|
imageActions: boolean;
|
|
284
352
|
mathActions: boolean;
|
|
285
353
|
linkActions: boolean;
|