@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.
- package/README.md +18 -18
- package/dist/{TMermaidText-frVr8Ysb.js → TMermaidText-wLnMMvVS.js} +1 -1
- package/dist/{TSelect-Dx34M1pF.js → TSelect-CMBOOFwK.js} +5 -5
- package/dist/{TTree-DdAjCPHu.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 +542 -266
- package/dist/agent.js +25 -82
- package/dist/{block-source-Crro3mxi.js → block-source-DhzajB9H.js} +299 -239
- package/dist/cli.cjs +57 -16
- package/dist/cli.js +70 -15
- 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 +103 -66
- package/dist/experimental.js +20 -74
- package/dist/hyperlink-clbb_ha_.js +100 -0
- package/dist/index.js +8 -8
- package/dist/{linkify-BjI4zVfY.js → linkify-CL9wwnZN.js} +3 -3
- package/dist/markdown.cjs +521 -212
- package/dist/markdown.d.cts +3 -0
- package/dist/markdown.d.ts +3 -0
- package/dist/markdown.js +75 -8
- package/dist/math-image-BZhmfUeu.js +308 -0
- package/dist/mermaid-N3kGTHFy.js +1697 -0
- package/dist/mermaid.cjs +1460 -6
- 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 +61 -0
- package/dist/renderer-dom.js +4 -4
- package/dist/{terminal-graphics-Bbe83wSr.js → terminal-graphics-2FTRg9x3.js} +90 -2
- package/dist/{tlog-theme-i6S_Oftd.js → tlog-theme-B91Wv7Zj.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 +920 -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/theme.d.ts +12 -0
- package/dist/vue/markdown/types.d.ts +12 -2
- package/dist/vue/mermaid/beautiful-mermaid.d.ts +284 -240
- package/dist/vue/mermaid/mermaid-image.d.ts +73 -0
- package/dist/vue.js +9 -9
- package/package.json +24 -10
- 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/agent.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import { forEachTextCellSegment, recordTerminalGraphicTrace, sanitizeInlineText, sanitizeTextBlock, sliceByCells, spaces, textCellWidth$1 as textCellWidth, useTerminal, withTextWidthProvider } from "./rect-
|
|
4
|
-
import { TText, TView } from "./linkify-
|
|
1
|
+
import "./create-terminal-Db_-UGVQ.js";
|
|
2
|
+
import "./hyperlink-clbb_ha_.js";
|
|
3
|
+
import { forEachTextCellSegment, recordTerminalGraphicTrace, sanitizeInlineText, sanitizeTextBlock, sliceByCells, spaces, textCellWidth$1 as textCellWidth, useTerminal, withTextWidthProvider } from "./rect-JzWMJxxc.js";
|
|
4
|
+
import { TText, TView } from "./linkify-CL9wwnZN.js";
|
|
5
5
|
import "./frame-perf-CHpWhbC4.js";
|
|
6
6
|
import "./env-Cl8qmNFN.js";
|
|
7
7
|
import "./terminal-selection-4W1SJj4c.js";
|
|
8
8
|
import "./debug-logger-CmsGI4of.js";
|
|
9
|
-
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-
|
|
9
|
+
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-CMBOOFwK.js";
|
|
10
10
|
import "./path-mnSgEpCm.js";
|
|
11
11
|
import "./wheel-scroll-DASkEZr-.js";
|
|
12
|
-
import { TMermaid$1 as TMermaid, TMermaidText$1 as TMermaidText, isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal } from "./TMermaidText-
|
|
13
|
-
import { createIterm2InlineImageSequence, createKittyDeleteGraphicsSequence, createKittyGraphicsSequence, createKittyPlacementSequence, detectTerminalGraphicsCapabilities, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, hashTerminalGraphicsString, isSafeTerminalGraphicsSequence, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, subscribeTerminalGraphicsOutput } from "./terminal-graphics-
|
|
14
|
-
import { TVirtualMarkdown, createMarkdownBlockSource } from "./block-source-
|
|
15
|
-
import
|
|
12
|
+
import { TMermaid$1 as TMermaid, TMermaidText$1 as TMermaidText, isSimpleMermaidFlowchartSource, markMermaidRenderErrorFatal } from "./TMermaidText-wLnMMvVS.js";
|
|
13
|
+
import { createIterm2InlineImageSequence, createKittyDeleteGraphicsSequence, createKittyGraphicsSequence, createKittyPlacementSequence, createTerminalGraphicPngSequence, detectTerminalGraphicsCapabilities, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, hashTerminalGraphicsString, isSafeTerminalGraphicsSequence, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, subscribeTerminalGraphicsOutput } from "./terminal-graphics-2FTRg9x3.js";
|
|
14
|
+
import { TVirtualMarkdown, createMarkdownBlockSource } from "./block-source-DhzajB9H.js";
|
|
15
|
+
import "./math-image-BZhmfUeu.js";
|
|
16
|
+
import { TAgentTerminalGraphic, TLogLinksPanel, TLogMinimap, TLogScrollbar, TLogSearchBar, TLogSearchPager, TLogSearchResults, TLogView, TLogVirtualLinksPanel, TLogVirtualSearchResults, TTranscriptView, TVirtualList, createAppendOnlyLogStore, createTLogDensityBucketsFromMarkers, createTLogLevelPlugin, createTLogLineMatcherPlugin, createTLogLinkActionPlugin, createTLogOsc8LinkPlugin, createTLogUrlPlugin, detectTLogUrls, dispatchTLogPluginLinkAction, getTLogPluginMetadata, parseTLogAnnotatedText, resolveTLogLinksPanelTheme, resolveTLogMinimapTheme, resolveTLogScrollbarTheme, resolveTLogSearchBarTheme, resolveTLogSearchPagerTheme, resolveTLogSearchResultsTheme, resolveTLogViewTheme, stripTLogAnsiText, tlogDarkPreset, tlogDarkTheme, tlogDefaultPreset, tlogDefaultTheme, tlogHighContrastPreset, tlogHighContrastTheme, toTLogExternalLinkFromVisibleLink, useTLogLinkController, useTLogRetainedIndex, useTLogSearchController, useTLogSearchResultsPage, useTLogVirtualSearchResults } from "./tlog-theme-B91Wv7Zj.js";
|
|
16
17
|
import { computed, defineComponent, h } from "vue";
|
|
17
18
|
|
|
18
19
|
//#region src/vue/agent/view-models.ts
|
|
@@ -1176,38 +1177,6 @@ function normalizeCachedPngFrame(frame, context) {
|
|
|
1176
1177
|
sourceHeight: dimensions?.height
|
|
1177
1178
|
};
|
|
1178
1179
|
}
|
|
1179
|
-
function resolveKittyViewportPlacement(png, context) {
|
|
1180
|
-
const rect = context.viewport.rect;
|
|
1181
|
-
const full = context.viewport.fullRect;
|
|
1182
|
-
const columns = positiveInt(rect.w) ?? png.cols;
|
|
1183
|
-
const rows = positiveInt(rect.h) ?? png.rows;
|
|
1184
|
-
const sourceWidth = positiveInt(png.sourceWidth);
|
|
1185
|
-
const sourceHeight = positiveInt(png.sourceHeight);
|
|
1186
|
-
if (!sourceWidth || !sourceHeight || full.w <= 0 || full.h <= 0) return {
|
|
1187
|
-
columns,
|
|
1188
|
-
rows
|
|
1189
|
-
};
|
|
1190
|
-
const offsetX = Math.max(0, rect.x - full.x);
|
|
1191
|
-
const offsetY = Math.max(0, rect.y - full.y);
|
|
1192
|
-
const visibleW = Math.max(0, Math.min(rect.w, full.w - offsetX));
|
|
1193
|
-
const visibleH = Math.max(0, Math.min(rect.h, full.h - offsetY));
|
|
1194
|
-
if (offsetX <= 0 && offsetY <= 0 && visibleW >= full.w && visibleH >= full.h) return {
|
|
1195
|
-
columns,
|
|
1196
|
-
rows
|
|
1197
|
-
};
|
|
1198
|
-
const x0 = Math.max(0, Math.min(sourceWidth - 1, Math.floor(offsetX * sourceWidth / full.w)));
|
|
1199
|
-
const y0 = Math.max(0, Math.min(sourceHeight - 1, Math.floor(offsetY * sourceHeight / full.h)));
|
|
1200
|
-
const x1 = Math.max(x0 + 1, Math.min(sourceWidth, Math.ceil((offsetX + visibleW) * sourceWidth / full.w)));
|
|
1201
|
-
const y1 = Math.max(y0 + 1, Math.min(sourceHeight, Math.ceil((offsetY + visibleH) * sourceHeight / full.h)));
|
|
1202
|
-
return {
|
|
1203
|
-
columns,
|
|
1204
|
-
rows,
|
|
1205
|
-
sourceX: x0,
|
|
1206
|
-
sourceY: y0,
|
|
1207
|
-
sourceWidth: x1 - x0,
|
|
1208
|
-
sourceHeight: y1 - y0
|
|
1209
|
-
};
|
|
1210
|
-
}
|
|
1211
1180
|
function pngFrameBytes(frame) {
|
|
1212
1181
|
return frame.base64.length + (frame.fallback?.length ?? 0);
|
|
1213
1182
|
}
|
|
@@ -1258,54 +1227,28 @@ function createPngTerminalGraphicRenderer(options) {
|
|
|
1258
1227
|
return text == null ? {} : { fallback: text };
|
|
1259
1228
|
};
|
|
1260
1229
|
if (!png.base64) return textFallbackResult(await fallback());
|
|
1261
|
-
if (protocol === "kitty") {
|
|
1262
|
-
const
|
|
1263
|
-
const
|
|
1230
|
+
if (protocol === "kitty" || protocol === "iterm2") {
|
|
1231
|
+
const rect = context.viewport.rect;
|
|
1232
|
+
const fullRect = context.viewport.fullRect;
|
|
1233
|
+
const result = createTerminalGraphicPngSequence({
|
|
1234
|
+
protocol,
|
|
1235
|
+
base64: png.base64,
|
|
1264
1236
|
imageId: context.imageId,
|
|
1265
1237
|
placementId: context.placementId,
|
|
1266
|
-
zIndex: options.zIndex,
|
|
1267
|
-
...placement
|
|
1268
|
-
});
|
|
1269
|
-
const resizeSequence = createKittyPlacementSequence({
|
|
1270
|
-
imageId: context.imageId,
|
|
1271
|
-
placementId: context.placementId,
|
|
1272
|
-
zIndex: options.zIndex,
|
|
1273
|
-
...placement
|
|
1274
|
-
});
|
|
1275
|
-
if (!isSafeTerminalGraphicsSequence(sequence, "kitty", "draw")) return textFallbackResult(await fallback());
|
|
1276
|
-
return {
|
|
1277
|
-
type: "sequence",
|
|
1278
|
-
protocol: "kitty",
|
|
1279
|
-
sequence,
|
|
1280
|
-
resizeSequence,
|
|
1281
|
-
clearSequence: createKittyDeleteGraphicsSequence({
|
|
1282
|
-
imageId: context.imageId,
|
|
1283
|
-
placementId: context.placementId
|
|
1284
|
-
}),
|
|
1285
|
-
...await sequenceFallback(),
|
|
1286
1238
|
cols: png.cols,
|
|
1287
1239
|
rows: png.rows,
|
|
1288
1240
|
sourceWidth: png.sourceWidth,
|
|
1289
1241
|
sourceHeight: png.sourceHeight,
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
height: png.rows,
|
|
1297
|
-
preserveAspectRatio: true,
|
|
1298
|
-
doNotMoveCursor: true
|
|
1242
|
+
placementColumns: positiveInt(rect.w) ?? png.cols,
|
|
1243
|
+
placementRows: positiveInt(rect.h) ?? png.rows,
|
|
1244
|
+
rect,
|
|
1245
|
+
fullRect,
|
|
1246
|
+
zIndex: options.zIndex,
|
|
1247
|
+
fallback: await fallback()
|
|
1299
1248
|
});
|
|
1300
|
-
if (!
|
|
1301
|
-
return
|
|
1302
|
-
|
|
1303
|
-
protocol: "iterm2",
|
|
1304
|
-
sequence,
|
|
1305
|
-
...await sequenceFallback(),
|
|
1306
|
-
cols: png.cols,
|
|
1307
|
-
rows: png.rows
|
|
1308
|
-
};
|
|
1249
|
+
if (!result) return textFallbackResult(await fallback());
|
|
1250
|
+
if (!isSafeTerminalGraphicsSequence(result.sequence, protocol, "draw")) return textFallbackResult(await fallback());
|
|
1251
|
+
return result;
|
|
1309
1252
|
}
|
|
1310
1253
|
if (protocol === "sixel") {
|
|
1311
1254
|
const sixel = await queue.cached(`${key}\x1Fsixel`, context.signal, async () => {
|