Files
vue-tui/packages/runtime/src/components/Static.ts
T
Yunfei He ff82f6e064 feat(runtime): Vue terminal renderer with Ink-aligned API
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>
2026-05-24 18:13:33 +08:00

17 lines
354 B
TypeScript

import { defineComponent, h } from "vue";
export const Static = defineComponent({
name: "Static",
props: {
items: { type: Array, required: true },
},
setup(props, { slots }) {
return () =>
h(
"static",
{},
(props.items as unknown[]).map((item, index) => slots.default?.({ item, index })),
);
},
});