@simon_he/vue-tui 1.1.3 → 1.1.5

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.
Files changed (52) hide show
  1. package/README.md +18 -18
  2. package/dist/{TMermaidText-frVr8Ysb.js → TMermaidText-wLnMMvVS.js} +1 -1
  3. package/dist/{TSelect-Dx34M1pF.js → TSelect-CMBOOFwK.js} +5 -5
  4. package/dist/{TTree-DdAjCPHu.js → TTree-kk8ntrpg.js} +6 -5
  5. package/dist/agent/mermaid.d.cts +2 -2
  6. package/dist/agent/mermaid.d.ts +2 -2
  7. package/dist/agent.cjs +542 -266
  8. package/dist/agent.js +25 -82
  9. package/dist/{block-source-Crro3mxi.js → block-source-DhzajB9H.js} +299 -239
  10. package/dist/cli.cjs +57 -16
  11. package/dist/cli.js +70 -15
  12. package/dist/core.js +3 -3
  13. package/dist/{hyperlink-_1FAj7Wq.js → create-terminal-Db_-UGVQ.js} +474 -102
  14. package/dist/{dom-renderer-DXx8fWzD.js → dom-renderer-BfwAEQMf.js} +3 -2
  15. package/dist/experimental.cjs +103 -66
  16. package/dist/experimental.js +20 -74
  17. package/dist/hyperlink-clbb_ha_.js +100 -0
  18. package/dist/index.js +8 -8
  19. package/dist/{linkify-BjI4zVfY.js → linkify-CL9wwnZN.js} +3 -3
  20. package/dist/markdown.cjs +521 -212
  21. package/dist/markdown.d.cts +3 -0
  22. package/dist/markdown.d.ts +3 -0
  23. package/dist/markdown.js +75 -8
  24. package/dist/math-image-BZhmfUeu.js +308 -0
  25. package/dist/mermaid-N3kGTHFy.js +1697 -0
  26. package/dist/mermaid.cjs +1460 -6
  27. package/dist/mermaid.d.cts +4 -0
  28. package/dist/mermaid.d.ts +4 -0
  29. package/dist/mermaid.js +7 -5
  30. package/dist/{rect-DUpeDfBg.js → rect-JzWMJxxc.js} +1 -1
  31. package/dist/renderer/cli/stdout-renderer.d.ts +44 -0
  32. package/dist/renderer/terminal-graphics.d.ts +61 -0
  33. package/dist/renderer-dom.js +4 -4
  34. package/dist/{terminal-graphics-Bbe83wSr.js → terminal-graphics-2FTRg9x3.js} +90 -2
  35. package/dist/{tlog-theme-i6S_Oftd.js → tlog-theme-B91Wv7Zj.js} +5 -4
  36. package/dist/vue/components/TAgentTerminalGraphic.d.ts +1 -1
  37. package/dist/vue/components/TMarkdownText.d.ts +70 -2
  38. package/dist/vue/components/TMermaidImage.d.ts +920 -0
  39. package/dist/vue/components/TMermaidText.d.ts +2 -2
  40. package/dist/vue/components/TVirtualMarkdown.d.ts +70 -2
  41. package/dist/vue/markdown/ast.d.ts +5 -0
  42. package/dist/vue/markdown/document.d.ts +3 -0
  43. package/dist/vue/markdown/math-image.d.ts +68 -0
  44. package/dist/vue/markdown/theme.d.ts +12 -0
  45. package/dist/vue/markdown/types.d.ts +12 -2
  46. package/dist/vue/mermaid/beautiful-mermaid.d.ts +284 -240
  47. package/dist/vue/mermaid/mermaid-image.d.ts +73 -0
  48. package/dist/vue.js +9 -9
  49. package/package.json +24 -10
  50. package/dist/mermaid-BNhM1jAZ.js +0 -123
  51. package/dist/width-GqllnV8C.js +0 -474
  52. /package/dist/{ansi-palette-CH6jc2Z7.js → ansi-palette-BHF1rN7R.js} +0 -0
@@ -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, resolveMermaidSvgForResvg, 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, resolveMermaidSvgForResvg, 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 "./width-GqllnV8C.js";
2
- import "./rect-DUpeDfBg.js";
3
- import { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal } from "./TMermaidText-frVr8Ysb.js";
4
- import { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidText, beautifulMermaidRenderer, createBeautifulMermaidRenderer } from "./mermaid-BNhM1jAZ.js";
1
+ import "./create-terminal-Db_-UGVQ.js";
2
+ import "./rect-JzWMJxxc.js";
3
+ import { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal } from "./TMermaidText-wLnMMvVS.js";
4
+ import "./terminal-graphics-2FTRg9x3.js";
5
+ import "./math-image-BZhmfUeu.js";
6
+ import { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidImage, TMermaidText, beautifulMermaidRenderer, clearMermaidImageCache, createBeautifulMermaidRenderer, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, loadMermaidImageRenderer, normalizeMermaidImageOptions, resolveMermaidImageColor, resolveMermaidSvgForResvg, setMermaidImageRasterizer, subscribeMermaidImage } from "./mermaid-N3kGTHFy.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, resolveMermaidSvgForResvg, setMermaidImageRasterizer, subscribeMermaidImage };
@@ -1,4 +1,4 @@
1
- import { charCellWidth, segmentedGraphemes } from "./width-GqllnV8C.js";
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,64 @@ 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
+ /**
166
+ * Optional placement used by the initial transmission (a=T). Defaults to
167
+ * `placementColumns` / `placementRows`. When the resize placement changes
168
+ * over time (e.g. mermaid wheel zoom), keep this stable so the stdout
169
+ * renderer can replace the placement with the resize sequence instead of
170
+ * re-sending the PNG (the renderer compares the full transmission string).
171
+ */
172
+ transmissionColumns?: number;
173
+ transmissionRows?: number;
174
+ /**
175
+ * Whether the initial transmission (a=T) carries the source crop. Defaults
176
+ * to `true` (current behavior). Set to `false` when the same image must be
177
+ * re-placed with different crops later (e.g. wheel zoom): the transmission
178
+ * then stores the full image so every resize placement can reference any
179
+ * region of it.
180
+ */
181
+ cropTransmission?: boolean;
182
+ rect?: TerminalGraphicPngViewport;
183
+ fullRect?: TerminalGraphicPngViewport;
184
+ zIndex?: number;
185
+ freeImageData?: boolean;
186
+ fallback?: string;
187
+ }>;
188
+ export type TerminalGraphicPngSequenceResult = Readonly<{
189
+ type: "sequence";
190
+ protocol: "kitty" | "iterm2";
191
+ sequence: string;
192
+ resizeSequence?: string;
193
+ clearSequence?: string;
194
+ fallback?: string;
195
+ cols?: number;
196
+ rows?: number;
197
+ sourceWidth?: number;
198
+ sourceHeight?: number;
199
+ zIndex?: number;
200
+ }>;
201
+ /**
202
+ * Build a kitty/iTerm2 graphics sequence that renders one PNG. Shared by the
203
+ * image renderer factory (`createPngTerminalGraphicRenderer`) and the video
204
+ * frame renderer (`TVideo`) so both emit the same terminal sequences.
205
+ *
206
+ * Returns null for protocols this helper does not handle (callers fall back).
207
+ */
208
+ export declare function createTerminalGraphicPngSequence(options: CreateTerminalGraphicPngSequenceOptions): TerminalGraphicPngSequenceResult | null;
@@ -1,6 +1,6 @@
1
- import "./hyperlink-_1FAj7Wq.js";
2
- import "./width-GqllnV8C.js";
3
- import "./ansi-palette-CH6jc2Z7.js";
4
- import { DOM_RENDERER_CAPABILITIES, createDomRenderer } from "./dom-renderer-DXx8fWzD.js";
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 "./hyperlink-_1FAj7Wq.js";
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,94 @@ 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
+ const cropTransmission = options.cropTransmission !== false;
634
+ const transmissionPlacement = cropTransmission ? placement : {
635
+ columns: options.transmissionColumns ?? options.placementColumns,
636
+ rows: options.transmissionRows ?? options.placementRows
637
+ };
638
+ return {
639
+ type: "sequence",
640
+ protocol: "kitty",
641
+ sequence: createKittyGraphicsSequence(options.base64, {
642
+ imageId: options.imageId,
643
+ placementId: options.placementId,
644
+ zIndex: options.zIndex,
645
+ ...transmissionPlacement
646
+ }),
647
+ resizeSequence: createKittyPlacementSequence({
648
+ imageId: options.imageId,
649
+ placementId: options.placementId,
650
+ zIndex: options.zIndex,
651
+ ...placement
652
+ }),
653
+ clearSequence: createKittyDeleteGraphicsSequence({
654
+ imageId: options.imageId,
655
+ placementId: options.placementId,
656
+ freeImageData: options.freeImageData
657
+ }),
658
+ ...options.fallback != null ? { fallback: options.fallback } : {},
659
+ ...options.cols != null ? { cols: options.cols } : {},
660
+ ...options.rows != null ? { rows: options.rows } : {},
661
+ ...options.sourceWidth != null ? { sourceWidth: options.sourceWidth } : {},
662
+ ...options.sourceHeight != null ? { sourceHeight: options.sourceHeight } : {},
663
+ ...options.zIndex != null ? { zIndex: options.zIndex } : {}
664
+ };
665
+ }
666
+ if (options.protocol === "iterm2") return {
667
+ type: "sequence",
668
+ protocol: "iterm2",
669
+ sequence: createIterm2InlineImageSequence(options.base64, {
670
+ width: options.cols,
671
+ height: options.rows,
672
+ preserveAspectRatio: true,
673
+ doNotMoveCursor: true
674
+ }),
675
+ ...options.fallback != null ? { fallback: options.fallback } : {},
676
+ ...options.cols != null ? { cols: options.cols } : {},
677
+ ...options.rows != null ? { rows: options.rows } : {},
678
+ ...options.sourceWidth != null ? { sourceWidth: options.sourceWidth } : {},
679
+ ...options.sourceHeight != null ? { sourceHeight: options.sourceHeight } : {}
680
+ };
681
+ return null;
682
+ }
595
683
 
596
684
  //#endregion
597
- export { canDrawTerminalGraphicRect, createIterm2InlineImageSequence, createKittyDeleteGraphicsSequence, createKittyGraphicsSequence, createKittyPlacementSequence, detectTerminalGraphicsCapabilities, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, hashTerminalGraphicsString, isSafeTerminalGraphicsSequence, isTerminalGraphicsProtocol, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, stableTerminalGraphicNumericId, subscribeTerminalGraphicsOutput };
685
+ 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, sanitizeTerminalHref } from "./hyperlink-_1FAj7Wq.js";
2
- 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-DUpeDfBg.js";
3
- import { TView, TuiThemeContextKey, createFrameMailbox, defaultActiveStyle, linkifyTextSegments, tuiDefaultTheme } from "./linkify-BjI4zVfY.js";
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-Bbe83wSr.js";
8
+ import { canDrawTerminalGraphicRect, createKittyDeleteGraphicsSequence, createKittyPlacementSequence, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, isSafeTerminalGraphicsSequence, isTerminalGraphicsProtocol, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, stableTerminalGraphicNumericId, subscribeTerminalGraphicsOutput } from "./terminal-graphics-2FTRg9x3.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: string;
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;