refactor(tui): extract standalone package (#31193)

This commit is contained in:
Dax
2026-06-07 05:24:27 +00:00
committed by GitHub
parent 7a2c49e762
commit 106f8e94d6
84 changed files with 1148 additions and 1919 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import type { TuiPlatform } from "../platform"
import type { ClipboardService } from "../context/clipboard"
type Toast = {
show: (input: { message: string; variant: "info" | "success" | "warning" | "error" }) => void
@@ -23,7 +23,7 @@ type SelectionKeyEvent = {
stopPropagation: () => void
}
export function copy(renderer: Renderer, toast: Toast, clipboard: TuiPlatform["clipboard"]): boolean {
export function copy(renderer: Renderer, toast: Toast, clipboard: ClipboardService): boolean {
const selection = renderer.getSelection()
if (!selection) return false
@@ -47,7 +47,7 @@ export function handleSelectionKey(
renderer: Renderer,
toast: Toast,
event: SelectionKeyEvent,
clipboard: TuiPlatform["clipboard"],
clipboard: ClipboardService,
) {
const selection = renderer.getSelection()
if (!selection) return