@simon_he/vue-tui 1.0.2 → 1.1.1
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 +44 -26
- package/dist/TMermaidText-CXm_L969.js +885 -0
- package/dist/{TSelect-DR0FomSu.js → TSelect-CiyMvwl-.js} +60 -81
- package/dist/{TTree-kzhlB5P0.js → TTree-DKGiuIcM.js} +140 -103
- package/dist/agent/mermaid.cjs +2 -0
- package/dist/agent/mermaid.d.cts +2 -0
- package/dist/agent/mermaid.d.ts +2 -0
- package/dist/agent/mermaid.js +1 -0
- package/dist/agent.cjs +31184 -24907
- package/dist/agent.d.cts +11 -1
- package/dist/agent.d.ts +11 -1
- package/dist/agent.js +1700 -13
- package/dist/block-source-5CQp4tF8.js +3230 -0
- package/dist/cli/stdin-buffer.d.ts +1 -1
- package/dist/cli.cjs +5037 -6767
- package/dist/cli.d.cts +4 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +2733 -148
- package/dist/core/buffer/eaw-ranges-unicode-17.d.ts +14 -0
- package/dist/core/perf/instrumentation-noop.d.ts +48 -0
- package/dist/core/perf/instrumentation.d.ts +136 -0
- package/dist/core/terminal/create-terminal.d.ts +1 -0
- package/dist/core.cjs +843 -1469
- package/dist/core.js +6 -6
- package/dist/{create-terminal-DBFNYr8f.js → create-terminal-DXuZ2fci.js} +39 -13
- package/dist/debug-logger-ChY_PXVk.js +74 -0
- package/dist/{dom-renderer-BniJSQyX.js → dom-renderer-DNzmg2As.js} +2 -2
- package/dist/experimental.cjs +4115 -5928
- package/dist/experimental.d.cts +2 -0
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.js +1490 -9
- package/dist/frame-perf-BBhE-iuS.js +111 -0
- package/dist/{sgr-BmzxEjAO.js → hyperlink-B35-O-cW.js} +100 -1
- package/dist/index.cjs +5017 -10339
- package/dist/index.js +16 -14
- package/dist/{linkify-D_gzn9Xq.js → linkify-CuuquMQT.js} +32 -3
- package/dist/markdown.cjs +21295 -12691
- package/dist/markdown.d.cts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js +211 -51
- package/dist/mermaid-CWto52Wk.js +123 -0
- package/dist/mermaid.cjs +1707 -0
- package/dist/mermaid.d.cts +3 -0
- package/dist/mermaid.d.ts +3 -0
- package/dist/mermaid.js +6 -0
- package/dist/observability/frame-perf-store.d.ts +2 -1
- package/dist/observability/frame-perf.d.ts +33 -0
- package/dist/observability.cjs +106 -107
- package/dist/observability.d.cts +2 -2
- package/dist/observability.d.ts +2 -2
- package/dist/observability.js +3 -3
- package/dist/{path-suggest-BNqcuE3-.js → path-suggest-fPzRsgPv.js} +1 -1
- package/dist/{wheel-scroll-vBRaQ7p-.js → rect-Ng-3eKzF.js} +253 -117
- package/dist/renderer/cli/stdout-metrics.d.ts +10 -0
- package/dist/renderer/cli/stdout-renderer.d.ts +3 -0
- package/dist/renderer/terminal-graphic-render-queue.d.ts +50 -0
- package/dist/renderer/terminal-graphics-trace.d.ts +53 -0
- package/dist/renderer/terminal-graphics.d.ts +146 -0
- package/dist/renderer-dom.cjs +364 -903
- package/dist/renderer-dom.js +4 -4
- package/dist/runtime/index.d.ts +2 -0
- package/dist/{runtime-rfcZCyJq.js → runtime-D77C03RM.js} +28 -15
- package/dist/runtime.cjs +427 -889
- package/dist/runtime.js +2 -2
- package/dist/{terminal-selection-DBinO6p5.js → terminal-selection-CQYr--26.js} +4 -1
- package/dist/{tlog-theme-CvLFNMwk.js → tlog-theme-CopRt9SC.js} +37 -6
- package/dist/{trace-CjzYeIxN.js → trace-CYHDKM1m.js} +5 -0
- package/dist/vue/agent/create-png-terminal-graphic-renderer.d.ts +19 -0
- package/dist/vue/components/TAgentTerminalGraphic.d.ts +481 -0
- package/dist/vue/components/TCharts.d.ts +1121 -0
- package/dist/vue/components/TFeedback.d.ts +1 -1
- package/dist/vue/components/TFlex.d.ts +389 -0
- package/dist/vue/components/TForm.d.ts +4 -4
- package/dist/vue/components/TLogSearchBar.d.ts +3 -3
- package/dist/vue/components/TLogSearchPager.d.ts +2 -2
- package/dist/vue/components/TMarkdownText.d.ts +162 -4
- package/dist/vue/components/TMermaidText.d.ts +900 -0
- package/dist/vue/components/TVirtualList.d.ts +9 -0
- package/dist/vue/components/TVirtualMarkdown.d.ts +170 -9
- package/dist/vue/components/TVirtualRows.d.ts +9 -0
- package/dist/vue/components/TerminalProvider.d.ts +2 -0
- package/dist/vue/context.d.ts +24 -0
- package/dist/vue/index.d.ts +5 -0
- package/dist/vue/layout/flex.d.ts +67 -0
- package/dist/vue/markdown/ast.d.ts +5 -2
- package/dist/vue/markdown/document.d.ts +5 -0
- package/dist/vue/markdown/image-actions.d.ts +14 -0
- package/dist/vue/markdown/image.d.ts +11 -0
- package/dist/vue/markdown/link-actions.d.ts +14 -0
- package/dist/vue/markdown/math-actions.d.ts +14 -0
- package/dist/vue/markdown/math.d.ts +6 -0
- package/dist/vue/markdown/render.d.ts +28 -0
- package/dist/vue/markdown/types.d.ts +78 -0
- package/dist/vue/mermaid/beautiful-mermaid.d.ts +1436 -0
- package/dist/vue/render/render-manager.d.ts +7 -0
- package/dist/vue.cjs +7207 -12437
- package/dist/vue.js +706 -39
- package/dist/wheel-scroll-CQ22Hcyj.js +106 -0
- package/dist/{hyperlink-Bn02UXJb.js → width-GqllnV8C.js} +166 -111
- package/package.json +85 -14
- package/dist/block-source-CKUOnkgT.js +0 -1663
- package/dist/frame-perf-C6Xfg85O.js +0 -24
- /package/dist/{env-Cl8qmNFN.js → env-DNCzvX8b.js} +0 -0
- /package/dist/{path-mnSgEpCm.js → path-BI9W15Zt.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { createTerminal } from "./create-terminal-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
1
|
+
import { createTerminal } from "./create-terminal-DXuZ2fci.js";
|
|
2
|
+
import "./width-GqllnV8C.js";
|
|
3
|
+
import "./hyperlink-B35-O-cW.js";
|
|
4
4
|
import "./ansi-palette-CNXqFciC.js";
|
|
5
|
-
import { createDomRenderer } from "./dom-renderer-
|
|
6
|
-
import "./
|
|
7
|
-
import { TView, createTheme, linkifyTextSegments, tuiDefaultTheme } from "./linkify-
|
|
8
|
-
import "./runtime-
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import
|
|
12
|
-
import "./
|
|
13
|
-
import
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
5
|
+
import { createDomRenderer } from "./dom-renderer-DNzmg2As.js";
|
|
6
|
+
import "./rect-Ng-3eKzF.js";
|
|
7
|
+
import { TView, createTheme, linkifyTextSegments, tuiDefaultTheme } from "./linkify-CuuquMQT.js";
|
|
8
|
+
import "./runtime-D77C03RM.js";
|
|
9
|
+
import "./frame-perf-BBhE-iuS.js";
|
|
10
|
+
import "./trace-CYHDKM1m.js";
|
|
11
|
+
import "./env-DNCzvX8b.js";
|
|
12
|
+
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-DKGiuIcM.js";
|
|
13
|
+
import "./terminal-selection-CQYr--26.js";
|
|
14
|
+
import "./debug-logger-ChY_PXVk.js";
|
|
15
|
+
import { TBox, TCommandPalette, TDialog, TInput, TSelect, TText, computeCommandPaletteMatchRanges } from "./TSelect-CiyMvwl-.js";
|
|
16
|
+
import "./path-BI9W15Zt.js";
|
|
17
|
+
import "./wheel-scroll-CQ22Hcyj.js";
|
|
16
18
|
|
|
17
19
|
export { TAutocompleteInput, TBadge, TBox, TCheckbox, TCode, TCommandPalette, TDataTable, TDialog, TDivider, TFormField, TInput, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSelect, TSlider, TSwitch, TTable, TTag, TText, TTree, TView, TerminalProvider, computeCommandPaletteMatchRanges, createDomRenderer, createTInputHostPlugin, createTerminal, createTheme, linkifyTextSegments, tuiDefaultTheme };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sanitizeDomHref } from "./hyperlink-
|
|
2
|
-
import { EventZIndexContextKey, LayoutContextKey, RenderStackKey, injectionKey, intersectRect, translateRect, useLayout, useRenderStack, useTerminal, useTerminalNode, useVisibility } from "./
|
|
1
|
+
import { sanitizeDomHref } from "./hyperlink-B35-O-cW.js";
|
|
2
|
+
import { EventZIndexContextKey, LayoutContextKey, RenderStackKey, injectionKey, intersectRect, padEndByCells$1 as padEndByCells, sanitizeInlineText, sliceByCells, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderStack, useTerminal, useTerminalNode, useVisibility } from "./rect-Ng-3eKzF.js";
|
|
3
3
|
import { computed, defineComponent, h, inject, provide, shallowReactive, watchEffect } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/vue/theme.ts
|
|
@@ -267,6 +267,35 @@ const TView = defineComponent({
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/vue/components/simple-utils.ts
|
|
272
|
+
function clamp(n, min, max) {
|
|
273
|
+
return Math.max(min, Math.min(max, n));
|
|
274
|
+
}
|
|
275
|
+
function mergeStyle(...styles) {
|
|
276
|
+
const out = {};
|
|
277
|
+
for (const style of styles) {
|
|
278
|
+
if (!style) continue;
|
|
279
|
+
Object.assign(out, style);
|
|
280
|
+
}
|
|
281
|
+
return out;
|
|
282
|
+
}
|
|
283
|
+
function fitCellText(value, width, align = "left") {
|
|
284
|
+
const w = Math.max(0, Math.floor(width));
|
|
285
|
+
if (w <= 0) return "";
|
|
286
|
+
const text = sliceByCells(sanitizeInlineText(String(value ?? "")), w);
|
|
287
|
+
if (align === "right") {
|
|
288
|
+
const cells = textCellWidth(text);
|
|
289
|
+
return `${" ".repeat(Math.max(0, w - cells))}${text}`;
|
|
290
|
+
}
|
|
291
|
+
return padEndByCells(text, w);
|
|
292
|
+
}
|
|
293
|
+
function repeatToCells(ch, width) {
|
|
294
|
+
const w = Math.max(0, Math.floor(width));
|
|
295
|
+
if (w <= 0) return "";
|
|
296
|
+
return ch.repeat(w);
|
|
297
|
+
}
|
|
298
|
+
|
|
270
299
|
//#endregion
|
|
271
300
|
//#region src/vue/scheduler/frame-mailbox.ts
|
|
272
301
|
const EMPTY = Symbol("frame-mailbox-empty");
|
|
@@ -559,4 +588,4 @@ function linkifyTextSegments(text, options = {}) {
|
|
|
559
588
|
}
|
|
560
589
|
|
|
561
590
|
//#endregion
|
|
562
|
-
export { TView, TuiThemeContextKey, createFrameMailbox, createTheme, defaultActiveStyle, defaultDimStyle, linkifyTextSegments, tuiDefaultTheme };
|
|
591
|
+
export { TView, TuiThemeContextKey, clamp, createFrameMailbox, createTheme, defaultActiveStyle, defaultDimStyle, fitCellText, linkifyTextSegments, mergeStyle, repeatToCells, tuiDefaultTheme };
|