ff82f6e064
Custom Vue 3 renderer for terminal UIs, built on yoga-layout for flexbox and chalk for styling. Components: Box, Text, Newline, Spacer, Static, Transform Composables: useExit, useInput, useFocus, useFocusManager, useStdin, useStdout, useStderr, useTerminalSize Entry: createApp(root) → app.mount(options) → app.waitUntilExit() Focus: Ink-aligned Tab/Shift+Tab/Escape with Focusable[] ring Internal subpath: @vue-tui/runtime/internal (yogaNodeTracker) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17 lines
514 B
TypeScript
17 lines
514 B
TypeScript
import { expect, test } from "vite-plus/test";
|
|
import { parseKey } from "./key-parser.ts";
|
|
|
|
test("Shift+Tab (\\x1b[Z) sets tab=true and shift=true", () => {
|
|
const result = parseKey("\x1b[Z");
|
|
expect(result.input).toBe("");
|
|
expect(result.key.tab).toBe(true);
|
|
expect(result.key.shift).toBe(true);
|
|
});
|
|
|
|
test("plain Tab (\\t) sets tab=true, shift=false", () => {
|
|
const result = parseKey("\t");
|
|
expect(result.input).toBe("");
|
|
expect(result.key.tab).toBe(true);
|
|
expect(result.key.shift).toBe(false);
|
|
});
|