222b520678
- useWindowSize alias for useTerminalSize (Ink API naming parity) - terminal-size fallback when stdout.columns/rows are 0/missing - Public API test covers all new exports - README documents all MountOptions and composables Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
854 B
TypeScript
42 lines
854 B
TypeScript
import { expect, test } from "vite-plus/test";
|
|
import * as api from "@vue-tui/runtime";
|
|
|
|
test("public API exposes documented members", () => {
|
|
for (const k of [
|
|
// Entry point
|
|
"createApp",
|
|
// Components
|
|
"Box",
|
|
"Text",
|
|
"Newline",
|
|
"Spacer",
|
|
"Static",
|
|
"Transform",
|
|
// Composables
|
|
"useExit",
|
|
"useInput",
|
|
"useFocus",
|
|
"useFocusManager",
|
|
"useStdin",
|
|
"useStdout",
|
|
"useStderr",
|
|
"useTerminalSize",
|
|
"useWindowSize",
|
|
"useCursor",
|
|
"useIsScreenReaderEnabled",
|
|
"useAnimation",
|
|
"useBoxMetrics",
|
|
"measureElement",
|
|
"usePaste",
|
|
// Rendering
|
|
"renderToString",
|
|
"renderScreenReaderOutput",
|
|
]) {
|
|
expect(api).toHaveProperty(k);
|
|
}
|
|
});
|
|
|
|
test("useWindowSize is an alias for useTerminalSize", () => {
|
|
expect(api.useWindowSize).toBe(api.useTerminalSize);
|
|
});
|