@simon_he/vue-tui 1.1.4 → 1.1.6
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 +18 -18
- package/dist/agent/mermaid.d.cts +1 -1
- package/dist/agent/mermaid.d.ts +1 -1
- package/dist/agent.cjs +482 -148
- package/dist/agent.js +3 -3
- package/dist/{block-source-D3YGTErb.js → block-source-DByORvKG.js} +244 -51
- package/dist/cli.cjs +38 -19
- package/dist/cli.js +54 -14
- package/dist/experimental.cjs +6 -1
- package/dist/experimental.js +2 -2
- package/dist/markdown.cjs +475 -146
- package/dist/markdown.js +2 -2
- package/dist/{mermaid-uEfRItDe.js → mermaid-CWy4wtCL.js} +739 -163
- package/dist/mermaid.cjs +615 -176
- package/dist/mermaid.d.cts +1 -1
- package/dist/mermaid.d.ts +1 -1
- package/dist/mermaid.js +3 -3
- package/dist/renderer/terminal-graphics.d.ts +17 -0
- package/dist/{terminal-graphics-DWZrl3oh.js → terminal-graphics-D6KErRBY.js} +8 -3
- package/dist/{tlog-theme-DqnF_zNe.js → tlog-theme-DIrlCw6m.js} +1 -1
- package/dist/vue/components/TAgentTerminalGraphic.d.ts +3 -0
- package/dist/vue/components/TMermaidImage.d.ts +187 -0
- package/dist/vue/components/TVirtualMarkdown.d.ts +10 -0
- package/dist/vue/markdown/render.d.ts +18 -1
- package/dist/vue/mermaid/beautiful-mermaid.d.ts +282 -238
- package/dist/vue/mermaid/mermaid-image.d.ts +8 -0
- package/package.json +22 -10
package/dist/mermaid.d.cts
CHANGED
|
@@ -3,5 +3,5 @@ export { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal, } from "./
|
|
|
3
3
|
export { beautifulMermaidRenderer, createBeautifulMermaidRenderer, TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidText, } from "./vue/mermaid/beautiful-mermaid.js";
|
|
4
4
|
export { TMermaidImage } from "./vue/components/TMermaidImage.js";
|
|
5
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";
|
|
6
|
+
export { clearMermaidImageCache, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, loadMermaidImageRenderer, normalizeMermaidImageOptions, resolveMermaidImageColor, resolveMermaidSvgForResvg, setMermaidImageRasterizer, subscribeMermaidImage, } from "./vue/mermaid/mermaid-image.js";
|
|
7
7
|
export type { TuiMermaidImageCells, TuiMermaidImageOptions, TuiMermaidImageRasterizer, } from "./vue/mermaid/mermaid-image.js";
|
package/dist/mermaid.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal, } from "./
|
|
|
3
3
|
export { beautifulMermaidRenderer, createBeautifulMermaidRenderer, TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidText, } from "./vue/mermaid/beautiful-mermaid.js";
|
|
4
4
|
export { TMermaidImage } from "./vue/components/TMermaidImage.js";
|
|
5
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";
|
|
6
|
+
export { clearMermaidImageCache, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, loadMermaidImageRenderer, normalizeMermaidImageOptions, resolveMermaidImageColor, resolveMermaidSvgForResvg, setMermaidImageRasterizer, subscribeMermaidImage, } from "./vue/mermaid/mermaid-image.js";
|
|
7
7
|
export type { TuiMermaidImageCells, TuiMermaidImageOptions, TuiMermaidImageRasterizer, } from "./vue/mermaid/mermaid-image.js";
|
package/dist/mermaid.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./create-terminal-Db_-UGVQ.js";
|
|
2
2
|
import "./rect-JzWMJxxc.js";
|
|
3
3
|
import { isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal } from "./TMermaidText-wLnMMvVS.js";
|
|
4
|
-
import "./terminal-graphics-
|
|
4
|
+
import "./terminal-graphics-D6KErRBY.js";
|
|
5
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-
|
|
6
|
+
import { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidImage, TMermaidText, beautifulMermaidRenderer, clearMermaidImageCache, createBeautifulMermaidRenderer, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, loadMermaidImageRenderer, normalizeMermaidImageOptions, resolveMermaidImageColor, resolveMermaidSvgForResvg, setMermaidImageRasterizer, subscribeMermaidImage } from "./mermaid-CWy4wtCL.js";
|
|
7
7
|
|
|
8
|
-
export { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidImage, TMermaidText, beautifulMermaidRenderer, clearMermaidImageCache, createBeautifulMermaidRenderer, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, isSimpleMermaidFlowchartSource, loadMermaidImageRenderer, markMermaidRenderErrorFatal, normalizeMermaidImageOptions, resolveMermaidImageColor, setMermaidImageRasterizer, subscribeMermaidImage };
|
|
8
|
+
export { TBeautifulMermaid, TBeautifulMermaidText, TMermaid, TMermaidImage, TMermaidText, beautifulMermaidRenderer, clearMermaidImageCache, createBeautifulMermaidRenderer, getCachedMermaidImage, getMermaidImage, isMermaidImageRendererReady, isSimpleMermaidFlowchartSource, loadMermaidImageRenderer, markMermaidRenderErrorFatal, normalizeMermaidImageOptions, resolveMermaidImageColor, resolveMermaidSvgForResvg, setMermaidImageRasterizer, subscribeMermaidImage };
|
|
@@ -162,6 +162,23 @@ export type CreateTerminalGraphicPngSequenceOptions = Readonly<{
|
|
|
162
162
|
sourceHeight?: number;
|
|
163
163
|
placementColumns?: number;
|
|
164
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;
|
|
165
182
|
rect?: TerminalGraphicPngViewport;
|
|
166
183
|
fullRect?: TerminalGraphicPngViewport;
|
|
167
184
|
zIndex?: number;
|
|
@@ -89,8 +89,8 @@ function detectCandidates(env) {
|
|
|
89
89
|
const term = String(envString(env, "TERM") ?? "").toLowerCase();
|
|
90
90
|
const termProgram = String(envString(env, "TERM_PROGRAM") ?? "").toLowerCase();
|
|
91
91
|
const termProgramVersion = String(envString(env, "TERM_PROGRAM_VERSION") ?? "").toLowerCase();
|
|
92
|
-
if (envString(env, "KITTY_WINDOW_ID") || envString(env, "GHOSTTY_RESOURCES_DIR") || /(?:^|-)kitty(?:-|$)/i.test(term) || term.includes("ghostty") || termProgram.includes("ghostty")) candidates.push("kitty");
|
|
93
|
-
if (termProgram.includes("iterm")
|
|
92
|
+
if (envString(env, "KITTY_WINDOW_ID") || envString(env, "GHOSTTY_RESOURCES_DIR") || /(?:^|-)kitty(?:-|$)/i.test(term) || term.includes("ghostty") || termProgram.includes("ghostty") || termProgram.includes("wezterm") || envString(env, "WEZTERM_PANE") || envString(env, "WEZTERM_EXECUTABLE")) candidates.push("kitty");
|
|
93
|
+
if (termProgram.includes("iterm")) candidates.push("iterm2");
|
|
94
94
|
if (truthy(envString(env, "VUE_TUI_SIXEL")) || truthy(envString(env, "VUE_TUI_GRAPHICS_SIXEL")) || String(envString(env, "TERMINAL_GRAPHICS") ?? "").toLowerCase().includes("sixel") || /\bsixel\b/i.test(`${term} ${termProgram} ${termProgramVersion}`)) candidates.push("sixel");
|
|
95
95
|
return uniqueProtocols(candidates);
|
|
96
96
|
}
|
|
@@ -630,6 +630,11 @@ function createTerminalGraphicPngSequence(options) {
|
|
|
630
630
|
...crop
|
|
631
631
|
};
|
|
632
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
|
+
};
|
|
633
638
|
return {
|
|
634
639
|
type: "sequence",
|
|
635
640
|
protocol: "kitty",
|
|
@@ -637,7 +642,7 @@ function createTerminalGraphicPngSequence(options) {
|
|
|
637
642
|
imageId: options.imageId,
|
|
638
643
|
placementId: options.placementId,
|
|
639
644
|
zIndex: options.zIndex,
|
|
640
|
-
...
|
|
645
|
+
...transmissionPlacement
|
|
641
646
|
}),
|
|
642
647
|
resizeSequence: createKittyPlacementSequence({
|
|
643
648
|
imageId: options.imageId,
|
|
@@ -5,7 +5,7 @@ import { TView, TuiThemeContextKey, createFrameMailbox, defaultActiveStyle, link
|
|
|
5
5
|
import { framePerfNow } from "./frame-perf-CHpWhbC4.js";
|
|
6
6
|
import { terminalSelectionRowSpans, terminalSelectionVisibleRowSpans } from "./terminal-selection-4W1SJj4c.js";
|
|
7
7
|
import { applyWheelScroll, createWheelScrollState, resetWheelScrollState } from "./wheel-scroll-DASkEZr-.js";
|
|
8
|
-
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-D6KErRBY.js";
|
|
9
9
|
import { computed, defineComponent, getCurrentInstance, h, inject, markRaw, onBeforeUnmount, provide, ref, shallowReactive, shallowRef, watch, watchEffect } from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/vue/utils/row-scroll.ts
|
|
@@ -155,6 +155,7 @@ export declare const tAgentTerminalGraphicProps: {
|
|
|
155
155
|
readonly type: NumberConstructor;
|
|
156
156
|
readonly default: 0;
|
|
157
157
|
};
|
|
158
|
+
/** Advanced Kitty-only opt-in for moving an unchanged image via a reusable placement sequence. */
|
|
158
159
|
readonly placementMoveWithoutClear: {
|
|
159
160
|
readonly type: BooleanConstructor;
|
|
160
161
|
readonly default: false;
|
|
@@ -278,6 +279,7 @@ export declare const TAgentTerminalGraphic: import("vue").DefineComponent<import
|
|
|
278
279
|
readonly type: NumberConstructor;
|
|
279
280
|
readonly default: 0;
|
|
280
281
|
};
|
|
282
|
+
/** Advanced Kitty-only opt-in for moving an unchanged image via a reusable placement sequence. */
|
|
281
283
|
readonly placementMoveWithoutClear: {
|
|
282
284
|
readonly type: BooleanConstructor;
|
|
283
285
|
readonly default: false;
|
|
@@ -401,6 +403,7 @@ export declare const TAgentTerminalGraphic: import("vue").DefineComponent<import
|
|
|
401
403
|
readonly type: NumberConstructor;
|
|
402
404
|
readonly default: 0;
|
|
403
405
|
};
|
|
406
|
+
/** Advanced Kitty-only opt-in for moving an unchanged image via a reusable placement sequence. */
|
|
404
407
|
readonly placementMoveWithoutClear: {
|
|
405
408
|
readonly type: BooleanConstructor;
|
|
406
409
|
readonly default: false;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExtractPublicPropTypes, PropType } from "vue";
|
|
2
2
|
import type { Style } from "../../core/types.js";
|
|
3
|
+
import type { TMermaidAsciiOptions, TMermaidRenderEligibility, TMermaidRenderer } from "./TMermaidText.js";
|
|
3
4
|
import { type TuiMermaidImageRasterizer } from "../mermaid/mermaid-image.js";
|
|
4
5
|
export type TMermaidImageCopyPayload = Readonly<{
|
|
5
6
|
text: string;
|
|
@@ -87,6 +88,18 @@ export declare const tMermaidImageProps: {
|
|
|
87
88
|
readonly type: NumberConstructor;
|
|
88
89
|
readonly default: undefined;
|
|
89
90
|
};
|
|
91
|
+
readonly textRenderer: {
|
|
92
|
+
readonly type: PropType<TMermaidRenderer>;
|
|
93
|
+
readonly default: undefined;
|
|
94
|
+
};
|
|
95
|
+
readonly shouldRenderSource: {
|
|
96
|
+
readonly type: PropType<TMermaidRenderEligibility>;
|
|
97
|
+
readonly default: undefined;
|
|
98
|
+
};
|
|
99
|
+
readonly textOptions: {
|
|
100
|
+
readonly type: PropType<TMermaidAsciiOptions>;
|
|
101
|
+
readonly default: undefined;
|
|
102
|
+
};
|
|
90
103
|
readonly box: {
|
|
91
104
|
readonly type: BooleanConstructor;
|
|
92
105
|
readonly default: true;
|
|
@@ -131,6 +144,26 @@ export declare const tMermaidImageProps: {
|
|
|
131
144
|
readonly type: BooleanConstructor;
|
|
132
145
|
readonly default: false;
|
|
133
146
|
};
|
|
147
|
+
readonly zoomOnWheel: {
|
|
148
|
+
readonly type: BooleanConstructor;
|
|
149
|
+
readonly default: true;
|
|
150
|
+
};
|
|
151
|
+
readonly zoomModifier: {
|
|
152
|
+
readonly type: PropType<"meta" | "ctrl" | "metaCtrl" | "none">;
|
|
153
|
+
readonly default: "metaCtrl";
|
|
154
|
+
};
|
|
155
|
+
readonly minZoom: {
|
|
156
|
+
readonly type: NumberConstructor;
|
|
157
|
+
readonly default: 1;
|
|
158
|
+
};
|
|
159
|
+
readonly maxZoom: {
|
|
160
|
+
readonly type: NumberConstructor;
|
|
161
|
+
readonly default: 6;
|
|
162
|
+
};
|
|
163
|
+
readonly zoomSensitivity: {
|
|
164
|
+
readonly type: NumberConstructor;
|
|
165
|
+
readonly default: 0.002;
|
|
166
|
+
};
|
|
134
167
|
};
|
|
135
168
|
export type TMermaidImageProps = ExtractPublicPropTypes<typeof tMermaidImageProps>;
|
|
136
169
|
export declare const TMermaidImage: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -214,6 +247,18 @@ export declare const TMermaidImage: import("vue").DefineComponent<import("vue").
|
|
|
214
247
|
readonly type: NumberConstructor;
|
|
215
248
|
readonly default: undefined;
|
|
216
249
|
};
|
|
250
|
+
readonly textRenderer: {
|
|
251
|
+
readonly type: PropType<TMermaidRenderer>;
|
|
252
|
+
readonly default: undefined;
|
|
253
|
+
};
|
|
254
|
+
readonly shouldRenderSource: {
|
|
255
|
+
readonly type: PropType<TMermaidRenderEligibility>;
|
|
256
|
+
readonly default: undefined;
|
|
257
|
+
};
|
|
258
|
+
readonly textOptions: {
|
|
259
|
+
readonly type: PropType<TMermaidAsciiOptions>;
|
|
260
|
+
readonly default: undefined;
|
|
261
|
+
};
|
|
217
262
|
readonly box: {
|
|
218
263
|
readonly type: BooleanConstructor;
|
|
219
264
|
readonly default: true;
|
|
@@ -258,6 +303,26 @@ export declare const TMermaidImage: import("vue").DefineComponent<import("vue").
|
|
|
258
303
|
readonly type: BooleanConstructor;
|
|
259
304
|
readonly default: false;
|
|
260
305
|
};
|
|
306
|
+
readonly zoomOnWheel: {
|
|
307
|
+
readonly type: BooleanConstructor;
|
|
308
|
+
readonly default: true;
|
|
309
|
+
};
|
|
310
|
+
readonly zoomModifier: {
|
|
311
|
+
readonly type: PropType<"meta" | "ctrl" | "metaCtrl" | "none">;
|
|
312
|
+
readonly default: "metaCtrl";
|
|
313
|
+
};
|
|
314
|
+
readonly minZoom: {
|
|
315
|
+
readonly type: NumberConstructor;
|
|
316
|
+
readonly default: 1;
|
|
317
|
+
};
|
|
318
|
+
readonly maxZoom: {
|
|
319
|
+
readonly type: NumberConstructor;
|
|
320
|
+
readonly default: 6;
|
|
321
|
+
};
|
|
322
|
+
readonly zoomSensitivity: {
|
|
323
|
+
readonly type: NumberConstructor;
|
|
324
|
+
readonly default: 0.002;
|
|
325
|
+
};
|
|
261
326
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
262
327
|
[key: string]: any;
|
|
263
328
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -343,6 +408,18 @@ export declare const TMermaidImage: import("vue").DefineComponent<import("vue").
|
|
|
343
408
|
readonly type: NumberConstructor;
|
|
344
409
|
readonly default: undefined;
|
|
345
410
|
};
|
|
411
|
+
readonly textRenderer: {
|
|
412
|
+
readonly type: PropType<TMermaidRenderer>;
|
|
413
|
+
readonly default: undefined;
|
|
414
|
+
};
|
|
415
|
+
readonly shouldRenderSource: {
|
|
416
|
+
readonly type: PropType<TMermaidRenderEligibility>;
|
|
417
|
+
readonly default: undefined;
|
|
418
|
+
};
|
|
419
|
+
readonly textOptions: {
|
|
420
|
+
readonly type: PropType<TMermaidAsciiOptions>;
|
|
421
|
+
readonly default: undefined;
|
|
422
|
+
};
|
|
346
423
|
readonly box: {
|
|
347
424
|
readonly type: BooleanConstructor;
|
|
348
425
|
readonly default: true;
|
|
@@ -387,6 +464,26 @@ export declare const TMermaidImage: import("vue").DefineComponent<import("vue").
|
|
|
387
464
|
readonly type: BooleanConstructor;
|
|
388
465
|
readonly default: false;
|
|
389
466
|
};
|
|
467
|
+
readonly zoomOnWheel: {
|
|
468
|
+
readonly type: BooleanConstructor;
|
|
469
|
+
readonly default: true;
|
|
470
|
+
};
|
|
471
|
+
readonly zoomModifier: {
|
|
472
|
+
readonly type: PropType<"meta" | "ctrl" | "metaCtrl" | "none">;
|
|
473
|
+
readonly default: "metaCtrl";
|
|
474
|
+
};
|
|
475
|
+
readonly minZoom: {
|
|
476
|
+
readonly type: NumberConstructor;
|
|
477
|
+
readonly default: 1;
|
|
478
|
+
};
|
|
479
|
+
readonly maxZoom: {
|
|
480
|
+
readonly type: NumberConstructor;
|
|
481
|
+
readonly default: 6;
|
|
482
|
+
};
|
|
483
|
+
readonly zoomSensitivity: {
|
|
484
|
+
readonly type: NumberConstructor;
|
|
485
|
+
readonly default: 0.002;
|
|
486
|
+
};
|
|
390
487
|
}>> & Readonly<{
|
|
391
488
|
onCopy?: ((_payload: Readonly<{
|
|
392
489
|
text: string;
|
|
@@ -421,6 +518,7 @@ export declare const TMermaidImage: import("vue").DefineComponent<import("vue").
|
|
|
421
518
|
readonly scale: number;
|
|
422
519
|
readonly maxWidthCells: number;
|
|
423
520
|
readonly ascii: boolean;
|
|
521
|
+
readonly shouldRenderSource: TMermaidRenderEligibility;
|
|
424
522
|
readonly box: boolean;
|
|
425
523
|
readonly copyButton: boolean;
|
|
426
524
|
readonly copyText: string;
|
|
@@ -429,8 +527,20 @@ export declare const TMermaidImage: import("vue").DefineComponent<import("vue").
|
|
|
429
527
|
readonly maxRenderSourceChars: number;
|
|
430
528
|
readonly maxRenderSourceLines: number;
|
|
431
529
|
readonly copiedDurationMs: number;
|
|
530
|
+
readonly minZoom: number;
|
|
531
|
+
readonly maxZoom: number;
|
|
532
|
+
readonly zoomSensitivity: number;
|
|
432
533
|
readonly maxHeightCells: number;
|
|
534
|
+
readonly textRenderer: TMermaidRenderer;
|
|
535
|
+
readonly textOptions: Readonly<{
|
|
536
|
+
paddingX?: number;
|
|
537
|
+
paddingY?: number;
|
|
538
|
+
boxBorderPadding?: number;
|
|
539
|
+
theme?: import("./TMermaidText.js").TMermaidAsciiTheme;
|
|
540
|
+
}>;
|
|
433
541
|
readonly copyOnClick: boolean;
|
|
542
|
+
readonly zoomOnWheel: boolean;
|
|
543
|
+
readonly zoomModifier: "none" | "meta" | "ctrl" | "metaCtrl";
|
|
434
544
|
}, {}>;
|
|
435
545
|
export declare const TMermaidImageText: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
436
546
|
readonly x: {
|
|
@@ -513,6 +623,18 @@ export declare const TMermaidImageText: import("vue").DefineComponent<import("vu
|
|
|
513
623
|
readonly type: NumberConstructor;
|
|
514
624
|
readonly default: undefined;
|
|
515
625
|
};
|
|
626
|
+
readonly textRenderer: {
|
|
627
|
+
readonly type: PropType<TMermaidRenderer>;
|
|
628
|
+
readonly default: undefined;
|
|
629
|
+
};
|
|
630
|
+
readonly shouldRenderSource: {
|
|
631
|
+
readonly type: PropType<TMermaidRenderEligibility>;
|
|
632
|
+
readonly default: undefined;
|
|
633
|
+
};
|
|
634
|
+
readonly textOptions: {
|
|
635
|
+
readonly type: PropType<TMermaidAsciiOptions>;
|
|
636
|
+
readonly default: undefined;
|
|
637
|
+
};
|
|
516
638
|
readonly box: {
|
|
517
639
|
readonly type: BooleanConstructor;
|
|
518
640
|
readonly default: true;
|
|
@@ -557,6 +679,26 @@ export declare const TMermaidImageText: import("vue").DefineComponent<import("vu
|
|
|
557
679
|
readonly type: BooleanConstructor;
|
|
558
680
|
readonly default: false;
|
|
559
681
|
};
|
|
682
|
+
readonly zoomOnWheel: {
|
|
683
|
+
readonly type: BooleanConstructor;
|
|
684
|
+
readonly default: true;
|
|
685
|
+
};
|
|
686
|
+
readonly zoomModifier: {
|
|
687
|
+
readonly type: PropType<"meta" | "ctrl" | "metaCtrl" | "none">;
|
|
688
|
+
readonly default: "metaCtrl";
|
|
689
|
+
};
|
|
690
|
+
readonly minZoom: {
|
|
691
|
+
readonly type: NumberConstructor;
|
|
692
|
+
readonly default: 1;
|
|
693
|
+
};
|
|
694
|
+
readonly maxZoom: {
|
|
695
|
+
readonly type: NumberConstructor;
|
|
696
|
+
readonly default: 6;
|
|
697
|
+
};
|
|
698
|
+
readonly zoomSensitivity: {
|
|
699
|
+
readonly type: NumberConstructor;
|
|
700
|
+
readonly default: 0.002;
|
|
701
|
+
};
|
|
560
702
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
561
703
|
[key: string]: any;
|
|
562
704
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -642,6 +784,18 @@ export declare const TMermaidImageText: import("vue").DefineComponent<import("vu
|
|
|
642
784
|
readonly type: NumberConstructor;
|
|
643
785
|
readonly default: undefined;
|
|
644
786
|
};
|
|
787
|
+
readonly textRenderer: {
|
|
788
|
+
readonly type: PropType<TMermaidRenderer>;
|
|
789
|
+
readonly default: undefined;
|
|
790
|
+
};
|
|
791
|
+
readonly shouldRenderSource: {
|
|
792
|
+
readonly type: PropType<TMermaidRenderEligibility>;
|
|
793
|
+
readonly default: undefined;
|
|
794
|
+
};
|
|
795
|
+
readonly textOptions: {
|
|
796
|
+
readonly type: PropType<TMermaidAsciiOptions>;
|
|
797
|
+
readonly default: undefined;
|
|
798
|
+
};
|
|
645
799
|
readonly box: {
|
|
646
800
|
readonly type: BooleanConstructor;
|
|
647
801
|
readonly default: true;
|
|
@@ -686,6 +840,26 @@ export declare const TMermaidImageText: import("vue").DefineComponent<import("vu
|
|
|
686
840
|
readonly type: BooleanConstructor;
|
|
687
841
|
readonly default: false;
|
|
688
842
|
};
|
|
843
|
+
readonly zoomOnWheel: {
|
|
844
|
+
readonly type: BooleanConstructor;
|
|
845
|
+
readonly default: true;
|
|
846
|
+
};
|
|
847
|
+
readonly zoomModifier: {
|
|
848
|
+
readonly type: PropType<"meta" | "ctrl" | "metaCtrl" | "none">;
|
|
849
|
+
readonly default: "metaCtrl";
|
|
850
|
+
};
|
|
851
|
+
readonly minZoom: {
|
|
852
|
+
readonly type: NumberConstructor;
|
|
853
|
+
readonly default: 1;
|
|
854
|
+
};
|
|
855
|
+
readonly maxZoom: {
|
|
856
|
+
readonly type: NumberConstructor;
|
|
857
|
+
readonly default: 6;
|
|
858
|
+
};
|
|
859
|
+
readonly zoomSensitivity: {
|
|
860
|
+
readonly type: NumberConstructor;
|
|
861
|
+
readonly default: 0.002;
|
|
862
|
+
};
|
|
689
863
|
}>> & Readonly<{
|
|
690
864
|
onCopy?: ((_payload: Readonly<{
|
|
691
865
|
text: string;
|
|
@@ -720,6 +894,7 @@ export declare const TMermaidImageText: import("vue").DefineComponent<import("vu
|
|
|
720
894
|
readonly scale: number;
|
|
721
895
|
readonly maxWidthCells: number;
|
|
722
896
|
readonly ascii: boolean;
|
|
897
|
+
readonly shouldRenderSource: TMermaidRenderEligibility;
|
|
723
898
|
readonly box: boolean;
|
|
724
899
|
readonly copyButton: boolean;
|
|
725
900
|
readonly copyText: string;
|
|
@@ -728,6 +903,18 @@ export declare const TMermaidImageText: import("vue").DefineComponent<import("vu
|
|
|
728
903
|
readonly maxRenderSourceChars: number;
|
|
729
904
|
readonly maxRenderSourceLines: number;
|
|
730
905
|
readonly copiedDurationMs: number;
|
|
906
|
+
readonly minZoom: number;
|
|
907
|
+
readonly maxZoom: number;
|
|
908
|
+
readonly zoomSensitivity: number;
|
|
731
909
|
readonly maxHeightCells: number;
|
|
910
|
+
readonly textRenderer: TMermaidRenderer;
|
|
911
|
+
readonly textOptions: Readonly<{
|
|
912
|
+
paddingX?: number;
|
|
913
|
+
paddingY?: number;
|
|
914
|
+
boxBorderPadding?: number;
|
|
915
|
+
theme?: import("./TMermaidText.js").TMermaidAsciiTheme;
|
|
916
|
+
}>;
|
|
732
917
|
readonly copyOnClick: boolean;
|
|
918
|
+
readonly zoomOnWheel: boolean;
|
|
919
|
+
readonly zoomModifier: "none" | "meta" | "ctrl" | "metaCtrl";
|
|
733
920
|
}, {}>;
|
|
@@ -3,6 +3,7 @@ import type { Style } from "../../core/types.js";
|
|
|
3
3
|
import type { Rect, TerminalKeyboardEvent } from "../../events/manager/types.js";
|
|
4
4
|
import { type TuiMarkdownThemeOverrides } from "../markdown/theme.js";
|
|
5
5
|
import type { TuiMarkdownBlock, TuiMarkdownImageActionPayload, TuiMarkdownImageResolver, TuiMarkdownLinkActionPayload, TuiMarkdownMathActionPayload } from "../markdown/types.js";
|
|
6
|
+
import type { TVirtualRowsRowScrollMode } from "./TVirtualRows.js";
|
|
6
7
|
export declare const TVirtualMarkdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
8
|
x: {
|
|
8
9
|
type: NumberConstructor;
|
|
@@ -132,6 +133,10 @@ export declare const TVirtualMarkdown: import("vue").DefineComponent<import("vue
|
|
|
132
133
|
type: PropType<readonly Rect[]>;
|
|
133
134
|
default: undefined;
|
|
134
135
|
};
|
|
136
|
+
rowScrollMode: {
|
|
137
|
+
type: PropType<TVirtualRowsRowScrollMode>;
|
|
138
|
+
default: string;
|
|
139
|
+
};
|
|
135
140
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
136
141
|
[key: string]: any;
|
|
137
142
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -272,6 +277,10 @@ export declare const TVirtualMarkdown: import("vue").DefineComponent<import("vue
|
|
|
272
277
|
type: PropType<readonly Rect[]>;
|
|
273
278
|
default: undefined;
|
|
274
279
|
};
|
|
280
|
+
rowScrollMode: {
|
|
281
|
+
type: PropType<TVirtualRowsRowScrollMode>;
|
|
282
|
+
default: string;
|
|
283
|
+
};
|
|
275
284
|
}>> & Readonly<{
|
|
276
285
|
onKeydown?: ((_event: TerminalKeyboardEvent) => any) | undefined;
|
|
277
286
|
onFocus?: (() => any) | undefined;
|
|
@@ -355,6 +364,7 @@ export declare const TVirtualMarkdown: import("vue").DefineComponent<import("vue
|
|
|
355
364
|
content: string;
|
|
356
365
|
final: boolean;
|
|
357
366
|
streaming: boolean;
|
|
367
|
+
rowScrollMode: TVirtualRowsRowScrollMode;
|
|
358
368
|
scrollTop: number;
|
|
359
369
|
customHtmlTags: readonly string[];
|
|
360
370
|
theme: Readonly<Partial<{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Style, Terminal } from "../../core/types.js";
|
|
2
2
|
import type { TuiMarkdownVisualRow } from "./types.js";
|
|
3
|
-
|
|
3
|
+
type MarkdownImageGraphic = NonNullable<TuiMarkdownVisualRow["segments"][number]["graphic"]>;
|
|
4
|
+
export declare function markdownImageGraphicId(segment: MarkdownImageGraphic, identity: string): string;
|
|
4
5
|
export declare function clearMarkdownImageGraphics(terminal: Terminal, rect?: Readonly<{
|
|
5
6
|
x: number;
|
|
6
7
|
y: number;
|
|
@@ -21,6 +22,20 @@ export declare function collectVisibleMarkdownImageGraphicIds(rows: readonly Tui
|
|
|
21
22
|
h: number;
|
|
22
23
|
}>) => boolean;
|
|
23
24
|
}>): ReadonlySet<string>;
|
|
25
|
+
export declare function queueClippedVisibleMarkdownImageGraphics(terminal: Terminal, rows: readonly TuiMarkdownVisualRow[], options: Readonly<{
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
w: number;
|
|
29
|
+
h: number;
|
|
30
|
+
rowOffset: number;
|
|
31
|
+
clipStart: number;
|
|
32
|
+
isGraphicCovered?: (rect: Readonly<{
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
w: number;
|
|
36
|
+
h: number;
|
|
37
|
+
}>) => boolean;
|
|
38
|
+
}>): ReadonlySet<string>;
|
|
24
39
|
export declare function paintMarkdownVisualRow(terminal: Terminal, row: TuiMarkdownVisualRow | undefined, options: Readonly<{
|
|
25
40
|
x: number;
|
|
26
41
|
y: number;
|
|
@@ -29,6 +44,7 @@ export declare function paintMarkdownVisualRow(terminal: Terminal, row: TuiMarkd
|
|
|
29
44
|
baseStyle: Style;
|
|
30
45
|
clear?: boolean;
|
|
31
46
|
keepGraphicIds?: ReadonlySet<string>;
|
|
47
|
+
prequeuedGraphicIds?: ReadonlySet<string>;
|
|
32
48
|
isGraphicCovered?: (rect: Readonly<{
|
|
33
49
|
x: number;
|
|
34
50
|
y: number;
|
|
@@ -36,3 +52,4 @@ export declare function paintMarkdownVisualRow(terminal: Terminal, row: TuiMarkd
|
|
|
36
52
|
h: number;
|
|
37
53
|
}>) => boolean;
|
|
38
54
|
}>): void;
|
|
55
|
+
export {};
|