@simon_he/vue-tui 0.0.7 → 1.0.0-rc.0
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 +222 -444
- package/dist/TSelect-BmSkar0D.js +8697 -0
- package/dist/ansi-palette-Bv5Vqr4k.js +1499 -0
- package/dist/ansi-styles.d.ts +200 -0
- package/dist/cli/headless-renderer.d.ts +29 -0
- package/dist/cli/input.d.ts +49 -0
- package/dist/cli/node-file-writers.d.ts +12 -0
- package/dist/cli/node-module.d.ts +2 -0
- package/dist/cli/parse-kitty.d.ts +2 -0
- package/dist/cli/parse-mouse.d.ts +2 -0
- package/dist/cli/parse-utils.d.ts +14 -0
- package/dist/cli/parse-xterm.d.ts +2 -0
- package/dist/cli/path-provider-types.d.ts +1 -0
- package/dist/cli/path-provider.d.ts +4 -0
- package/dist/cli/path-suggest-core.d.ts +1 -0
- package/dist/cli/path-suggest.d.ts +15 -0
- package/dist/cli/recording.d.ts +4 -0
- package/dist/cli/stdin-buffer.d.ts +33 -0
- package/dist/cli.cjs +10664 -0
- package/dist/cli.d.cts +22 -0
- package/dist/cli.d.ts +22 -0
- package/dist/cli.js +9521 -0
- package/dist/core/ansi/capability.d.ts +20 -0
- package/dist/core/ansi/colors.d.ts +41 -0
- package/dist/core/ansi/sgr.d.ts +7 -0
- package/dist/core/ansi/theme.d.ts +6 -0
- package/dist/core/ansi-palette.d.ts +14 -0
- package/dist/core/buffer/buffer.d.ts +54 -0
- package/dist/core/buffer/width.d.ts +4 -0
- package/dist/core/debug-logger.d.ts +18 -0
- package/dist/core/hyperlink.d.ts +9 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/path-provider-types.d.ts +24 -0
- package/dist/core/path-suggest.d.ts +35 -0
- package/dist/core/render-plane.d.ts +3 -0
- package/dist/core/terminal/create-terminal.d.ts +7 -0
- package/dist/core/terminal/emitter.d.ts +7 -0
- package/dist/core/types.d.ts +107 -0
- package/dist/core.cjs +3072 -0
- package/dist/core.d.cts +14 -0
- package/dist/core.d.ts +14 -0
- package/dist/core.js +422 -0
- package/dist/create-terminal-app.d.ts +34 -0
- package/dist/dom-renderer-CDVQIcIL.js +1172 -0
- package/dist/events/index.d.ts +6 -0
- package/dist/events/manager/cli-event-manager.d.ts +22 -0
- package/dist/events/manager/event-manager.d.ts +30 -0
- package/dist/events/manager/selection-suppression.d.ts +3 -0
- package/dist/events/manager/types.d.ts +108 -0
- package/dist/events/recording.d.ts +44 -0
- package/dist/experimental.cjs +9380 -0
- package/dist/experimental.d.cts +39 -0
- package/dist/experimental.d.ts +39 -0
- package/dist/experimental.js +7624 -0
- package/dist/frame-perf-C-w8mjJL.js +98 -0
- package/dist/hyperlink-B5PD7a3Q.js +331 -0
- package/dist/index.cjs +12037 -16507
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -1353
- package/dist/index.js +13 -18738
- package/dist/markdown.cjs +21929 -0
- package/dist/markdown.d.cts +10 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.js +1649 -0
- package/dist/observability/cli-latency-node.d.ts +3 -0
- package/dist/observability/cli-latency-types.d.ts +41 -0
- package/dist/observability/cli-latency.d.ts +3 -0
- package/dist/observability/frame-perf-store.d.ts +13 -0
- package/dist/observability/frame-perf.d.ts +40 -0
- package/dist/observability/trace.d.ts +40 -0
- package/dist/observability/tui-profiler.d.ts +33 -0
- package/dist/observability.cjs +99 -0
- package/dist/observability.d.cts +6 -0
- package/dist/observability.d.ts +6 -0
- package/dist/observability.js +3 -0
- package/dist/path-DDiSCXrQ.js +99 -0
- package/dist/path-suggest-0Q2BDsuj.js +274 -0
- package/dist/path-suggest-Dk9TRLh5.js +3 -0
- package/dist/{path-suggest-CZQYJIIg.js → path-suggest-bvR9SY6Q.js} +86 -18
- package/dist/renderer/capabilities.d.ts +13 -0
- package/dist/renderer/cli/index.d.ts +2 -0
- package/dist/renderer/cli/stdout-metrics.d.ts +18 -0
- package/dist/renderer/cli/stdout-renderer.d.ts +48 -0
- package/dist/renderer/dom/dom-renderer.d.ts +157 -0
- package/dist/renderer/dom/index.d.ts +2 -0
- package/dist/renderer/index.d.ts +2 -0
- package/dist/renderer-dom.cjs +1511 -0
- package/dist/renderer-dom.d.cts +4 -0
- package/dist/renderer-dom.d.ts +4 -0
- package/dist/renderer-dom.js +6 -0
- package/dist/runtime/index.d.ts +36 -0
- package/dist/runtime/osc52.d.ts +9 -0
- package/dist/runtime-DtrcQidD.js +1197 -0
- package/dist/runtime.cjs +1697 -0
- package/dist/runtime.d.cts +9 -0
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.js +4 -0
- package/dist/selection/terminal-selection.d.ts +122 -0
- package/dist/sgr-DMK2AvuT.js +304 -0
- package/dist/style-cache-i0ZABZRq.js +178 -0
- package/dist/terminal-selection-BCOh9jsL.js +329 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/newlines.d.ts +1 -0
- package/dist/utils/path.d.ts +7 -0
- package/dist/utils/url-safety.d.ts +2 -0
- package/dist/vue/components/TAnchor.d.ts +108 -0
- package/dist/vue/components/TBox.d.ts +144 -0
- package/dist/vue/components/TDebugOverlay.d.ts +43 -0
- package/dist/vue/components/TDialog.d.ts +256 -0
- package/dist/vue/components/TFlow.d.ts +85 -0
- package/dist/vue/components/TInput.d.ts +554 -0
- package/dist/vue/components/TInputBox.d.ts +158 -0
- package/dist/vue/components/TJsonEditor.d.ts +165 -0
- package/dist/vue/components/TList.d.ts +119 -0
- package/dist/vue/components/TLogLinksPanel.d.ts +238 -0
- package/dist/vue/components/TLogMinimap.d.ts +263 -0
- package/dist/vue/components/TLogScrollbar.d.ts +236 -0
- package/dist/vue/components/TLogSearchBar.d.ts +267 -0
- package/dist/vue/components/TLogSearchPager.d.ts +162 -0
- package/dist/vue/components/TLogSearchResults.d.ts +200 -0
- package/dist/vue/components/TLogView.d.ts +502 -0
- package/dist/vue/components/TLogVirtualLinksPanel.d.ts +141 -0
- package/dist/vue/components/TLogVirtualSearchResults.d.ts +146 -0
- package/dist/vue/components/TMarkdownText.d.ts +134 -0
- package/dist/vue/components/TMultilineModal.d.ts +62 -0
- package/dist/vue/components/TPathPicker.d.ts +213 -0
- package/dist/vue/components/TRenderLayer.d.ts +16 -0
- package/dist/vue/components/TRenderPlane.d.ts +17 -0
- package/dist/vue/components/TSelect.d.ts +215 -0
- package/dist/vue/components/TText.d.ts +116 -0
- package/dist/vue/components/TTransition.d.ts +83 -0
- package/dist/vue/components/TView.d.ts +127 -0
- package/dist/vue/components/TVirtualList.d.ts +182 -0
- package/dist/vue/components/TVirtualMarkdown.d.ts +168 -0
- package/dist/vue/components/TerminalProvider.d.ts +195 -0
- package/dist/vue/components/input/host.d.ts +17 -0
- package/dist/vue/components/input/plugins/hostPlugin.d.ts +7 -0
- package/dist/vue/components/input/plugins/hostPlugin.node.d.ts +15 -0
- package/dist/vue/components/input/plugins/mentionUtils.d.ts +17 -0
- package/dist/vue/components/input/plugins/nodeMentionPathProvider.d.ts +2 -0
- package/dist/vue/components/input/plugins/promptMentionPlugin.d.ts +8 -0
- package/dist/vue/components/input/plugins/promptMentionState.d.ts +98 -0
- package/dist/vue/components/input/plugins/restrictText.d.ts +27 -0
- package/dist/vue/components/input/plugins/types.d.ts +90 -0
- package/dist/vue/components/input/utils/inlineText.d.ts +57 -0
- package/dist/vue/components/input/utils/inlineTextTokens.d.ts +34 -0
- package/dist/vue/components/input/utils/primitives.d.ts +3 -0
- package/dist/vue/components/input/utils/wordNavigation.d.ts +6 -0
- package/dist/vue/components/list/list-geometry.d.ts +16 -0
- package/dist/vue/components/list/list-paint.d.ts +1 -0
- package/dist/vue/components/list/scroll-state.d.ts +25 -0
- package/dist/vue/components/list/selection-state.d.ts +6 -0
- package/dist/vue/components/terminal-provider/copy-toast.d.ts +6 -0
- package/dist/vue/components/terminal-provider/portals.d.ts +17 -0
- package/dist/vue/components/terminal-provider/scheduler.d.ts +29 -0
- package/dist/vue/components/terminal-provider/selection-config.d.ts +15 -0
- package/dist/vue/components/terminal-provider/utils.d.ts +5 -0
- package/dist/vue/composables/use-layout.d.ts +2 -0
- package/dist/vue/composables/use-render-node.d.ts +19 -0
- package/dist/vue/composables/use-render-stack.d.ts +3 -0
- package/dist/vue/composables/use-runtime.d.ts +5 -0
- package/dist/vue/composables/use-terminal-node.d.ts +14 -0
- package/dist/vue/composables/use-terminal.d.ts +2 -0
- package/dist/vue/composables/use-visibility.d.ts +12 -0
- package/dist/vue/context.d.ts +153 -0
- package/dist/vue/index.d.ts +39 -0
- package/dist/vue/injection-key.d.ts +2 -0
- package/dist/vue/log/append-only-log-store.d.ts +2 -0
- package/dist/vue/log/tlog-keymap.d.ts +28 -0
- package/dist/vue/log/tlog-plugins.d.ts +144 -0
- package/dist/vue/log/tlog-session.d.ts +81 -0
- package/dist/vue/log/tlog-theme.d.ts +68 -0
- package/dist/vue/log/types.d.ts +43 -0
- package/dist/vue/log/use-tlog-link-controller.d.ts +31 -0
- package/dist/vue/log/use-tlog-retained-index.d.ts +26 -0
- package/dist/vue/log/use-tlog-search-controller.d.ts +51 -0
- package/dist/vue/log/use-tlog-search-results-page.d.ts +31 -0
- package/dist/vue/log/use-tlog-virtual-search-results.d.ts +22 -0
- package/dist/vue/markdown/ast.d.ts +3 -0
- package/dist/vue/markdown/block-source.d.ts +22 -0
- package/dist/vue/markdown/document.d.ts +18 -0
- package/dist/vue/markdown/layout.d.ts +16 -0
- package/dist/vue/markdown/parser.d.ts +11 -0
- package/dist/vue/markdown/render.d.ts +10 -0
- package/dist/vue/markdown/theme.d.ts +186 -0
- package/dist/vue/markdown/types.d.ts +47 -0
- package/dist/vue/render/context.d.ts +3 -0
- package/dist/vue/render/render-manager.d.ts +94 -0
- package/dist/vue/router/RouterView.d.ts +25 -0
- package/dist/vue/router/composables.d.ts +4 -0
- package/dist/vue/router/context.d.ts +4 -0
- package/dist/vue/router/router.d.ts +7 -0
- package/dist/vue/router/types.d.ts +29 -0
- package/dist/vue/scheduler/frame-mailbox.d.ts +55 -0
- package/dist/vue/scheduler/frame-scheduler.d.ts +51 -0
- package/dist/vue/utils/frame-task.d.ts +6 -0
- package/dist/vue/utils/rect.d.ts +4 -0
- package/dist/vue/utils/style-cache.d.ts +3 -0
- package/dist/vue/utils/text.d.ts +26 -0
- package/dist/vue/utils/wheel-scroll.d.ts +18 -0
- package/dist/vue.cjs +18882 -0
- package/dist/vue.d.cts +3 -0
- package/dist/vue.d.ts +3 -0
- package/dist/vue.js +3066 -0
- package/dist/wheel-scroll-B-WlFuNB.js +819 -0
- package/package.json +226 -58
- package/dist/path-suggest-DIMby3r0.js +0 -3
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { Component, InjectionKey, Ref, ShallowRef } from "vue";
|
|
2
|
+
import type { PathPickerProvider } from "../core/path-provider-types.js";
|
|
3
|
+
import type { TerminalRenderPlane } from "../core/render-plane.js";
|
|
4
|
+
import type { WidthProvider } from "../core/buffer/width.js";
|
|
5
|
+
import type { Style, Terminal } from "../core/types.js";
|
|
6
|
+
import type { EventManager } from "../events/manager/event-manager.js";
|
|
7
|
+
import type { Rect } from "../events/manager/types.js";
|
|
8
|
+
import type { SelectionTextProvider, TerminalSelectionCopyPayload, TerminalSelectionRefreshOptions } from "../selection/terminal-selection.js";
|
|
9
|
+
import type { RendererCapabilities, TerminalRendererLike } from "../renderer/capabilities.js";
|
|
10
|
+
import type { TraceStore } from "../observability/trace.js";
|
|
11
|
+
import type { FramePerfReason } from "../observability/frame-perf.js";
|
|
12
|
+
import type { FramePerfStore } from "../observability/frame-perf-store.js";
|
|
13
|
+
import type { RenderManager } from "./render/render-manager.js";
|
|
14
|
+
export interface LayoutContext {
|
|
15
|
+
originX: number;
|
|
16
|
+
originY: number;
|
|
17
|
+
clipRect: Rect | null;
|
|
18
|
+
}
|
|
19
|
+
export type TerminalSchedulerPriority = "high" | "normal" | "low";
|
|
20
|
+
export type TerminalSchedulerInvalidateOptions = Readonly<{
|
|
21
|
+
priority?: TerminalSchedulerPriority;
|
|
22
|
+
plane?: TerminalRenderPlane;
|
|
23
|
+
reason?: FramePerfReason;
|
|
24
|
+
}>;
|
|
25
|
+
export type TerminalFrameTaskPriority = "high" | "normal" | "low";
|
|
26
|
+
export type TerminalFrameContext = Readonly<{
|
|
27
|
+
frameId: number;
|
|
28
|
+
startedAt: number;
|
|
29
|
+
now: () => number;
|
|
30
|
+
budgetMs: number;
|
|
31
|
+
remainingMs: () => number;
|
|
32
|
+
requestMore: () => void;
|
|
33
|
+
invalidate: (options?: TerminalSchedulerInvalidateOptions) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Internal scheduler metric hook used by frame tasks/mailboxes to report
|
|
36
|
+
* dropped producer updates that were intentionally coalesced before paint.
|
|
37
|
+
*
|
|
38
|
+
* Compatibility note:
|
|
39
|
+
* TerminalFrameContext is an exported type, so additions here are public.
|
|
40
|
+
*/
|
|
41
|
+
reportDroppedUpdates?: (count: number) => void;
|
|
42
|
+
reportMailboxDeliveryAttempt?: (attempt: {
|
|
43
|
+
id: string;
|
|
44
|
+
queued: number;
|
|
45
|
+
dropped: number;
|
|
46
|
+
}) => void;
|
|
47
|
+
}>;
|
|
48
|
+
export type TerminalFrameTask = Readonly<{
|
|
49
|
+
id?: string;
|
|
50
|
+
reason?: FramePerfReason;
|
|
51
|
+
priority?: TerminalFrameTaskPriority;
|
|
52
|
+
sync?: boolean;
|
|
53
|
+
run: (ctx: TerminalFrameContext) => void;
|
|
54
|
+
}>;
|
|
55
|
+
export type TerminalSchedulerConfig = Readonly<{
|
|
56
|
+
targetFps?: number;
|
|
57
|
+
maxFps?: number;
|
|
58
|
+
frameBudgetMs?: number;
|
|
59
|
+
}>;
|
|
60
|
+
export type TerminalScheduler = Readonly<{
|
|
61
|
+
invalidate: (options?: TerminalSchedulerInvalidateOptions) => void;
|
|
62
|
+
flush: () => void;
|
|
63
|
+
/**
|
|
64
|
+
* Flushes render-manager work and requests a sync terminal commit immediately.
|
|
65
|
+
* DOM row updates may still defer to rAF when they exceed the renderer sync budget.
|
|
66
|
+
*/
|
|
67
|
+
flushNow: () => void;
|
|
68
|
+
configure: (options: TerminalSchedulerConfig) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Queues a frame task for the next scheduler frame.
|
|
71
|
+
* false means the scheduler explicitly rejected the task; producers must clear
|
|
72
|
+
* local pending state. true or undefined means accepted so legacy schedulers
|
|
73
|
+
* that do not return a value remain valid.
|
|
74
|
+
*/
|
|
75
|
+
queueFrameTask: (task: TerminalFrameTask) => boolean | void;
|
|
76
|
+
/**
|
|
77
|
+
* Best-effort cancellation for a pending id task.
|
|
78
|
+
* If the scheduler has already taken the task for the current frame,
|
|
79
|
+
* the task run() still needs to guard its own stale state.
|
|
80
|
+
*/
|
|
81
|
+
cancelFrameTask?: (id: string) => boolean | void;
|
|
82
|
+
requestLive: (reason: string) => () => void;
|
|
83
|
+
dropLive: (reason: string) => void;
|
|
84
|
+
isInsideFrame: () => boolean;
|
|
85
|
+
}>;
|
|
86
|
+
export type TerminalRuntimeHandle = Readonly<{
|
|
87
|
+
update: (props: Record<string, unknown>) => void;
|
|
88
|
+
move: (x: number, y: number) => void;
|
|
89
|
+
unmount: () => void;
|
|
90
|
+
}>;
|
|
91
|
+
export type TerminalRuntime = Readonly<{
|
|
92
|
+
mount: (component: Component, props: Record<string, unknown>, options?: Readonly<{
|
|
93
|
+
plane?: TerminalRenderPlane;
|
|
94
|
+
}>) => TerminalRuntimeHandle;
|
|
95
|
+
}>;
|
|
96
|
+
export type TerminalSelectionContext = Readonly<{
|
|
97
|
+
registerTextProvider: (provider: SelectionTextProvider) => () => void;
|
|
98
|
+
onCopy: (handler: (payload: TerminalSelectionCopyPayload) => void) => () => void;
|
|
99
|
+
refresh: (options?: TerminalSelectionRefreshOptions) => void;
|
|
100
|
+
clear: () => void;
|
|
101
|
+
}>;
|
|
102
|
+
export type ImeAnchor = Readonly<{
|
|
103
|
+
cellX: number;
|
|
104
|
+
cellY: number;
|
|
105
|
+
ownerId?: string;
|
|
106
|
+
}>;
|
|
107
|
+
export type TerminalContext = Readonly<{
|
|
108
|
+
terminal: Terminal;
|
|
109
|
+
renderer: Ref<TerminalRendererLike | null>;
|
|
110
|
+
rendererCapabilities: Ref<RendererCapabilities>;
|
|
111
|
+
events: Ref<EventManager | null>;
|
|
112
|
+
scheduler: TerminalScheduler;
|
|
113
|
+
runtime: TerminalRuntime;
|
|
114
|
+
observability: Readonly<{
|
|
115
|
+
trace: TraceStore;
|
|
116
|
+
framePerf: FramePerfStore;
|
|
117
|
+
}>;
|
|
118
|
+
selection: TerminalSelectionContext;
|
|
119
|
+
defaultStyle: Ref<Style>;
|
|
120
|
+
widthProvider: WidthProvider;
|
|
121
|
+
render: RenderManager;
|
|
122
|
+
}>;
|
|
123
|
+
export declare const TerminalContextKey: InjectionKey<Readonly<{
|
|
124
|
+
terminal: Terminal;
|
|
125
|
+
renderer: Ref<TerminalRendererLike | null>;
|
|
126
|
+
rendererCapabilities: Ref<RendererCapabilities>;
|
|
127
|
+
events: Ref<EventManager | null>;
|
|
128
|
+
scheduler: TerminalScheduler;
|
|
129
|
+
runtime: TerminalRuntime;
|
|
130
|
+
observability: Readonly<{
|
|
131
|
+
trace: TraceStore;
|
|
132
|
+
framePerf: FramePerfStore;
|
|
133
|
+
}>;
|
|
134
|
+
selection: TerminalSelectionContext;
|
|
135
|
+
defaultStyle: Ref<Style>;
|
|
136
|
+
widthProvider: WidthProvider;
|
|
137
|
+
render: RenderManager;
|
|
138
|
+
}>>;
|
|
139
|
+
export declare const LayoutContextKey: InjectionKey<LayoutContext>;
|
|
140
|
+
export declare const VisibilityContextKey: InjectionKey<Ref<boolean>>;
|
|
141
|
+
export declare const EventZIndexContextKey: InjectionKey<Ref<number>>;
|
|
142
|
+
export declare const RenderPlaneContextKey: InjectionKey<Ref<"default" | "transcript" | "chrome" | "overlay">>;
|
|
143
|
+
export declare const ImeAnchorContextKey: InjectionKey<ShallowRef<Readonly<{
|
|
144
|
+
cellX: number;
|
|
145
|
+
cellY: number;
|
|
146
|
+
ownerId?: string;
|
|
147
|
+
}> | null>>;
|
|
148
|
+
export declare const TInputPluginsContextKey: InjectionKey<Readonly<Ref<readonly Readonly<{
|
|
149
|
+
name: string;
|
|
150
|
+
install: (ctx: import("./index.js").TInputPluginContext) => void;
|
|
151
|
+
}>[]>>>;
|
|
152
|
+
export declare const TPathPickerProviderContextKey: InjectionKey<Readonly<Ref<PathPickerProvider | undefined>>>;
|
|
153
|
+
export declare const DialogContextKey: InjectionKey<boolean>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type { TInputHostAdapter } from "./components/input/host.js";
|
|
2
|
+
export { createTInputHostPlugin } from "./components/input/plugins/hostPlugin.js";
|
|
3
|
+
export { createPromptMentionPlugin } from "./components/input/plugins/promptMentionPlugin.js";
|
|
4
|
+
export type { MentionPathProvider, MentionSuggestionProvider, PromptMentionPluginOptions, } from "./components/input/plugins/promptMentionPlugin.js";
|
|
5
|
+
export { createTextRestrictionPlugin } from "./components/input/plugins/restrictText.js";
|
|
6
|
+
export type { PromptSuggestion, TInputPlugin, TInputPluginContext, } from "./components/input/plugins/types.js";
|
|
7
|
+
export { TAnchor } from "./components/TAnchor.js";
|
|
8
|
+
export { TBox } from "./components/TBox.js";
|
|
9
|
+
export { TDebugOverlay } from "./components/TDebugOverlay.js";
|
|
10
|
+
export { TDialog } from "./components/TDialog.js";
|
|
11
|
+
export type { TerminalProviderSelectionConfig, TerminalProviderSelectionOptions, } from "./components/TerminalProvider.js";
|
|
12
|
+
export { TerminalProvider } from "./components/TerminalProvider.js";
|
|
13
|
+
export { TFlow } from "./components/TFlow.js";
|
|
14
|
+
export { TInput } from "./components/TInput.js";
|
|
15
|
+
export { TInputBox } from "./components/TInputBox.js";
|
|
16
|
+
export { lintJsonText, TJsonEditor } from "./components/TJsonEditor.js";
|
|
17
|
+
export { TList } from "./components/TList.js";
|
|
18
|
+
export { TMultilineModal } from "./components/TMultilineModal.js";
|
|
19
|
+
export { TPathPicker } from "./components/TPathPicker.js";
|
|
20
|
+
export { TRenderLayer } from "./components/TRenderLayer.js";
|
|
21
|
+
export { TRenderPlane } from "./components/TRenderPlane.js";
|
|
22
|
+
export { TSelect } from "./components/TSelect.js";
|
|
23
|
+
export type { SelectOption, TSelectMultipleChangePayload, TSelectMultipleEmitMode, } from "./components/TSelect.js";
|
|
24
|
+
export { TText } from "./components/TText.js";
|
|
25
|
+
export { TTransition } from "./components/TTransition.js";
|
|
26
|
+
export { TView } from "./components/TView.js";
|
|
27
|
+
export { useLayout } from "./composables/use-layout.js";
|
|
28
|
+
export { useRenderNode } from "./composables/use-render-node.js";
|
|
29
|
+
export { useTerminalRuntime } from "./composables/use-runtime.js";
|
|
30
|
+
export { useTerminalNode } from "./composables/use-terminal-node.js";
|
|
31
|
+
export { useTerminal } from "./composables/use-terminal.js";
|
|
32
|
+
export { useVisibility } from "./composables/use-visibility.js";
|
|
33
|
+
export type { TuiMarkdownTheme, TuiMarkdownThemeOverrides } from "./markdown/theme.js";
|
|
34
|
+
export type { LayoutContext, TerminalFrameContext, TerminalFrameTask, TerminalFrameTaskPriority, TerminalContext, TerminalSelectionContext, TerminalRuntime, TerminalRuntimeHandle, TerminalScheduler, TerminalSchedulerConfig, TerminalSchedulerInvalidateOptions, } from "./context.js";
|
|
35
|
+
export { TInputPluginsContextKey } from "./context.js";
|
|
36
|
+
export { useRoute, useRouter } from "./router/composables.js";
|
|
37
|
+
export { createTerminalRouter } from "./router/router.js";
|
|
38
|
+
export { TRouterView } from "./router/RouterView.js";
|
|
39
|
+
export type { TerminalRoute, TerminalRouteLocationRaw, TerminalRouter, TerminalRouteRecord, } from "./router/types.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type TLogKeymap = Readonly<{
|
|
2
|
+
searchNext?: readonly string[];
|
|
3
|
+
searchPrevious?: readonly string[];
|
|
4
|
+
clearSearch?: readonly string[];
|
|
5
|
+
nextLink?: readonly string[];
|
|
6
|
+
previousLink?: readonly string[];
|
|
7
|
+
activateLink?: readonly string[];
|
|
8
|
+
}>;
|
|
9
|
+
type KeyboardLike = Readonly<{
|
|
10
|
+
key: string;
|
|
11
|
+
ctrlKey?: boolean;
|
|
12
|
+
metaKey?: boolean;
|
|
13
|
+
altKey?: boolean;
|
|
14
|
+
shiftKey?: boolean;
|
|
15
|
+
preventDefault?: () => void;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const tlogDefaultKeymap: TLogKeymap;
|
|
18
|
+
export declare const tlogHighContrastKeymap: TLogKeymap;
|
|
19
|
+
export declare function matchesTLogKeyBinding(event: KeyboardLike, bindings: readonly string[] | undefined): boolean;
|
|
20
|
+
export declare function handleTLogKeymapEvent(event: KeyboardLike, keymap: TLogKeymap, actions: Readonly<{
|
|
21
|
+
searchNext?: () => void;
|
|
22
|
+
searchPrevious?: () => void;
|
|
23
|
+
clearSearch?: () => void;
|
|
24
|
+
nextLink?: () => boolean;
|
|
25
|
+
previousLink?: () => boolean;
|
|
26
|
+
activateLink?: () => boolean;
|
|
27
|
+
}>): boolean;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { Style } from "../../core/types.js";
|
|
2
|
+
import type { TLogMinimapDensityBucket } from "../components/TLogMinimap.js";
|
|
3
|
+
import type { TLogViewVisibleLink } from "../components/TLogView.js";
|
|
4
|
+
import type { TLogLinkAction } from "./use-tlog-link-controller.js";
|
|
5
|
+
export type TLogPluginSeverity = "error" | "warning" | "info";
|
|
6
|
+
export type TLogPluginLinkSource = "osc8" | "url" | "plugin";
|
|
7
|
+
export type TLogPluginVisualSegment = Readonly<{
|
|
8
|
+
text: string;
|
|
9
|
+
cells: number;
|
|
10
|
+
style?: Style;
|
|
11
|
+
href?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type TLogViewExternalLink = Readonly<{
|
|
14
|
+
id: string;
|
|
15
|
+
href: string;
|
|
16
|
+
text: string;
|
|
17
|
+
absoluteLineIndex: number;
|
|
18
|
+
lineIndex: number;
|
|
19
|
+
startCell: number;
|
|
20
|
+
endCell: number;
|
|
21
|
+
source: TLogPluginLinkSource;
|
|
22
|
+
pluginName?: string;
|
|
23
|
+
data?: unknown;
|
|
24
|
+
}>;
|
|
25
|
+
export type TLogViewExternalMarker = Readonly<{
|
|
26
|
+
id: string;
|
|
27
|
+
absoluteLineIndex: number;
|
|
28
|
+
lineIndex: number;
|
|
29
|
+
visualRow: number;
|
|
30
|
+
estimated?: boolean;
|
|
31
|
+
current?: boolean;
|
|
32
|
+
label?: string;
|
|
33
|
+
severity?: TLogPluginSeverity;
|
|
34
|
+
source: string;
|
|
35
|
+
data?: unknown;
|
|
36
|
+
}>;
|
|
37
|
+
export type TLogViewPluginLineMarker = Readonly<{
|
|
38
|
+
id?: string | number;
|
|
39
|
+
label?: string;
|
|
40
|
+
severity?: TLogPluginSeverity;
|
|
41
|
+
estimated?: boolean;
|
|
42
|
+
data?: unknown;
|
|
43
|
+
}>;
|
|
44
|
+
export type TLogViewPluginLineLink = Readonly<{
|
|
45
|
+
id?: string | number;
|
|
46
|
+
href: string;
|
|
47
|
+
text: string;
|
|
48
|
+
startCell: number;
|
|
49
|
+
endCell: number;
|
|
50
|
+
source?: TLogPluginLinkSource;
|
|
51
|
+
data?: unknown;
|
|
52
|
+
}>;
|
|
53
|
+
export type TLogViewPluginLineMetadata = Readonly<{
|
|
54
|
+
level?: TLogPluginSeverity;
|
|
55
|
+
markers?: readonly TLogViewPluginLineMarker[];
|
|
56
|
+
externalLinks?: readonly TLogViewPluginLineLink[];
|
|
57
|
+
data?: unknown;
|
|
58
|
+
}>;
|
|
59
|
+
export type TLogParsedOsc8Link = Readonly<{
|
|
60
|
+
href: string;
|
|
61
|
+
text: string;
|
|
62
|
+
startCell: number;
|
|
63
|
+
endCell: number;
|
|
64
|
+
}>;
|
|
65
|
+
export type TLogViewPluginParseLineContext = Readonly<{
|
|
66
|
+
lineIndex: number;
|
|
67
|
+
absoluteLineIndex: number;
|
|
68
|
+
lineKey: string | number;
|
|
69
|
+
text: string;
|
|
70
|
+
plainText: string;
|
|
71
|
+
osc8Links: readonly TLogParsedOsc8Link[];
|
|
72
|
+
}>;
|
|
73
|
+
export type TLogViewPluginDecorateSegmentsContext = Readonly<{
|
|
74
|
+
lineIndex: number;
|
|
75
|
+
absoluteLineIndex: number;
|
|
76
|
+
text: string;
|
|
77
|
+
plainText: string;
|
|
78
|
+
metadata: TLogViewPluginLineMetadata | null;
|
|
79
|
+
segments: readonly TLogPluginVisualSegment[];
|
|
80
|
+
}>;
|
|
81
|
+
export type TLogViewPluginIndexedLine = Readonly<{
|
|
82
|
+
lineIndex: number;
|
|
83
|
+
absoluteLineIndex: number;
|
|
84
|
+
lineKey: string | number;
|
|
85
|
+
text: string;
|
|
86
|
+
plainText: string;
|
|
87
|
+
osc8Links: readonly TLogParsedOsc8Link[];
|
|
88
|
+
externalLinks: readonly TLogViewExternalLink[];
|
|
89
|
+
results: readonly Readonly<{
|
|
90
|
+
pluginName: string;
|
|
91
|
+
metadata: TLogViewPluginLineMetadata;
|
|
92
|
+
}>[];
|
|
93
|
+
}>;
|
|
94
|
+
export type TLogViewPluginMarkerContext = Readonly<{
|
|
95
|
+
lines: readonly TLogViewPluginIndexedLine[];
|
|
96
|
+
currentMatchLineIndex: number | null;
|
|
97
|
+
totalVisualRows: number;
|
|
98
|
+
estimateVisualRow: (lineIndex: number) => number;
|
|
99
|
+
getMetadata: (line: TLogViewPluginIndexedLine, pluginName: string) => TLogViewPluginLineMetadata | null;
|
|
100
|
+
}>;
|
|
101
|
+
export type TLogViewPluginDensityContext = TLogViewPluginMarkerContext;
|
|
102
|
+
export type TLogViewPlugin = Readonly<{
|
|
103
|
+
name: string;
|
|
104
|
+
parseLine?: (ctx: TLogViewPluginParseLineContext) => TLogViewPluginLineMetadata | void;
|
|
105
|
+
decorateSegments?: (ctx: TLogViewPluginDecorateSegmentsContext) => readonly TLogPluginVisualSegment[] | void;
|
|
106
|
+
getMarkers?: (ctx: TLogViewPluginMarkerContext) => readonly TLogViewExternalMarker[] | void;
|
|
107
|
+
getDensityBuckets?: (ctx: TLogViewPluginDensityContext) => readonly TLogMinimapDensityBucket[] | void;
|
|
108
|
+
onLinkAction?: (action: TLogLinkAction) => void;
|
|
109
|
+
}>;
|
|
110
|
+
export type TLogLevelPluginOptions = Readonly<{
|
|
111
|
+
errorPattern?: RegExp;
|
|
112
|
+
warningPattern?: RegExp;
|
|
113
|
+
infoPattern?: RegExp;
|
|
114
|
+
includeInfo?: boolean;
|
|
115
|
+
bucketCount?: number;
|
|
116
|
+
}>;
|
|
117
|
+
export type TLogUrlPluginOptions = Readonly<{
|
|
118
|
+
pattern?: RegExp;
|
|
119
|
+
allowFileUrls?: boolean;
|
|
120
|
+
}>;
|
|
121
|
+
export declare function stripTLogAnsiText(text: string): string;
|
|
122
|
+
export declare function parseTLogAnnotatedText(text: string): Readonly<{
|
|
123
|
+
plainText: string;
|
|
124
|
+
osc8Links: readonly TLogParsedOsc8Link[];
|
|
125
|
+
}>;
|
|
126
|
+
export declare function detectTLogUrls(text: string, options?: TLogUrlPluginOptions): readonly TLogViewPluginLineLink[];
|
|
127
|
+
export declare function detectTLogLevel(text: string, options?: TLogLevelPluginOptions): TLogPluginSeverity | null;
|
|
128
|
+
export declare function createTLogDensityBucketsFromMarkers(markers: readonly TLogViewExternalMarker[], totalVisualRows: number, bucketCount?: number): readonly TLogMinimapDensityBucket[];
|
|
129
|
+
export declare function getTLogPluginMetadata(line: TLogViewPluginIndexedLine, pluginName: string): TLogViewPluginLineMetadata | null;
|
|
130
|
+
export declare function dispatchTLogPluginLinkAction(plugins: readonly TLogViewPlugin[] | undefined, action: TLogLinkAction): void;
|
|
131
|
+
export declare function createTLogLevelPlugin(options?: TLogLevelPluginOptions): TLogViewPlugin;
|
|
132
|
+
export declare function createTLogOsc8LinkPlugin(): TLogViewPlugin;
|
|
133
|
+
export declare function createTLogUrlPlugin(options?: TLogUrlPluginOptions): TLogViewPlugin;
|
|
134
|
+
export declare function createTLogLinkActionPlugin(options: {
|
|
135
|
+
name: string;
|
|
136
|
+
onAction: (action: TLogLinkAction) => void;
|
|
137
|
+
}): TLogViewPlugin;
|
|
138
|
+
export declare function toTLogExternalLinkFromVisibleLink(link: Pick<TLogViewVisibleLink, "href" | "text" | "absoluteLineIndex" | "index" | "startCell" | "endCell">, idPrefix?: string): TLogViewExternalLink;
|
|
139
|
+
export declare function createTLogLineMatcherPlugin(options: {
|
|
140
|
+
name: string;
|
|
141
|
+
pattern: RegExp | string;
|
|
142
|
+
severity?: TLogPluginSeverity;
|
|
143
|
+
label?: string;
|
|
144
|
+
}): TLogViewPlugin;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import type { TLogViewHandle } from "../components/TLogView.js";
|
|
3
|
+
import type { TLogSavedSearch } from "./use-tlog-search-controller.js";
|
|
4
|
+
export type StorageLike = Readonly<{
|
|
5
|
+
getItem: (key: string) => string | null;
|
|
6
|
+
setItem: (key: string, value: string) => void;
|
|
7
|
+
removeItem: (key: string) => void;
|
|
8
|
+
}>;
|
|
9
|
+
export type TLogViewSessionState = Readonly<{
|
|
10
|
+
scrollTop: number;
|
|
11
|
+
firstLineIndex: number;
|
|
12
|
+
visualIndexMode: "estimated" | "exact";
|
|
13
|
+
search?: Readonly<{
|
|
14
|
+
query: string;
|
|
15
|
+
mode: "text" | "regex";
|
|
16
|
+
caseSensitive: boolean;
|
|
17
|
+
wholeWord: boolean;
|
|
18
|
+
regexFlags?: string;
|
|
19
|
+
currentMatchIndex: number;
|
|
20
|
+
history?: readonly string[];
|
|
21
|
+
savedSearches?: readonly TLogSavedSearch[];
|
|
22
|
+
}>;
|
|
23
|
+
ui?: Readonly<{
|
|
24
|
+
resultsPage?: number;
|
|
25
|
+
linksPanelActiveIndex?: number;
|
|
26
|
+
wrap?: boolean;
|
|
27
|
+
ansi?: boolean;
|
|
28
|
+
links?: boolean;
|
|
29
|
+
keyboardLinks?: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
}>;
|
|
32
|
+
export type TLogViewSessionBindings = Readonly<{
|
|
33
|
+
logView: Ref<TLogViewHandle | null>;
|
|
34
|
+
visualIndexMode?: Ref<"estimated" | "exact">;
|
|
35
|
+
wrap?: Ref<boolean>;
|
|
36
|
+
ansi?: Ref<boolean>;
|
|
37
|
+
links?: Ref<boolean>;
|
|
38
|
+
keyboardLinks?: Ref<boolean>;
|
|
39
|
+
search?: Readonly<{
|
|
40
|
+
query: Ref<string>;
|
|
41
|
+
mode: Ref<"text" | "regex">;
|
|
42
|
+
caseSensitive: Ref<boolean>;
|
|
43
|
+
wholeWord: Ref<boolean>;
|
|
44
|
+
regexFlags: Ref<string>;
|
|
45
|
+
searchHistory?: Ref<readonly string[]>;
|
|
46
|
+
savedSearches?: Ref<readonly TLogSavedSearch[]>;
|
|
47
|
+
updateQuery: (value: string) => void;
|
|
48
|
+
updateMode: (value: "text" | "regex") => void;
|
|
49
|
+
updateCaseSensitive: (value: boolean) => void;
|
|
50
|
+
updateWholeWord: (value: boolean) => void;
|
|
51
|
+
updateRegexFlags: (value: string) => void;
|
|
52
|
+
setSearchHistory?: (value: readonly string[]) => void;
|
|
53
|
+
setSavedSearches?: (value: readonly TLogSavedSearch[]) => void;
|
|
54
|
+
clearSearch: () => void;
|
|
55
|
+
selectMatch: (matchIndex: number) => boolean;
|
|
56
|
+
resultsPage?: Readonly<{
|
|
57
|
+
state: Ref<Readonly<{
|
|
58
|
+
page: number;
|
|
59
|
+
}>>;
|
|
60
|
+
setPage: (page: number) => void;
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
linkController?: Readonly<{
|
|
64
|
+
activeIndex: Ref<number>;
|
|
65
|
+
focusVisibleLink: (visibleIndex: number) => boolean;
|
|
66
|
+
clearFocus: () => void;
|
|
67
|
+
}>;
|
|
68
|
+
}>;
|
|
69
|
+
export declare function serializeTLogViewSessionState(state: TLogViewSessionState): string;
|
|
70
|
+
export declare function deserializeTLogViewSessionState(value: string | null | undefined): TLogViewSessionState | null;
|
|
71
|
+
export declare function createTLogViewSessionStore(options?: {
|
|
72
|
+
storageKey?: string;
|
|
73
|
+
storage?: StorageLike | null;
|
|
74
|
+
}): {
|
|
75
|
+
state: Ref<TLogViewSessionState | null>;
|
|
76
|
+
load: () => TLogViewSessionState | null;
|
|
77
|
+
save: (state: TLogViewSessionState) => void;
|
|
78
|
+
clear: () => void;
|
|
79
|
+
};
|
|
80
|
+
export declare function captureTLogViewSessionState(bindings: TLogViewSessionBindings): TLogViewSessionState | null;
|
|
81
|
+
export declare function restoreTLogViewSessionState(bindings: TLogViewSessionBindings, state: TLogViewSessionState | null): boolean;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Style } from "../../core/types.js";
|
|
2
|
+
import type { TLogSearchBar } from "../components/TLogSearchBar.js";
|
|
3
|
+
import type { TLogSearchPager } from "../components/TLogSearchPager.js";
|
|
4
|
+
import type { TLogVirtualLinksPanel } from "../components/TLogVirtualLinksPanel.js";
|
|
5
|
+
import type { TLogVirtualSearchResults } from "../components/TLogVirtualSearchResults.js";
|
|
6
|
+
import type { TLogMinimap } from "../components/TLogMinimap.js";
|
|
7
|
+
import type { TLogScrollbar } from "../components/TLogScrollbar.js";
|
|
8
|
+
import type { TLogView } from "../components/TLogView.js";
|
|
9
|
+
import type { TLogKeymap } from "./tlog-keymap.js";
|
|
10
|
+
export type TLogTheme = Readonly<{
|
|
11
|
+
base?: Style;
|
|
12
|
+
error?: Style;
|
|
13
|
+
warning?: Style;
|
|
14
|
+
info?: Style;
|
|
15
|
+
search?: Readonly<{
|
|
16
|
+
match?: Style;
|
|
17
|
+
currentMatch?: Style;
|
|
18
|
+
input?: Style;
|
|
19
|
+
error?: Style;
|
|
20
|
+
active?: Style;
|
|
21
|
+
disabled?: Style;
|
|
22
|
+
}>;
|
|
23
|
+
links?: Readonly<{
|
|
24
|
+
link?: Style;
|
|
25
|
+
focused?: Style;
|
|
26
|
+
active?: Style;
|
|
27
|
+
disabled?: Style;
|
|
28
|
+
}>;
|
|
29
|
+
scrollbar?: Readonly<{
|
|
30
|
+
track?: Style;
|
|
31
|
+
thumb?: Style;
|
|
32
|
+
measuring?: Style;
|
|
33
|
+
marker?: Style;
|
|
34
|
+
currentMarker?: Style;
|
|
35
|
+
}>;
|
|
36
|
+
minimap?: Readonly<{
|
|
37
|
+
density?: Style;
|
|
38
|
+
viewport?: Style;
|
|
39
|
+
marker?: Style;
|
|
40
|
+
currentMarker?: Style;
|
|
41
|
+
estimated?: Style;
|
|
42
|
+
}>;
|
|
43
|
+
}>;
|
|
44
|
+
export type TLogUiPreset = Readonly<{
|
|
45
|
+
theme: TLogTheme;
|
|
46
|
+
keymap: TLogKeymap;
|
|
47
|
+
}>;
|
|
48
|
+
type SearchBarThemeProps = Partial<InstanceType<typeof TLogSearchBar>["$props"]>;
|
|
49
|
+
type SearchResultsThemeProps = Partial<InstanceType<typeof TLogVirtualSearchResults>["$props"]>;
|
|
50
|
+
type SearchPagerThemeProps = Partial<InstanceType<typeof TLogSearchPager>["$props"]>;
|
|
51
|
+
type LinksPanelThemeProps = Partial<InstanceType<typeof TLogVirtualLinksPanel>["$props"]>;
|
|
52
|
+
type ScrollbarThemeProps = Partial<InstanceType<typeof TLogScrollbar>["$props"]>;
|
|
53
|
+
type MinimapThemeProps = Partial<InstanceType<typeof TLogMinimap>["$props"]>;
|
|
54
|
+
type LogViewThemeProps = Partial<InstanceType<typeof TLogView>["$props"]>;
|
|
55
|
+
export declare const tlogDefaultTheme: TLogTheme;
|
|
56
|
+
export declare const tlogDarkTheme: TLogTheme;
|
|
57
|
+
export declare const tlogHighContrastTheme: TLogTheme;
|
|
58
|
+
export declare const tlogDefaultPreset: TLogUiPreset;
|
|
59
|
+
export declare const tlogDarkPreset: TLogUiPreset;
|
|
60
|
+
export declare const tlogHighContrastPreset: TLogUiPreset;
|
|
61
|
+
export declare function resolveTLogViewTheme(theme: TLogTheme): LogViewThemeProps;
|
|
62
|
+
export declare function resolveTLogSearchBarTheme(theme: TLogTheme): SearchBarThemeProps;
|
|
63
|
+
export declare function resolveTLogSearchResultsTheme(theme: TLogTheme): SearchResultsThemeProps;
|
|
64
|
+
export declare function resolveTLogSearchPagerTheme(theme: TLogTheme): SearchPagerThemeProps;
|
|
65
|
+
export declare function resolveTLogLinksPanelTheme(theme: TLogTheme): LinksPanelThemeProps;
|
|
66
|
+
export declare function resolveTLogScrollbarTheme(theme: TLogTheme): ScrollbarThemeProps;
|
|
67
|
+
export declare function resolveTLogMinimapTheme(theme: TLogTheme): MinimapThemeProps;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
export interface TLogDataSource {
|
|
3
|
+
lineCount(): number;
|
|
4
|
+
getLine(index: number): string;
|
|
5
|
+
getLineKey?: (index: number) => string | number;
|
|
6
|
+
firstLineIndex?: () => number;
|
|
7
|
+
}
|
|
8
|
+
export type CreateAppendOnlyLogStoreOptions = Readonly<{
|
|
9
|
+
maxLines?: number;
|
|
10
|
+
}>;
|
|
11
|
+
export type AppendOnlyLogStore = Readonly<{
|
|
12
|
+
source: TLogDataSource;
|
|
13
|
+
version: Ref<number>;
|
|
14
|
+
appendLine: (line: string) => void;
|
|
15
|
+
appendLines: (lines: readonly string[]) => void;
|
|
16
|
+
appendChunk: (chunk: string) => void;
|
|
17
|
+
replaceTail: (text: string) => void;
|
|
18
|
+
clear: () => void;
|
|
19
|
+
}>;
|
|
20
|
+
export type TLogViewVisualIndexStatus = "estimated" | "measuring" | "exact";
|
|
21
|
+
export type TLogViewVisualIndexOptions = Readonly<{
|
|
22
|
+
/**
|
|
23
|
+
* Max time spent measuring wrapped visual rows in one scheduler frame.
|
|
24
|
+
* Default: 4ms.
|
|
25
|
+
*/
|
|
26
|
+
measureBudgetMs?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Optional retained-window cap for exact visual index work.
|
|
29
|
+
* Undefined means measure the whole retained source window.
|
|
30
|
+
*/
|
|
31
|
+
maxMeasuredLines?: number;
|
|
32
|
+
}>;
|
|
33
|
+
export type TLogViewScrollPayload = Readonly<{
|
|
34
|
+
scrollTop: number;
|
|
35
|
+
atBottom: boolean;
|
|
36
|
+
lineCount: number;
|
|
37
|
+
estimatedVisualRowCount: number;
|
|
38
|
+
visualRowCount: number;
|
|
39
|
+
measuredVisualRowCount: number;
|
|
40
|
+
measuredLineCount: number;
|
|
41
|
+
visualIndexStatus: TLogViewVisualIndexStatus;
|
|
42
|
+
firstLineIndex?: number;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import type { TLogViewHandle, TLogViewLinkActivatePayload, TLogViewLinkClickPayload } from "../components/TLogView.js";
|
|
3
|
+
import type { TLogLinkPanelItem } from "../components/TLogLinksPanel.js";
|
|
4
|
+
import type { TLogViewPlugin } from "./tlog-plugins.js";
|
|
5
|
+
export type TLogLinkActionSource = "click" | "keyboard" | "programmatic" | "panel";
|
|
6
|
+
export type TLogLinkAction = Readonly<{
|
|
7
|
+
href: string;
|
|
8
|
+
text: string;
|
|
9
|
+
source: TLogLinkActionSource;
|
|
10
|
+
absoluteLineIndex: number;
|
|
11
|
+
index: number;
|
|
12
|
+
startCell: number;
|
|
13
|
+
endCell: number;
|
|
14
|
+
}>;
|
|
15
|
+
export type UseTLogLinkControllerOptions = Readonly<{
|
|
16
|
+
onAction?: (action: TLogLinkAction) => void;
|
|
17
|
+
plugins?: readonly TLogViewPlugin[];
|
|
18
|
+
}>;
|
|
19
|
+
export declare function useTLogLinkController(logView: Ref<TLogViewHandle | null>, options?: UseTLogLinkControllerOptions): {
|
|
20
|
+
visibleLinks: Ref<readonly TLogLinkPanelItem[]>;
|
|
21
|
+
activeIndex: Ref<number>;
|
|
22
|
+
refresh: () => void;
|
|
23
|
+
focusVisibleLink: (visibleIndex: number) => boolean;
|
|
24
|
+
focusNextLink: () => boolean;
|
|
25
|
+
focusPreviousLink: () => boolean;
|
|
26
|
+
clearFocus: () => void;
|
|
27
|
+
activateVisibleLink: (visibleIndex: number) => boolean;
|
|
28
|
+
activateFocusedLink: () => boolean;
|
|
29
|
+
handleLinkClick: (payload: TLogViewLinkClickPayload) => void;
|
|
30
|
+
handleLinkActivate: (payload: TLogViewLinkActivatePayload) => void;
|
|
31
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import type { TLogMinimapDensityBucket } from "../components/TLogMinimap.js";
|
|
3
|
+
import type { TLogViewHandle } from "../components/TLogView.js";
|
|
4
|
+
import type { TLogDataSource } from "./types.js";
|
|
5
|
+
import type { TLogViewExternalLink, TLogViewExternalMarker, TLogViewPlugin } from "./tlog-plugins.js";
|
|
6
|
+
export type TLogIndexStatus = "idle" | "indexing" | "done" | "error";
|
|
7
|
+
export type TLogDiagnosticMarker = TLogViewExternalMarker;
|
|
8
|
+
export type TLogIndexedLink = TLogViewExternalLink;
|
|
9
|
+
export type TLogRetainedIndexOptions = Readonly<{
|
|
10
|
+
links?: boolean;
|
|
11
|
+
levels?: boolean;
|
|
12
|
+
urls?: boolean;
|
|
13
|
+
budgetMs?: number;
|
|
14
|
+
maxItems?: number;
|
|
15
|
+
bucketCount?: number;
|
|
16
|
+
allowFileUrls?: boolean;
|
|
17
|
+
plugins?: readonly TLogViewPlugin[];
|
|
18
|
+
}>;
|
|
19
|
+
export declare function useTLogRetainedIndex(logView: Ref<TLogViewHandle | null>, source: Ref<TLogDataSource>, version: Ref<number>, options?: TLogRetainedIndexOptions): {
|
|
20
|
+
status: Ref<TLogIndexStatus>;
|
|
21
|
+
links: Ref<readonly TLogIndexedLink[]>;
|
|
22
|
+
diagnostics: Ref<readonly TLogDiagnosticMarker[]>;
|
|
23
|
+
density: Ref<readonly TLogMinimapDensityBucket[]>;
|
|
24
|
+
refresh: () => void;
|
|
25
|
+
cancel: () => void;
|
|
26
|
+
};
|