@vizejs/fresco 0.101.0 → 0.103.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/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/{components-B5VXjX9s.mjs → components-BFV7PBp6.mjs} +399 -66
- package/dist/components-BFV7PBp6.mjs.map +1 -0
- package/dist/composables/index.d.mts +2 -2
- package/dist/composables/index.mjs +3 -3
- package/dist/composables-BKj30tnc.mjs +318 -0
- package/dist/composables-BKj30tnc.mjs.map +1 -0
- package/dist/index-43FxHkwF.d.mts +316 -0
- package/dist/index-43FxHkwF.d.mts.map +1 -0
- package/dist/{index-COlY8bRB.d.mts → index-BPjzljOc.d.mts} +368 -70
- package/dist/index-BPjzljOc.d.mts.map +1 -0
- package/dist/index.d.mts +129 -26
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +31 -4
- package/dist/index.mjs.map +1 -0
- package/dist/useInput-DrlvpGkS.mjs +1463 -0
- package/dist/useInput-DrlvpGkS.mjs.map +1 -0
- package/package.json +5 -2
- package/dist/components-B5VXjX9s.mjs.map +0 -1
- package/dist/composables-ThPaZc16.mjs +0 -194
- package/dist/composables-ThPaZc16.mjs.map +0 -1
- package/dist/index-BeImxraZ.d.mts +0 -142
- package/dist/index-BeImxraZ.d.mts.map +0 -1
- package/dist/index-COlY8bRB.d.mts.map +0 -1
- package/dist/useInput-CbggNZUF.mjs +0 -351
- package/dist/useInput-CbggNZUF.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInput-DrlvpGkS.mjs","names":["stringValue","nodeText","loadNative","createRenderer","createVueRenderer","createRenderer","toRef"],"sources":["../src/accessibility.ts","../src/composables/useApp.ts","../src/composables/useFocus.ts","../src/composables/useStreams.ts","../src/composables/useCursor.ts","../src/layoutMetrics.ts","../src/renderer.ts","../src/app.ts","../src/composables/useIsScreenReaderEnabled.ts","../src/composables/usePaste.ts","../src/composables/useInput.ts"],"sourcesContent":["/**\n * Ink-compatible screen reader helpers.\n */\n\nimport type { InjectionKey, Ref } from \"@vue/runtime-core\";\nimport type { FlexStyleNapi } from \"@vizejs/fresco-native\";\nimport type { FrescoNode, NativeRenderNode } from \"./renderer.js\";\n\nexport const SCREEN_READER_KEY: InjectionKey<Readonly<Ref<boolean>>> =\n Symbol(\"fresco-screen-reader\");\n\nexport type AriaRole =\n | \"button\"\n | \"checkbox\"\n | \"combobox\"\n | \"list\"\n | \"listbox\"\n | \"listitem\"\n | \"menu\"\n | \"menuitem\"\n | \"option\"\n | \"progressbar\"\n | \"radio\"\n | \"radiogroup\"\n | \"tab\"\n | \"tablist\"\n | \"table\"\n | \"textbox\"\n | \"timer\"\n | \"toolbar\";\n\nexport type AriaState = Partial<\n Record<\n | \"busy\"\n | \"checked\"\n | \"disabled\"\n | \"expanded\"\n | \"multiline\"\n | \"multiselectable\"\n | \"readonly\"\n | \"required\"\n | \"selected\",\n boolean\n >\n>;\n\nexport function isScreenReaderEnabledByDefault(): boolean {\n return process.env.INK_SCREEN_READER === \"true\" || process.env.FRESCO_SCREEN_READER === \"true\";\n}\n\nfunction stringValue(value: unknown): string | undefined {\n if (typeof value === \"string\" || typeof value === \"number\") return String(value);\n return undefined;\n}\n\nfunction nodeText(node: FrescoNode): string {\n const ariaLabel = stringValue(node.props[\"aria-label\"]);\n if (ariaLabel !== undefined) return ariaLabel;\n if (node.text !== undefined) return node.text;\n\n const propText = node.props.text ?? node.props.content;\n if (typeof propText === \"string\" || typeof propText === \"number\") return String(propText);\n\n if (node.type === \"input\") {\n const value = node.props.value;\n const placeholder = node.props.placeholder;\n if (typeof value === \"string\" || typeof value === \"number\") return String(value);\n if (typeof placeholder === \"string\" || typeof placeholder === \"number\")\n return String(placeholder);\n }\n\n return \"\";\n}\n\nfunction flexDirection(node: FrescoNode): string {\n const style = (node.props.style ?? {}) as Record<string, unknown>;\n return stringValue(style.flexDirection ?? style.flex_direction) ?? \"column\";\n}\n\nfunction ariaRole(node: FrescoNode): AriaRole | undefined {\n return stringValue(node.props[\"aria-role\"]) as AriaRole | undefined;\n}\n\nfunction ariaState(node: FrescoNode): AriaState | undefined {\n const state = node.props[\"aria-state\"];\n if (!state || typeof state !== \"object\") return undefined;\n return state as AriaState;\n}\n\nfunction isAriaHidden(node: FrescoNode): boolean {\n return node.props[\"aria-hidden\"] === true;\n}\n\nexport function treeToScreenReaderString(\n node: FrescoNode,\n options: { parentRole?: AriaRole } = {},\n): string {\n if (isAriaHidden(node)) return \"\";\n\n let output = \"\";\n const text = nodeText(node);\n\n if (node.type === \"text\" || node.type === \"input\") {\n output = `${text}${node.children.map((child) => treeToScreenReaderString(child, options)).join(\"\")}`;\n } else if (text) {\n output = text;\n } else {\n const direction = flexDirection(node);\n const separator = direction === \"row\" || direction === \"row-reverse\" ? \" \" : \"\\n\";\n const children =\n direction === \"row-reverse\" || direction === \"column-reverse\"\n ? [...node.children].reverse()\n : node.children;\n\n const role = ariaRole(node);\n output = children\n .map((child) => treeToScreenReaderString(child, { parentRole: role }))\n .filter(Boolean)\n .join(separator);\n }\n\n const state = ariaState(node);\n if (state) {\n const stateDescription = Object.keys(state)\n .filter((key) => state[key as keyof AriaState])\n .join(\", \");\n\n if (stateDescription) {\n output = `(${stateDescription}) ${output}`;\n }\n }\n\n const role = ariaRole(node);\n if (role && role !== options.parentRole) {\n output = `${role}: ${output}`;\n }\n\n return output;\n}\n\nexport function treeToScreenReaderRenderNodes(root: FrescoNode): NativeRenderNode[] {\n const output = treeToScreenReaderString(root);\n const rootStyle = (root.props.style ?? {}) as FlexStyleNapi;\n const nodes: NativeRenderNode[] = [\n {\n id: root.id,\n nodeType: \"root\",\n style: {\n ...rootStyle,\n flexDirection: \"column\",\n },\n },\n ];\n\n if (!output) return nodes;\n\n const textId = root.id - 1;\n nodes[0].children = [textId];\n nodes.push({\n id: textId,\n nodeType: \"text\",\n text: output,\n wrap: true,\n wrapMode: \"wrap\",\n });\n\n return nodes;\n}\n","/**\n * useApp - App context composable\n */\n\nimport { ref, provide, inject, type InjectionKey, type Ref } from \"@vue/runtime-core\";\n\nexport const APP_KEY: InjectionKey<UseAppReturn> = Symbol(\"fresco-app\");\n\nexport interface UseAppReturn {\n /** Terminal width */\n width: Ref<number>;\n /** Terminal height */\n height: Ref<number>;\n /** Whether app is running */\n isRunning: Ref<boolean>;\n /** Exit the app */\n exit: (errorOrResult?: unknown) => void;\n /** Force re-render */\n render: () => void;\n /** Clear the screen */\n clear: () => void;\n /** Wait until pending render output has flushed */\n waitUntilRenderFlush: () => Promise<void>;\n}\n\nexport interface AppContextControls {\n exit?: (errorOrResult?: unknown) => void;\n render?: () => void;\n clear?: () => void;\n waitUntilRenderFlush?: () => Promise<void>;\n stdout?: NodeJS.WriteStream;\n width?: number;\n height?: number;\n}\n\n/**\n * Create app context (use at app root)\n */\nexport function createAppContext(controls: AppContextControls = {}): UseAppReturn {\n const width = ref(controls.width ?? 80);\n const height = ref(controls.height ?? 24);\n const isRunning = ref(true);\n\n const exit = (errorOrResult?: unknown) => {\n isRunning.value = false;\n controls.exit?.(errorOrResult);\n };\n\n const render = () => {\n controls.render?.();\n };\n\n const clear = () => {\n controls.clear?.();\n };\n\n const waitUntilRenderFlush = () => {\n return controls.waitUntilRenderFlush?.() ?? Promise.resolve();\n };\n\n const stdout = controls.stdout ?? (typeof process !== \"undefined\" ? process.stdout : undefined);\n\n // Try to get terminal size\n if (stdout) {\n width.value = controls.width ?? stdout.columns ?? 80;\n height.value = controls.height ?? stdout.rows ?? 24;\n\n stdout.on?.(\"resize\", () => {\n width.value = stdout.columns ?? 80;\n height.value = stdout.rows ?? 24;\n });\n }\n\n return {\n width,\n height,\n isRunning,\n exit,\n render,\n clear,\n waitUntilRenderFlush,\n };\n}\n\n/**\n * Provide app context to descendants\n */\nexport function provideApp(context: UseAppReturn) {\n provide(APP_KEY, context);\n}\n\n/**\n * Use app context\n */\nexport function useApp(): UseAppReturn {\n const context = inject(APP_KEY);\n\n if (!context) {\n // Return defaults if not in app context\n return {\n width: ref(80),\n height: ref(24),\n isRunning: ref(false),\n exit: () => {},\n render: () => {},\n clear: () => {},\n waitUntilRenderFlush: () => Promise.resolve(),\n };\n }\n\n return context;\n}\n\n/**\n * Use terminal dimensions\n */\nexport function useTerminalSize() {\n const { width, height } = useApp();\n return { width, height };\n}\n\n/**\n * Exit handler\n */\nexport function useExit() {\n const { exit } = useApp();\n return exit;\n}\n","/**\n * useFocus - Focus management composable\n */\n\nimport {\n computed,\n inject,\n isRef,\n onUnmounted,\n provide,\n ref,\n watch,\n type InjectionKey,\n type Ref,\n} from \"@vue/runtime-core\";\n\nexport const FOCUS_KEY: InjectionKey<FocusManager> = Symbol(\"fresco-focus\");\n\nexport interface UseFocusOptions {\n /** Enable or disable this focus target while keeping its logical identity */\n isActive?: boolean | Ref<boolean>;\n /** Auto-focus this component when nothing else is focused */\n autoFocus?: boolean;\n /** Focus ID for this element */\n id?: string;\n}\n\nexport interface FocusManager {\n /** Currently focused element ID */\n focusedId: Ref<string | null>;\n /** Ink-compatible currently focused ID alias */\n activeId: Readonly<Ref<string | undefined>>;\n /** All active focusable element IDs */\n focusableIds: Readonly<Ref<string[]>>;\n /** Whether focus management is enabled */\n isEnabled: Ref<boolean>;\n /** Enable focus management */\n enableFocus: () => void;\n /** Disable focus management */\n disableFocus: () => void;\n /** Focus a specific element */\n focus: (id: string) => void;\n /** Focus next element */\n focusNext: () => void;\n /** Focus previous element */\n focusPrevious: () => void;\n /** Register a focusable element */\n register: (id: string, options?: { isActive?: boolean; autoFocus?: boolean }) => void;\n /** Unregister a focusable element */\n unregister: (id: string) => void;\n /** Activate or deactivate a focusable element while keeping its order */\n setActive: (id: string, isActive: boolean) => void;\n}\n\ninterface Focusable {\n id: string;\n isActive: boolean;\n}\n\nfunction activeFocusables(focusables: Focusable[]): Focusable[] {\n return focusables.filter((focusable) => focusable.isActive);\n}\n\n/**\n * Create a focus manager (use at app root)\n */\nexport function createFocusManager(): FocusManager {\n const focusedId = ref<string | null>(null);\n const activeId = computed(() => focusedId.value ?? undefined);\n const focusables = ref<Focusable[]>([]);\n const focusableIds = computed(() => activeFocusables(focusables.value).map(({ id }) => id));\n const isEnabled = ref(true);\n\n const focus = (id: string) => {\n const target = focusables.value.find((focusable) => focusable.id === id);\n if (isEnabled.value && target?.isActive) {\n focusedId.value = id;\n }\n };\n\n const focusNext = () => {\n const active = activeFocusables(focusables.value);\n if (!isEnabled.value || active.length === 0) return;\n\n const currentIndex = focusedId.value\n ? focusables.value.findIndex((focusable) => focusable.id === focusedId.value)\n : -1;\n const next = focusables.value.slice(currentIndex + 1).find((focusable) => focusable.isActive);\n focusedId.value = next?.id ?? active[0]?.id ?? null;\n };\n\n const focusPrevious = () => {\n const active = activeFocusables(focusables.value);\n if (!isEnabled.value || active.length === 0) return;\n\n const currentIndex = focusedId.value\n ? focusables.value.findIndex((focusable) => focusable.id === focusedId.value)\n : focusables.value.length;\n const previous = focusables.value\n .slice(0, currentIndex < 0 ? 0 : currentIndex)\n .findLast((focusable) => focusable.isActive);\n focusedId.value = previous?.id ?? active.at(-1)?.id ?? null;\n };\n\n const register: FocusManager[\"register\"] = (id, options = {}) => {\n const existing = focusables.value.find((focusable) => focusable.id === id);\n if (existing) {\n existing.isActive = options.isActive ?? existing.isActive;\n } else {\n focusables.value.push({\n id,\n isActive: options.isActive ?? true,\n });\n }\n\n if (options.autoFocus && !focusedId.value && options.isActive !== false) {\n focus(id);\n }\n };\n\n const unregister = (id: string) => {\n const index = focusables.value.findIndex((focusable) => focusable.id === id);\n if (index !== -1) {\n focusables.value.splice(index, 1);\n if (focusedId.value === id) {\n focusedId.value = null;\n }\n }\n };\n\n const setActive = (id: string, isActive: boolean) => {\n const focusable = focusables.value.find((item) => item.id === id);\n if (!focusable) return;\n\n focusable.isActive = isActive;\n if (!isActive && focusedId.value === id) {\n focusedId.value = null;\n }\n };\n\n const enableFocus = () => {\n isEnabled.value = true;\n };\n\n const disableFocus = () => {\n isEnabled.value = false;\n focusedId.value = null;\n };\n\n return {\n focusedId,\n activeId,\n focusableIds,\n isEnabled,\n enableFocus,\n disableFocus,\n focus,\n focusNext,\n focusPrevious,\n register,\n unregister,\n setActive,\n };\n}\n\n/**\n * Provide focus manager to descendants\n */\nexport function provideFocusManager(manager: FocusManager) {\n provide(FOCUS_KEY, manager);\n}\n\n/**\n * Use focus management\n */\nexport function useFocus(options: UseFocusOptions = {}) {\n const {\n autoFocus = false,\n id = `focus-${Math.random().toString(36).slice(2)}`,\n isActive: isActiveOption = true,\n } = options;\n\n const manager = inject(FOCUS_KEY, null);\n const localFocused = ref(autoFocus);\n const active = isRef(isActiveOption) ? isActiveOption : ref(isActiveOption);\n\n const isFocused = computed(() => {\n if (manager) {\n return manager.isEnabled.value && manager.focusedId.value === id;\n }\n return active.value && localFocused.value;\n });\n\n const focus = (targetId = id) => {\n if (manager) {\n manager.focus(targetId);\n } else if (targetId === id) {\n localFocused.value = true;\n }\n };\n\n const blur = () => {\n if (manager) {\n if (manager.focusedId.value === id) {\n manager.focusedId.value = null;\n }\n } else {\n localFocused.value = false;\n }\n };\n\n if (manager) {\n manager.register(id, { isActive: active.value, autoFocus });\n\n watch(\n active,\n (enabled) => {\n manager.setActive(id, enabled);\n if (enabled && autoFocus && !manager.focusedId.value) manager.focus(id);\n },\n { immediate: false },\n );\n\n onUnmounted(() => {\n manager.unregister(id);\n });\n }\n\n return {\n id,\n isFocused,\n focus,\n blur,\n };\n}\n\n/**\n * Use global focus manager controls.\n */\nexport function useFocusManager() {\n const manager = inject(FOCUS_KEY, null);\n\n if (!manager) {\n const empty = ref<string[]>([]);\n const activeId = ref<string | undefined>(undefined);\n return {\n enableFocus: () => {},\n disableFocus: () => {},\n focusNext: () => {},\n focusPrevious: () => {},\n focus: (_id: string) => {},\n activeId,\n focusableIds: empty,\n };\n }\n\n return {\n enableFocus: manager.enableFocus,\n disableFocus: manager.disableFocus,\n focusNext: manager.focusNext,\n focusPrevious: manager.focusPrevious,\n focus: manager.focus,\n activeId: manager.activeId,\n focusableIds: manager.focusableIds,\n };\n}\n","/**\n * Stream composables matching Ink's stdin/stdout/stderr helpers.\n */\n\nimport { inject, type InjectionKey } from \"@vue/runtime-core\";\n\nconst BRACKETED_PASTE_ENABLE = \"\\x1B[?2004h\";\nconst BRACKETED_PASTE_DISABLE = \"\\x1B[?2004l\";\n\nexport const STREAMS_KEY: InjectionKey<StreamsContext> = Symbol(\"fresco-streams\");\n\nexport interface StreamsContextOptions {\n stdin?: NodeJS.ReadStream;\n stdout?: NodeJS.WriteStream;\n stderr?: NodeJS.WriteStream;\n exitOnCtrlC?: boolean;\n interactive?: boolean;\n writeToStdout?: (data: string) => void;\n writeToStderr?: (data: string) => void;\n}\n\nexport interface StreamsContext {\n stdin: NodeJS.ReadStream;\n stdout: NodeJS.WriteStream;\n stderr: NodeJS.WriteStream;\n setRawMode: (isRawMode: boolean) => void;\n isRawModeSupported: boolean;\n setBracketedPasteMode: (isEnabled: boolean) => void;\n writeToStdout: (data: string) => void;\n writeToStderr: (data: string) => void;\n internal_exitOnCtrlC: boolean;\n}\n\nexport interface UseStdinReturn {\n stdin: NodeJS.ReadStream;\n setRawMode: (isRawMode: boolean) => void;\n isRawModeSupported: boolean;\n internal_exitOnCtrlC: boolean;\n}\n\nexport interface UseStdoutReturn {\n stdout: NodeJS.WriteStream;\n write: (data: string) => void;\n}\n\nexport interface UseStderrReturn {\n stderr: NodeJS.WriteStream;\n write: (data: string) => void;\n}\n\nexport function createStreamsContext(options: StreamsContextOptions = {}): StreamsContext {\n const stdin = options.stdin ?? process.stdin;\n const stdout = options.stdout ?? process.stdout;\n const stderr = options.stderr ?? process.stderr;\n const isInteractive = options.interactive ?? true;\n const writeToStdout = options.writeToStdout ?? ((data: string) => stdout.write(data));\n const writeToStderr = options.writeToStderr ?? ((data: string) => stderr.write(data));\n let rawModeDepth = 0;\n let pendingRawModeDisable = false;\n let bracketedPasteDepth = 0;\n\n return {\n stdin,\n stdout,\n stderr,\n setRawMode: (isRawMode: boolean) => {\n if (!isInteractive || typeof stdin.setRawMode !== \"function\") return;\n\n stdin.setEncoding?.(\"utf8\");\n\n if (isRawMode) {\n pendingRawModeDisable = false;\n if (rawModeDepth === 0) {\n stdin.ref?.();\n stdin.setRawMode(true);\n }\n rawModeDepth += 1;\n return;\n }\n\n if (rawModeDepth === 0) return;\n rawModeDepth -= 1;\n if (rawModeDepth > 0) return;\n\n pendingRawModeDisable = true;\n queueMicrotask(() => {\n if (!pendingRawModeDisable || rawModeDepth > 0) return;\n pendingRawModeDisable = false;\n stdin.setRawMode?.(false);\n stdin.unref?.();\n });\n },\n isRawModeSupported: isInteractive && typeof stdin.setRawMode === \"function\",\n setBracketedPasteMode: (isEnabled: boolean) => {\n if (!isInteractive) return;\n\n if (isEnabled) {\n bracketedPasteDepth += 1;\n if (bracketedPasteDepth === 1) stdout.write(BRACKETED_PASTE_ENABLE);\n return;\n }\n\n if (bracketedPasteDepth === 0) return;\n bracketedPasteDepth -= 1;\n if (bracketedPasteDepth === 0) stdout.write(BRACKETED_PASTE_DISABLE);\n },\n writeToStdout,\n writeToStderr,\n internal_exitOnCtrlC: options.exitOnCtrlC ?? true,\n };\n}\n\nexport function useStreamsContext(): StreamsContext {\n return inject(STREAMS_KEY) ?? createStreamsContext();\n}\n\nexport function useStdin(): UseStdinReturn {\n const streams = useStreamsContext();\n\n return {\n stdin: streams.stdin,\n setRawMode: streams.setRawMode,\n isRawModeSupported: streams.isRawModeSupported,\n internal_exitOnCtrlC: streams.internal_exitOnCtrlC,\n };\n}\n\nexport function useStdout(): UseStdoutReturn {\n const { stdout, writeToStdout } = useStreamsContext();\n\n return {\n stdout,\n write: writeToStdout,\n };\n}\n\nexport function useStderr(): UseStderrReturn {\n const { stderr, writeToStderr } = useStreamsContext();\n\n return {\n stderr,\n write: writeToStderr,\n };\n}\n","/**\n * useCursor - terminal cursor positioning.\n */\n\nimport { inject, onUnmounted, type InjectionKey } from \"@vue/runtime-core\";\n\nexport interface CursorPosition {\n x: number;\n y: number;\n}\n\nexport interface CursorContext {\n setCursorPosition: (position: CursorPosition | undefined) => void;\n}\n\nexport const CURSOR_KEY: InjectionKey<CursorContext> = Symbol(\"fresco-cursor\");\n\nasync function loadNative() {\n return import(\"@vizejs/fresco-native\");\n}\n\nexport function createCursorContext(\n setCursorPosition: (position: CursorPosition | undefined) => void,\n): CursorContext {\n return {\n setCursorPosition,\n };\n}\n\nfunction setNativeCursorPosition(position: CursorPosition | undefined) {\n void loadNative()\n .then((native) => {\n if (position) {\n native.setCursor(position.x, position.y);\n native.showCursor();\n } else {\n native.hideCursor();\n }\n })\n .catch(() => {\n // Cursor control is best-effort outside a mounted Fresco app.\n });\n}\n\nexport function useCursor() {\n const context = inject(CURSOR_KEY, null);\n let didSetCursor = false;\n\n const setCursorPosition = (position: CursorPosition | undefined) => {\n didSetCursor = true;\n\n if (context) {\n context.setCursorPosition(position);\n return;\n }\n\n setNativeCursorPosition(position);\n };\n\n onUnmounted(() => {\n if (didSetCursor) {\n context?.setCursorPosition(undefined);\n }\n });\n\n return {\n setCursorPosition,\n };\n}\n","/**\n * Shared post-render layout metrics.\n */\n\nimport type { LayoutResultNapi } from \"@vizejs/fresco-native\";\n\nexport interface DOMElement {\n id?: number;\n $el?: {\n id?: number;\n };\n}\n\nlet lastRenderLayouts: LayoutResultNapi[] = [];\n\nexport function updateLastRenderLayouts(layouts: LayoutResultNapi[]) {\n lastRenderLayouts = layouts;\n}\n\nexport function getLastRenderLayout(node: DOMElement | null | undefined): LayoutResultNapi | null {\n const id = node?.id ?? node?.$el?.id;\n if (id === undefined) return null;\n return lastRenderLayouts.find((layout) => layout.id === id) ?? null;\n}\n\nexport function measureElement(node: DOMElement): { width: number; height: number } {\n const layout = getLastRenderLayout(node);\n return {\n width: layout?.width ?? 0,\n height: layout?.height ?? 0,\n };\n}\n","/**\n * Fresco Vue Custom Renderer\n */\n\nimport {\n createRenderer as createVueRenderer,\n type RendererOptions,\n type RendererNode,\n type RendererElement,\n} from \"@vue/runtime-core\";\nimport type { FlexStyleNapi, RenderNodeNapi, StyleNapi } from \"@vizejs/fresco-native\";\n\n/**\n * Fresco node types\n */\nexport interface FrescoNode extends RendererNode {\n id: number;\n type: \"box\" | \"text\" | \"input\" | \"root\";\n props: Record<string, unknown>;\n children: FrescoNode[];\n parent: FrescoNode | null;\n text?: string;\n}\n\n/**\n * Fresco element (extends node)\n */\nexport interface FrescoElement extends FrescoNode, RendererElement {}\n\nlet nextId = 0;\n\nfunction createNode(type: FrescoNode[\"type\"]): FrescoNode {\n return {\n id: nextId++,\n type,\n props: {},\n children: [],\n parent: null,\n };\n}\n\n/**\n * Renderer options for Fresco\n */\nconst rendererOptions: RendererOptions<FrescoNode, FrescoElement> = {\n patchProp(el, key, _prevValue, nextValue) {\n if (nextValue == null) {\n delete el.props[key];\n } else {\n el.props[key] = nextValue;\n }\n },\n\n insert(child, parent, anchor) {\n child.parent = parent;\n if (anchor) {\n const index = parent.children.indexOf(anchor);\n if (index !== -1) {\n parent.children.splice(index, 0, child);\n return;\n }\n }\n parent.children.push(child);\n },\n\n remove(child) {\n if (child.parent) {\n const index = child.parent.children.indexOf(child);\n if (index !== -1) {\n child.parent.children.splice(index, 1);\n }\n child.parent = null;\n }\n },\n\n createElement(type) {\n const nodeType = mapElementType(type);\n return createNode(nodeType) as FrescoElement;\n },\n\n createText(text) {\n const node = createNode(\"text\");\n node.text = text;\n return node;\n },\n\n createComment() {\n // Comments are ignored in TUI\n return createNode(\"text\");\n },\n\n setText(node, text) {\n node.text = text;\n },\n\n setElementText(el, text) {\n el.text = text;\n el.children = [];\n },\n\n parentNode(node) {\n return node.parent;\n },\n\n nextSibling(node) {\n if (!node.parent) return null;\n const index = node.parent.children.indexOf(node);\n return node.parent.children[index + 1] || null;\n },\n};\n\n/**\n * Map Vue element types to Fresco node types\n */\nfunction mapElementType(type: string): FrescoNode[\"type\"] {\n switch (type.toLowerCase()) {\n case \"box\":\n case \"div\":\n case \"view\":\n return \"box\";\n case \"text\":\n case \"span\":\n return \"text\";\n case \"input\":\n case \"textinput\":\n return \"input\";\n default:\n return \"box\";\n }\n}\n\n/**\n * Create the Fresco renderer\n */\nexport function createRenderer() {\n return createVueRenderer(rendererOptions);\n}\n\nexport interface NativeRenderNode extends RenderNodeNapi {}\n\nfunction stringValue(value: unknown): string | undefined {\n if (typeof value === \"string\" || typeof value === \"number\") return String(value);\n return undefined;\n}\n\nfunction styleValue(style: Record<string, unknown>, ...keys: string[]): unknown {\n for (const key of keys) {\n if (style[key] !== undefined) return style[key];\n }\n return undefined;\n}\n\nfunction copyStringStyle(\n output: Record<string, unknown>,\n style: Record<string, unknown>,\n nativeKey: string,\n ...sourceKeys: string[]\n) {\n const value = styleValue(style, ...sourceKeys);\n const normalized = stringValue(value);\n if (normalized !== undefined) output[nativeKey] = normalized;\n}\n\nfunction copyNumberStyle(\n output: Record<string, unknown>,\n style: Record<string, unknown>,\n nativeKey: string,\n ...sourceKeys: string[]\n) {\n const value = styleValue(style, ...sourceKeys);\n if (typeof value === \"number\") {\n output[nativeKey] = value;\n }\n}\n\nfunction copyRawStyle(\n output: Record<string, unknown>,\n style: Record<string, unknown>,\n nativeKey: string,\n ...sourceKeys: string[]\n) {\n const value = styleValue(style, ...sourceKeys);\n if (value !== undefined) output[nativeKey] = value;\n}\n\nfunction isWrappingEnabled(value: unknown): boolean {\n if (value === undefined) return false;\n if (value === false) return false;\n if (typeof value === \"string\" && value.startsWith(\"truncate\")) return false;\n return true;\n}\n\nfunction textWrapMode(value: unknown): string | undefined {\n if (value === undefined) return undefined;\n if (value === false) return \"none\";\n if (value === true) return \"wrap\";\n if (value === \"end\") return \"truncate-end\";\n if (value === \"middle\") return \"truncate-middle\";\n if (typeof value === \"string\") return value;\n return undefined;\n}\n\n/**\n * Convert Fresco tree to render nodes for native\n */\nexport function treeToRenderNodes(root: FrescoNode): NativeRenderNode[] {\n const nodes: NativeRenderNode[] = [];\n\n function visit(node: FrescoNode) {\n const renderNode: NativeRenderNode = {\n id: node.id,\n nodeType: node.type,\n };\n\n // Extract props\n const text = node.text ?? stringValue(node.props.text) ?? stringValue(node.props.content);\n if (text !== undefined) {\n renderNode.text = text;\n }\n if (node.props.wrap !== undefined) {\n renderNode.wrap = isWrappingEnabled(node.props.wrap);\n renderNode.wrapMode = textWrapMode(node.props.wrap);\n }\n if (node.props.value !== undefined) {\n renderNode.value = stringValue(node.props.value) ?? \"\";\n }\n if (node.props.placeholder !== undefined) {\n renderNode.placeholder = stringValue(node.props.placeholder) ?? \"\";\n }\n if (node.props.focused !== undefined || node.props.focus !== undefined) {\n renderNode.focused = Boolean(node.props.focused ?? node.props.focus);\n }\n if (node.props.cursor !== undefined) {\n renderNode.cursor = Number(node.props.cursor);\n }\n if (node.props.mask !== undefined) {\n renderNode.mask = Boolean(node.props.mask);\n }\n if (node.props.maskChar !== undefined || node.props[\"mask-char\"] !== undefined) {\n renderNode.maskChar = stringValue(node.props.maskChar ?? node.props[\"mask-char\"]);\n }\n if (node.props.border !== undefined) {\n renderNode.border = stringValue(node.props.border) ?? \"\";\n }\n\n // Extract style - only include defined values\n if (node.props.style) {\n const s = node.props.style as Record<string, unknown>;\n const style: Record<string, unknown> = {};\n\n copyRawStyle(style, s, \"display\", \"display\");\n copyRawStyle(style, s, \"position\", \"position\");\n copyStringStyle(style, s, \"top\", \"top\");\n copyStringStyle(style, s, \"right\", \"right\");\n copyStringStyle(style, s, \"bottom\", \"bottom\");\n copyStringStyle(style, s, \"left\", \"left\");\n copyRawStyle(style, s, \"flexDirection\", \"flexDirection\", \"flex_direction\");\n copyRawStyle(style, s, \"flexWrap\", \"flexWrap\", \"flex_wrap\");\n copyRawStyle(style, s, \"justifyContent\", \"justifyContent\", \"justify_content\");\n copyRawStyle(style, s, \"alignItems\", \"alignItems\", \"align_items\");\n copyRawStyle(style, s, \"alignSelf\", \"alignSelf\", \"align_self\");\n copyRawStyle(style, s, \"alignContent\", \"alignContent\", \"align_content\");\n copyNumberStyle(style, s, \"flexGrow\", \"flexGrow\", \"flex_grow\");\n copyNumberStyle(style, s, \"flexShrink\", \"flexShrink\", \"flex_shrink\");\n copyStringStyle(style, s, \"flexBasis\", \"flexBasis\", \"flex_basis\");\n copyStringStyle(style, s, \"width\", \"width\");\n copyStringStyle(style, s, \"height\", \"height\");\n copyStringStyle(style, s, \"minWidth\", \"minWidth\", \"min_width\");\n copyStringStyle(style, s, \"minHeight\", \"minHeight\", \"min_height\");\n copyStringStyle(style, s, \"maxWidth\", \"maxWidth\", \"max_width\");\n copyStringStyle(style, s, \"maxHeight\", \"maxHeight\", \"max_height\");\n copyNumberStyle(style, s, \"aspectRatio\", \"aspectRatio\", \"aspect_ratio\");\n copyNumberStyle(style, s, \"padding\", \"padding\");\n copyNumberStyle(style, s, \"paddingTop\", \"paddingTop\", \"padding_top\");\n copyNumberStyle(style, s, \"paddingRight\", \"paddingRight\", \"padding_right\");\n copyNumberStyle(style, s, \"paddingBottom\", \"paddingBottom\", \"padding_bottom\");\n copyNumberStyle(style, s, \"paddingLeft\", \"paddingLeft\", \"padding_left\");\n copyNumberStyle(style, s, \"margin\", \"margin\");\n copyNumberStyle(style, s, \"marginTop\", \"marginTop\", \"margin_top\");\n copyNumberStyle(style, s, \"marginRight\", \"marginRight\", \"margin_right\");\n copyNumberStyle(style, s, \"marginBottom\", \"marginBottom\", \"margin_bottom\");\n copyNumberStyle(style, s, \"marginLeft\", \"marginLeft\", \"margin_left\");\n copyNumberStyle(style, s, \"gap\", \"gap\");\n copyNumberStyle(style, s, \"columnGap\", \"columnGap\", \"column_gap\");\n copyNumberStyle(style, s, \"rowGap\", \"rowGap\", \"row_gap\");\n copyRawStyle(style, s, \"overflow\", \"overflow\");\n copyRawStyle(style, s, \"overflowX\", \"overflowX\", \"overflow_x\");\n copyRawStyle(style, s, \"overflowY\", \"overflowY\", \"overflow_y\");\n\n if (Object.keys(style).length > 0) {\n renderNode.style = style as FlexStyleNapi;\n }\n }\n\n // Extract appearance (fg, bg, bold, etc.)\n const appearance: Record<string, unknown> = {};\n const fg = node.props.fg ?? node.props.color;\n const bg = node.props.bg ?? node.props.backgroundColor;\n if (fg) appearance.fg = fg;\n if (bg) appearance.bg = bg;\n if (node.props.bold) appearance.bold = node.props.bold;\n if (node.props.dim || node.props.dimColor)\n appearance.dim = Boolean(node.props.dim || node.props.dimColor);\n if (node.props.italic) appearance.italic = node.props.italic;\n if (node.props.underline) appearance.underline = node.props.underline;\n if (node.props.strikethrough) appearance.strikethrough = node.props.strikethrough;\n if (node.props.inverse) appearance.inverse = node.props.inverse;\n if (Object.keys(appearance).length > 0) {\n renderNode.appearance = appearance as StyleNapi;\n }\n\n // Children\n if (node.children.length > 0) {\n renderNode.children = node.children.map((c) => c.id);\n }\n\n nodes.push(renderNode);\n\n // Visit children\n for (const child of node.children) {\n visit(child);\n }\n }\n\n visit(root);\n return nodes;\n}\n","/**\n * Fresco App - Application instance management\n */\n\nimport { format } from \"node:util\";\nimport {\n defineComponent,\n h,\n ref,\n shallowRef,\n type App as VueApp,\n type Component,\n type Ref,\n type VNode,\n} from \"@vue/runtime-core\";\nimport type { InputEventNapi } from \"@vizejs/fresco-native\";\nimport {\n SCREEN_READER_KEY,\n isScreenReaderEnabledByDefault,\n treeToScreenReaderRenderNodes,\n} from \"./accessibility.js\";\nimport { APP_KEY, createAppContext, type UseAppReturn } from \"./composables/useApp.js\";\nimport { createFocusManager, FOCUS_KEY, type FocusManager } from \"./composables/useFocus.js\";\nimport {\n createStreamsContext,\n STREAMS_KEY,\n type StreamsContext,\n} from \"./composables/useStreams.js\";\nimport { createCursorContext, CURSOR_KEY, type CursorPosition } from \"./composables/useCursor.js\";\nimport { updateLastRenderLayouts } from \"./layoutMetrics.js\";\nimport type { KittyKeyboardOptions } from \"./kittyKeyboard.js\";\nimport {\n createRenderer,\n treeToRenderNodes,\n type FrescoElement,\n type FrescoNode,\n} from \"./renderer.js\";\n\nexport type KeyEventType = \"press\" | \"repeat\" | \"release\";\n\n// Event types\nexport interface KeyEvent {\n type: \"key\";\n key?: string;\n char?: string;\n ctrl: boolean;\n alt: boolean;\n shift: boolean;\n meta: boolean;\n super: boolean;\n hyper: boolean;\n capsLock: boolean;\n numLock: boolean;\n eventType?: KeyEventType;\n}\n\nexport interface PasteEvent {\n type: \"paste\";\n text: string;\n}\n\nexport interface ResizeEvent {\n type: \"resize\";\n width: number;\n height: number;\n}\n\nexport interface MouseEvent {\n type: \"mouse\";\n button?: string;\n x: number;\n y: number;\n}\n\nexport interface FocusEvent {\n type: \"focus\";\n focused: boolean;\n}\n\nexport interface CompositionEvent {\n type: \"compositionstart\" | \"compositionupdate\" | \"compositionend\";\n text: string;\n cursor: number;\n}\n\nexport type InputEvent =\n | KeyEvent\n | PasteEvent\n | ResizeEvent\n | MouseEvent\n | FocusEvent\n | CompositionEvent;\n\n// Global event state\nexport const lastKeyEvent: Ref<KeyEvent | null> = ref(null);\nexport const lastPasteEvent: Ref<PasteEvent | null> = ref(null);\nexport const lastResizeEvent: Ref<ResizeEvent | null> = ref(null);\nexport const lastMouseEvent: Ref<MouseEvent | null> = ref(null);\nexport const lastFocusEvent: Ref<FocusEvent | null> = ref(null);\nexport const lastCompositionEvent: Ref<CompositionEvent | null> = ref(null);\n\n// Import native bindings\n// eslint-disable-next-line typescript-eslint/no-redundant-type-constituents -- index.d.ts is generated by napi\nlet native: typeof import(\"@vizejs/fresco-native\") | null = null;\n\ntype ConsoleMethod = \"debug\" | \"error\" | \"info\" | \"log\" | \"warn\";\nconst consoleMethods: ConsoleMethod[] = [\"debug\", \"error\", \"info\", \"log\", \"warn\"];\n\nasync function loadNative() {\n if (!native) {\n native = await import(\"@vizejs/fresco-native\");\n }\n return native;\n}\n\n/**\n * App options\n */\nexport interface AppOptions {\n /** Enable mouse support */\n mouse?: boolean;\n /** Exit on Ctrl+C */\n exitOnCtrlC?: boolean;\n /** Custom error handler */\n onError?: (error: Error) => void;\n /** Debug mode - logs render tree */\n debug?: boolean;\n /** Ink-compatible option, accepted for API parity */\n stdout?: NodeJS.WriteStream;\n /** Ink-compatible option, accepted for API parity */\n stdin?: NodeJS.ReadStream;\n /** Ink-compatible option, accepted for API parity */\n stderr?: NodeJS.WriteStream;\n /** Ink-compatible option, accepted for API parity */\n patchConsole?: boolean;\n /** Called after a frame is rendered */\n onRender?: (metrics: RenderMetrics) => void;\n /** Enable screen reader rendering hints */\n isScreenReaderEnabled?: boolean;\n /** Maximum render frames per second */\n maxFps?: number;\n /** Use alternate screen buffer */\n alternateScreen?: boolean;\n /** Ink-compatible option, accepted for API parity */\n incrementalRendering?: boolean;\n /** Ink-compatible option, accepted for API parity */\n concurrent?: boolean;\n /** Override interactive mode detection */\n interactive?: boolean;\n /** Configure Kitty keyboard protocol support */\n kittyKeyboard?: KittyKeyboardOptions;\n}\n\nexport type RenderOptions = AppOptions;\n\nexport type AppRoot = Component | VNode;\n\n/**\n * Performance metrics for a render operation.\n */\nexport interface RenderMetrics {\n /** Time spent rendering in milliseconds */\n renderTime: number;\n}\n\n/**\n * Fresco App instance\n */\nexport interface App {\n /** Mount the app */\n mount(): Promise<void>;\n /** Unmount the app */\n unmount(errorOrResult?: unknown): Promise<void>;\n /** Wait for exit */\n waitUntilExit(): Promise<unknown>;\n /** Wait for pending render output */\n waitUntilRenderFlush(): Promise<void>;\n /** Render the app */\n render(): void;\n /** Clear the screen */\n clear(): void;\n /** Get terminal info */\n getTerminalInfo(): Promise<{ width: number; height: number }>;\n}\n\nexport interface RenderInstance {\n rerender(root: AppRoot): void;\n unmount(errorOrResult?: unknown): Promise<void>;\n waitUntilExit(): Promise<unknown>;\n waitUntilRenderFlush(): Promise<void>;\n cleanup(): Promise<void>;\n clear(): void;\n}\n\nexport type Instance = RenderInstance;\n\nexport interface RenderToStringOptions {\n /** Width of the virtual terminal in columns */\n columns?: number;\n}\n\nexport interface WritableStreamLike {\n write(...args: unknown[]): unknown;\n}\n\ntype Listener = (...args: unknown[]) => void;\n\nfunction createNoopWriteStream(columns: number, rows: number): NodeJS.WriteStream {\n const stream = {\n isTTY: false,\n columns,\n rows,\n write: () => true,\n on: (_event: string, _listener: Listener) => stream,\n off: (_event: string, _listener: Listener) => stream,\n once: (_event: string, _listener: Listener) => stream,\n removeListener: (_event: string, _listener: Listener) => stream,\n };\n\n return stream as unknown as NodeJS.WriteStream;\n}\n\nfunction createNoopReadStream(): NodeJS.ReadStream {\n const stream = {\n isTTY: false,\n isPaused: () => true,\n pause: () => stream,\n resume: () => stream,\n ref: () => stream,\n unref: () => stream,\n setEncoding: () => stream,\n setRawMode: () => stream,\n on: (_event: string, _listener: Listener) => stream,\n off: (_event: string, _listener: Listener) => stream,\n once: (_event: string, _listener: Listener) => stream,\n removeListener: (_event: string, _listener: Listener) => stream,\n };\n\n return stream as unknown as NodeJS.ReadStream;\n}\n\nfunction isWritableStream(value: unknown): value is WritableStreamLike {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"write\" in value &&\n typeof (value as { write?: unknown }).write === \"function\"\n );\n}\n\nfunction normalizeRenderOptions(options: AppOptions | WritableStreamLike): AppOptions {\n return isWritableStream(options) ? { stdout: options as NodeJS.WriteStream } : options;\n}\n\nfunction isVNodeRoot(root: AppRoot): root is VNode {\n return typeof root === \"object\" && root !== null && \"__v_isVNode\" in root;\n}\n\nfunction componentFromRoot(root: AppRoot): Component {\n if (!isVNodeRoot(root)) return root;\n\n return defineComponent({\n name: \"FrescoVNodeRoot\",\n setup() {\n return () => root;\n },\n });\n}\n\nfunction createRootElement(width = \"100%\", height = \"100%\"): FrescoElement {\n return {\n id: -1,\n type: \"root\",\n props: {\n style: {\n width,\n height,\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n alignItems: \"flex-start\",\n alignContent: \"flex-start\",\n },\n },\n children: [],\n parent: null,\n };\n}\n\nfunction nodeText(node: FrescoNode): string {\n if (node.text !== undefined) return node.text;\n const propText = node.props.text ?? node.props.content;\n if (typeof propText === \"string\" || typeof propText === \"number\") return String(propText);\n if (node.type === \"input\") {\n const value = node.props.value;\n const placeholder = node.props.placeholder;\n if (typeof value === \"string\" || typeof value === \"number\") return String(value);\n if (typeof placeholder === \"string\" || typeof placeholder === \"number\")\n return String(placeholder);\n }\n return \"\";\n}\n\nfunction isStaticNode(node: FrescoNode): boolean {\n return node.props.internal_static === true || node.props.internalStatic === true;\n}\n\nfunction joinOutput(parts: string[], separator = \"\\n\"): string {\n return parts.filter(Boolean).join(separator);\n}\n\nfunction treeToString(node: FrescoNode, options: { skipStatic?: boolean } = {}): string {\n if (options.skipStatic && isStaticNode(node)) return \"\";\n\n const ownText = nodeText(node);\n const childOutput = node.children.map((child) => treeToString(child, options));\n\n if (node.type === \"text\" || node.type === \"input\") {\n return `${ownText}${childOutput.join(\"\")}`;\n }\n\n const style = (node.props.style ?? {}) as Record<string, unknown>;\n const flexDirection = style.flexDirection ?? style.flex_direction;\n const separator = flexDirection === \"column\" ? \"\\n\" : \"\";\n return joinOutput(childOutput, separator);\n}\n\nfunction normalizeOutput(output: string): string {\n return output.endsWith(\"\\n\") ? output.slice(0, -1) : output;\n}\n\nfunction appendOutput(previous: string, next: string): string {\n const normalized = normalizeOutput(next);\n if (!normalized) return previous;\n return previous ? `${previous}\\n${normalized}` : normalized;\n}\n\nfunction captureStaticOutput(node: FrescoNode, renderedStaticItems: Map<number, number>): string {\n const output: string[] = [];\n\n function visit(current: FrescoNode) {\n if (isStaticNode(current)) {\n const renderedItems = renderedStaticItems.get(current.id) ?? 0;\n const nextItems = current.children.slice(renderedItems);\n const nextOutput = joinOutput(\n nextItems.map((child) => treeToString(child)),\n \"\\n\",\n );\n if (nextOutput) output.push(nextOutput);\n renderedStaticItems.set(current.id, current.children.length);\n return;\n }\n\n for (const child of current.children) {\n visit(child);\n }\n }\n\n visit(node);\n return joinOutput(output, \"\\n\");\n}\n\nfunction createStaticOutputNode(output: string): FrescoElement | null {\n const normalized = normalizeOutput(output);\n if (!normalized) return null;\n\n const staticRoot: FrescoElement = {\n id: -1,\n type: \"box\",\n props: {\n style: {\n flexDirection: \"column\",\n },\n },\n children: [],\n parent: null,\n };\n\n staticRoot.children = normalized.split(\"\\n\").map((line, index) => ({\n id: -2 - index,\n type: \"text\",\n props: {\n text: line,\n },\n children: [],\n parent: staticRoot,\n }));\n\n return staticRoot;\n}\n\nfunction cloneDynamicTree(node: FrescoNode): FrescoElement | null {\n if (isStaticNode(node)) return null;\n\n const clone: FrescoElement = {\n id: node.id,\n type: node.type,\n props: node.props,\n children: [],\n parent: null,\n text: node.text,\n };\n\n clone.children = node.children\n .map((child) => cloneDynamicTree(child))\n .filter((child): child is FrescoElement => child !== null);\n for (const child of clone.children) {\n child.parent = clone;\n }\n\n return clone;\n}\n\nfunction createRenderTree(root: FrescoElement, staticOutput: string): FrescoElement {\n const dynamicRoot = cloneDynamicTree(root) ?? createRootElement();\n const staticOutputNode = createStaticOutputNode(staticOutput);\n\n if (staticOutputNode) {\n staticOutputNode.parent = dynamicRoot;\n dynamicRoot.children = [staticOutputNode, ...dynamicRoot.children];\n }\n\n return dynamicRoot;\n}\n\nfunction renderPlainOutput(root: FrescoNode, staticOutput: string): string {\n return joinOutput([staticOutput, treeToString(root, { skipStatic: true })], \"\\n\");\n}\n\nfunction updateAppSize(context: UseAppReturn | null, width: number, height: number) {\n if (!context) return;\n context.width.value = width;\n context.height.value = height;\n}\n\nconst CI_ENVIRONMENT_KEYS = [\"CI\", \"CONTINUOUS_INTEGRATION\", \"BUILD_NUMBER\", \"RUN_ID\"] as const;\n\nfunction isTruthyEnvironmentValue(value: string | undefined): boolean {\n if (!value) return false;\n return ![\"0\", \"false\", \"no\"].includes(value.toLowerCase());\n}\n\nfunction isCiEnvironment(env: NodeJS.ProcessEnv = process.env): boolean {\n return CI_ENVIRONMENT_KEYS.some((key) => isTruthyEnvironmentValue(env[key]));\n}\n\nfunction detectInteractiveMode(options: AppOptions): boolean {\n const stdout = options.stdout ?? process.stdout;\n return options.interactive ?? (stdout.isTTY === true && !isCiEnvironment());\n}\n\n/**\n * Create a Fresco TUI app\n */\nexport function createApp(rootComponent: AppRoot, options: AppOptions = {}): App {\n const { mouse = false, exitOnCtrlC = true, onError } = options;\n const interactive = detectInteractiveMode(options);\n const screenReaderEnabled = ref(\n options.isScreenReaderEnabled ?? isScreenReaderEnabledByDefault(),\n );\n const frameDelay = Math.max(1, Math.floor(1000 / Math.max(1, options.maxFps ?? 30)));\n let streamsContext: StreamsContext;\n const writeToStdout = (data: string) => {\n writeExternalOutput(streamsContext.stdout, data);\n };\n const writeToStderr = (data: string) => {\n writeExternalOutput(streamsContext.stderr, data);\n };\n streamsContext = createStreamsContext({\n stdin: options.stdin,\n stdout: options.stdout,\n stderr: options.stderr,\n exitOnCtrlC,\n interactive,\n writeToStdout,\n writeToStderr,\n });\n\n let vueApp: VueApp | null = null;\n let rootElement: FrescoElement | null = null;\n let mounted = false;\n let running = false;\n let needsRender = true;\n let appContext: UseAppReturn | null = null;\n let focusManager: FocusManager | null = null;\n let consoleRestore: (() => void) | null = null;\n let isWritingExternalOutput = false;\n let nonInteractiveOutput = \"\";\n let staticOutput = \"\";\n const renderedStaticItems = new Map<number, number>();\n let cursorPosition: CursorPosition | undefined;\n let hasCursorOverride = false;\n\n let exitSettled = false;\n let resolveExit: ((value?: unknown) => void) | null = null;\n let rejectExit: ((reason?: unknown) => void) | null = null;\n const exitPromise = new Promise<unknown>((resolve, reject) => {\n resolveExit = resolve;\n rejectExit = reject;\n });\n\n const { createApp: createVueApp } = createRenderer();\n\n async function mount() {\n if (mounted) return;\n\n const n = interactive ? await loadNative() : null;\n\n if (n) {\n if (typeof n.initTerminalWithOptions === \"function\") {\n n.initTerminalWithOptions({\n alternateScreen: options.alternateScreen === true,\n bracketedPaste: true,\n hideCursor: true,\n mouse,\n rawMode: true,\n });\n } else if (mouse) {\n n.initTerminalWithMouse();\n } else {\n n.initTerminal();\n }\n\n n.enableIme?.();\n\n // Initialize layout engine\n n.initLayout();\n }\n\n // Create Vue app with custom renderer\n const app = createVueApp(componentFromRoot(rootComponent));\n\n const info = n?.getTerminalInfo() ?? {\n width: streamsContext.stdout.columns ?? 80,\n height: streamsContext.stdout.rows ?? 24,\n };\n appContext = createAppContext({\n width: info.width,\n height: info.height,\n exit: (value) => {\n void unmount(value);\n },\n render,\n clear,\n waitUntilRenderFlush,\n stdout: streamsContext.stdout,\n });\n focusManager = createFocusManager();\n app.provide(APP_KEY, appContext);\n app.provide(FOCUS_KEY, focusManager);\n app.provide(SCREEN_READER_KEY, screenReaderEnabled);\n app.provide(STREAMS_KEY, streamsContext);\n app.provide(\n CURSOR_KEY,\n createCursorContext((position) => {\n hasCursorOverride = true;\n cursorPosition = position;\n needsRender = true;\n }),\n );\n\n // Create a root element for mounting\n rootElement = createRootElement();\n\n patchConsoleMethods();\n try {\n app.mount(rootElement);\n } catch (error) {\n restoreConsoleMethods();\n throw error;\n }\n vueApp = app;\n\n mounted = true;\n running = true;\n needsRender = true;\n\n // Start event loop\n void eventLoop();\n }\n\n async function unmount(errorOrResult?: unknown) {\n if (!mounted) return;\n\n running = false;\n\n if (!interactive && rootElement) {\n staticOutput = appendOutput(\n staticOutput,\n captureStaticOutput(rootElement, renderedStaticItems),\n );\n nonInteractiveOutput = renderPlainOutput(rootElement, staticOutput);\n }\n\n if (native && interactive) {\n native.disableIme?.();\n native.restoreTerminal();\n }\n\n restoreConsoleMethods();\n\n if (vueApp) {\n vueApp.unmount();\n vueApp = null;\n }\n\n if (!interactive && nonInteractiveOutput) {\n streamsContext.stdout.write(\n nonInteractiveOutput.endsWith(\"\\n\") ? nonInteractiveOutput : `${nonInteractiveOutput}\\n`,\n );\n nonInteractiveOutput = \"\";\n }\n\n rootElement = null;\n mounted = false;\n appContext = null;\n focusManager = null;\n cursorPosition = undefined;\n hasCursorOverride = false;\n\n if (!exitSettled) {\n exitSettled = true;\n if (errorOrResult instanceof Error) {\n rejectExit?.(errorOrResult);\n } else {\n resolveExit?.(errorOrResult);\n }\n }\n }\n\n async function waitUntilExit(): Promise<unknown> {\n return exitPromise;\n }\n\n async function waitUntilRenderFlush(): Promise<void> {\n return Promise.resolve();\n }\n\n function clear() {\n if (!mounted) return;\n staticOutput = \"\";\n if (!interactive) {\n nonInteractiveOutput = \"\";\n return;\n }\n if (!native) return;\n native.clearScreen();\n native.flushTerminal();\n }\n\n function writeExternalOutput(stream: NodeJS.WriteStream, data: string) {\n if (!mounted || !interactive || !native || isWritingExternalOutput) {\n stream.write(data);\n return;\n }\n\n try {\n isWritingExternalOutput = true;\n native.clearScreen();\n native.flushTerminal();\n stream.write(data);\n needsRender = true;\n render();\n } finally {\n isWritingExternalOutput = false;\n }\n }\n\n function patchConsoleMethods() {\n if (options.patchConsole === false || consoleRestore) return;\n\n const target = console as unknown as Record<ConsoleMethod, (...data: unknown[]) => void>;\n const original: Partial<Record<ConsoleMethod, (...data: unknown[]) => void>> = {};\n const patch = (method: ConsoleMethod, writer: (data: string) => void) => {\n original[method] = target[method];\n target[method] = (...args: unknown[]) => {\n writer(`${format(...args)}\\n`);\n };\n };\n\n patch(\"debug\", writeToStdout);\n patch(\"info\", writeToStdout);\n patch(\"log\", writeToStdout);\n patch(\"warn\", writeToStderr);\n patch(\"error\", writeToStderr);\n\n consoleRestore = () => {\n for (const method of consoleMethods) {\n const originalMethod = original[method];\n if (originalMethod) target[method] = originalMethod;\n }\n consoleRestore = null;\n };\n }\n\n function restoreConsoleMethods() {\n consoleRestore?.();\n }\n\n function applyCursorOverride() {\n if (!hasCursorOverride || !native) return;\n\n if (cursorPosition) {\n native.setCursor(cursorPosition.x, cursorPosition.y);\n native.showCursor();\n } else {\n native.hideCursor();\n }\n }\n\n function render() {\n if (!mounted || !rootElement) {\n return;\n }\n\n const start = performance.now();\n\n try {\n if (!interactive) {\n staticOutput = appendOutput(\n staticOutput,\n captureStaticOutput(rootElement, renderedStaticItems),\n );\n nonInteractiveOutput = renderPlainOutput(rootElement, staticOutput);\n options.onRender?.({ renderTime: performance.now() - start });\n return;\n }\n\n if (!native) {\n return;\n }\n\n staticOutput = appendOutput(\n staticOutput,\n captureStaticOutput(rootElement, renderedStaticItems),\n );\n const renderRoot = createRenderTree(rootElement, staticOutput);\n const renderNodes = screenReaderEnabled.value\n ? treeToScreenReaderRenderNodes(renderRoot)\n : treeToRenderNodes(renderRoot);\n\n // Send to native for rendering\n if (renderNodes.length > 0) {\n if (options.debug) {\n streamsContext.stderr.write(`${JSON.stringify(renderNodes, null, 2)}\\n`);\n }\n\n // Use renderTree which handles layout and painting\n native.renderTree(renderNodes);\n if (\"getLastRenderLayouts\" in native) {\n updateLastRenderLayouts(native.getLastRenderLayouts());\n }\n\n applyCursorOverride();\n\n // Flush to display\n native.flushTerminal();\n options.onRender?.({ renderTime: performance.now() - start });\n }\n } catch (error) {\n if (onError) {\n onError(error as Error);\n } else {\n console.error(\"Render error:\", error);\n }\n }\n }\n\n async function getTerminalInfo() {\n const n = await loadNative();\n const info = n.getTerminalInfo();\n return { width: info.width, height: info.height };\n }\n\n function dispatchEvent(event: InputEventNapi) {\n if (event.eventType === \"resize\") {\n const resizeEvent = {\n type: \"resize\" as const,\n width: event.width ?? 0,\n height: event.height ?? 0,\n };\n lastResizeEvent.value = resizeEvent;\n updateAppSize(appContext, resizeEvent.width, resizeEvent.height);\n return;\n }\n\n if (event.eventType === \"paste\") {\n lastPasteEvent.value = {\n type: \"paste\",\n text: event.text ?? \"\",\n };\n return;\n }\n\n if (event.eventType === \"mouse\") {\n lastMouseEvent.value = {\n type: \"mouse\",\n button: event.button ?? undefined,\n x: event.x ?? 0,\n y: event.y ?? 0,\n };\n return;\n }\n\n if (event.eventType === \"focus\") {\n lastFocusEvent.value = {\n type: \"focus\",\n focused: event.key === \"gained\",\n };\n return;\n }\n\n if (\n event.eventType === \"compositionstart\" ||\n event.eventType === \"compositionupdate\" ||\n event.eventType === \"compositionend\"\n ) {\n const type = event.eventType as CompositionEvent[\"type\"];\n lastCompositionEvent.value = {\n type,\n text: event.text ?? \"\",\n cursor: event.cursor ?? 0,\n };\n return;\n }\n\n if (event.eventType === \"key\") {\n const modifiers = event.modifiers ?? {};\n lastKeyEvent.value = {\n type: \"key\",\n key: event.key ?? undefined,\n char: event.char ?? undefined,\n ctrl: modifiers.ctrl ?? false,\n alt: modifiers.alt ?? false,\n shift: modifiers.shift ?? false,\n meta: modifiers.meta ?? false,\n super: modifiers.super ?? false,\n hyper: modifiers.hyper ?? false,\n capsLock: modifiers.capsLock ?? false,\n numLock: modifiers.numLock ?? false,\n eventType: event.keyEventType ?? undefined,\n };\n }\n }\n\n async function eventLoop() {\n const n = interactive ? await loadNative() : null;\n\n while (running) {\n try {\n const event = n?.pollEvent(16); // ~60fps\n\n if (event) {\n // Handle resize\n if (event.eventType === \"resize\") {\n n?.syncTerminalSize();\n n?.clearScreen();\n needsRender = true;\n }\n\n dispatchEvent(event);\n\n // Handle focus traversal\n if (event.eventType === \"key\" && event.key === \"tab\") {\n focusManager?.focusNext();\n needsRender = true;\n } else if (event.eventType === \"key\" && event.key === \"backtab\") {\n focusManager?.focusPrevious();\n needsRender = true;\n }\n\n // Handle Ctrl+C\n if (\n exitOnCtrlC &&\n event.eventType === \"key\" &&\n event.char === \"c\" &&\n event.modifiers?.ctrl\n ) {\n await unmount();\n break;\n }\n }\n\n // Render frame if needed\n if (needsRender) {\n render();\n needsRender = false;\n }\n\n // Schedule re-render (Vue reactivity will trigger updates)\n needsRender = true;\n } catch (error) {\n if (onError) {\n onError(error as Error);\n }\n }\n\n // Small delay to prevent busy loop\n await new Promise((resolve) => setTimeout(resolve, frameDelay));\n }\n }\n\n return {\n mount,\n unmount,\n waitUntilExit,\n waitUntilRenderFlush,\n render,\n clear,\n getTerminalInfo,\n };\n}\n\n/**\n * Ink-compatible helper that mounts immediately.\n */\nexport function render(\n root: AppRoot,\n options: AppOptions | WritableStreamLike = {},\n): RenderInstance {\n const renderOptions = normalizeRenderOptions(options);\n const rootRef = shallowRef(root);\n const Root = defineComponent({\n name: \"FrescoRenderRoot\",\n setup() {\n return () => {\n const current = rootRef.value;\n return isVNodeRoot(current) ? current : h(current);\n };\n },\n });\n\n const app = createApp(Root, renderOptions);\n void app.mount();\n\n return {\n rerender(nextRoot: AppRoot) {\n rootRef.value = nextRoot;\n app.render();\n },\n unmount: (value?: unknown) => app.unmount(value),\n waitUntilExit: () => app.waitUntilExit(),\n waitUntilRenderFlush: () => app.waitUntilRenderFlush(),\n cleanup: () => app.unmount(),\n clear: () => app.clear(),\n };\n}\n\n/**\n * Render a Fresco component to a plain string without starting a terminal app.\n */\nexport function renderToString(root: AppRoot, options: RenderToStringOptions = {}): string {\n const { createApp: createVueApp } = createRenderer();\n const app = createVueApp(componentFromRoot(root));\n const columns = options.columns ?? 80;\n const stdout = createNoopWriteStream(columns, 24);\n const stderr = createNoopWriteStream(columns, 24);\n const stdin = createNoopReadStream();\n const rootElement = createRootElement(String(columns), \"auto\");\n\n app.provide(\n APP_KEY,\n createAppContext({\n width: columns,\n height: 24,\n stdout,\n }),\n );\n app.provide(FOCUS_KEY, createFocusManager());\n app.provide(SCREEN_READER_KEY, ref(false));\n app.provide(\n CURSOR_KEY,\n createCursorContext(() => {}),\n );\n app.provide(\n STREAMS_KEY,\n createStreamsContext({\n stdin,\n stdout,\n stderr,\n interactive: false,\n writeToStdout: () => {},\n writeToStderr: () => {},\n }),\n );\n app.mount(rootElement);\n\n const renderedStaticItems = new Map<number, number>();\n const staticOutput = captureStaticOutput(rootElement, renderedStaticItems);\n const output = renderPlainOutput(rootElement, staticOutput);\n app.unmount();\n return output;\n}\n","/**\n * useIsScreenReaderEnabled - screen reader mode flag.\n */\n\nimport { inject } from \"@vue/runtime-core\";\nimport { SCREEN_READER_KEY, isScreenReaderEnabledByDefault } from \"../accessibility.js\";\n\nexport function useIsScreenReaderEnabled(): boolean {\n const enabled = inject(SCREEN_READER_KEY, null);\n return enabled?.value ?? isScreenReaderEnabledByDefault();\n}\n","/**\n * usePaste - bracketed paste handling.\n */\n\nimport { isRef, onUnmounted, ref, watch, type Ref } from \"@vue/runtime-core\";\nimport { lastPasteEvent } from \"../app.js\";\nimport { useStreamsContext } from \"./useStreams.js\";\n\nlet activePasteHandlerCount = 0;\n\nexport interface UsePasteOptions {\n /** Whether the paste handler is active */\n isActive?: boolean | Ref<boolean>;\n}\n\nexport function hasActivePasteHandlers(): boolean {\n return activePasteHandlerCount > 0;\n}\n\nfunction toRef(value: boolean | Ref<boolean>): Ref<boolean> {\n return isRef(value) ? value : ref(value);\n}\n\nexport function usePaste(handler: (text: string) => void, options: UsePasteOptions = {}) {\n const isActive = toRef(options.isActive ?? true);\n const streams = useStreamsContext();\n let rawModeEnabled = false;\n let bracketedPasteEnabled = false;\n let pasteHandlerRegistered = false;\n\n const syncRawMode = (isEnabled: boolean) => {\n if (rawModeEnabled === isEnabled) return;\n streams.setRawMode(isEnabled);\n rawModeEnabled = isEnabled;\n };\n\n const syncBracketedPasteMode = (isEnabled: boolean) => {\n if (bracketedPasteEnabled === isEnabled) return;\n streams.setBracketedPasteMode(isEnabled);\n bracketedPasteEnabled = isEnabled;\n };\n\n const syncPasteRegistration = (isEnabled: boolean) => {\n if (pasteHandlerRegistered === isEnabled) return;\n activePasteHandlerCount += isEnabled ? 1 : -1;\n pasteHandlerRegistered = isEnabled;\n };\n\n const syncActiveState = (isEnabled: boolean) => {\n syncRawMode(isEnabled);\n syncBracketedPasteMode(isEnabled);\n syncPasteRegistration(isEnabled);\n };\n\n watch(lastPasteEvent, (event) => {\n if (!event || !isActive.value) return;\n handler(event.text);\n });\n\n watch(isActive, syncActiveState, { immediate: true });\n onUnmounted(() => syncActiveState(false));\n\n return {\n isActive,\n enable: () => {\n isActive.value = true;\n },\n disable: () => {\n isActive.value = false;\n },\n };\n}\n","/**\n * useInput - Input handling composable\n */\n\nimport { isRef, onUnmounted, ref, watch, type Ref } from \"@vue/runtime-core\";\nimport { lastCompositionEvent, lastKeyEvent, lastPasteEvent, type KeyEvent } from \"../app.js\";\nimport { hasActivePasteHandlers } from \"./usePaste.js\";\nimport { useStreamsContext } from \"./useStreams.js\";\n\nexport interface Key {\n upArrow: boolean;\n downArrow: boolean;\n leftArrow: boolean;\n rightArrow: boolean;\n pageDown: boolean;\n pageUp: boolean;\n home: boolean;\n end: boolean;\n return: boolean;\n escape: boolean;\n ctrl: boolean;\n shift: boolean;\n tab: boolean;\n backspace: boolean;\n delete: boolean;\n meta: boolean;\n super: boolean;\n hyper: boolean;\n capsLock: boolean;\n numLock: boolean;\n eventType?: \"press\" | \"repeat\" | \"release\";\n}\n\nexport interface KeyHandler {\n (key: string, modifiers: { ctrl: boolean; alt: boolean; shift: boolean; meta: boolean }): void;\n}\n\nexport interface UseInputOptions {\n /** Whether to capture input (boolean or Ref<boolean>) */\n active?: boolean | Ref<boolean>;\n /** Whether to capture input (alias for active, boolean or Ref<boolean>) */\n isActive?: boolean | Ref<boolean>;\n /** Ink-compatible input callback */\n handler?: (input: string, key: Key) => void;\n /** Called on key press */\n onKey?: KeyHandler;\n /** Called on character input */\n onChar?: (char: string) => void;\n /** Called on Enter */\n onSubmit?: () => void;\n /** Called on Escape */\n onEscape?: () => void;\n /** Called on arrow keys */\n onArrow?: (direction: \"up\" | \"down\" | \"left\" | \"right\") => void;\n /** Called when an IME composition starts */\n onCompositionStart?: () => void;\n /** Called when IME preedit text changes */\n onCompositionUpdate?: (text: string, cursor: number) => void;\n /** Called when IME commits text */\n onCompositionEnd?: (text: string) => void;\n}\n\nexport interface UseInputReturn {\n isActive: Ref<boolean>;\n lastKey: Ref<string | null>;\n enable: () => void;\n disable: () => void;\n}\n\nexport type InputHandler = (input: string, key: Key) => void;\n\nexport interface UseInputHandlerOptions {\n isActive?: boolean | Ref<boolean>;\n}\n\nfunction toRef(value: boolean | Ref<boolean>): Ref<boolean> {\n return isRef(value) ? value : ref(value);\n}\n\nfunction keyName(event: KeyEvent): string {\n return event.char ?? event.key ?? \"\";\n}\n\nfunction toInkKey(event: KeyEvent): Key {\n const key = event.key;\n\n return {\n upArrow: key === \"up\",\n downArrow: key === \"down\",\n leftArrow: key === \"left\",\n rightArrow: key === \"right\",\n pageDown: key === \"pagedown\" || key === \"pageDown\",\n pageUp: key === \"pageup\" || key === \"pageUp\",\n home: key === \"home\",\n end: key === \"end\",\n return: key === \"enter\" || key === \"return\",\n escape: key === \"escape\" || key === \"esc\",\n ctrl: event.ctrl,\n shift: event.shift,\n tab: key === \"tab\" || key === \"backtab\",\n backspace: key === \"backspace\",\n delete: key === \"delete\",\n meta: event.meta,\n super: event.super,\n hyper: event.hyper,\n capsLock: event.capsLock,\n numLock: event.numLock,\n eventType: event.eventType,\n };\n}\n\nfunction emptyKey(): Key {\n return {\n upArrow: false,\n downArrow: false,\n leftArrow: false,\n rightArrow: false,\n pageDown: false,\n pageUp: false,\n home: false,\n end: false,\n return: false,\n escape: false,\n ctrl: false,\n shift: false,\n tab: false,\n backspace: false,\n delete: false,\n meta: false,\n super: false,\n hyper: false,\n capsLock: false,\n numLock: false,\n };\n}\n\nfunction inputValue(event: KeyEvent, key: Key): string {\n if (event.char) return event.char;\n if (key.return) return \"\\r\";\n return \"\";\n}\n\nfunction handleStructuredOptions(\n event: KeyEvent,\n options: UseInputOptions,\n lastKey: Ref<string | null>,\n) {\n const modifiers = {\n ctrl: event.ctrl,\n alt: event.alt,\n shift: event.shift,\n meta: event.meta,\n };\n const pressedKey = keyName(event);\n const inkKey = toInkKey(event);\n\n if (event.char) {\n lastKey.value = event.char;\n options.onChar?.(event.char);\n options.onKey?.(event.char, modifiers);\n return;\n }\n\n if (pressedKey) {\n lastKey.value = pressedKey;\n options.onKey?.(pressedKey, modifiers);\n }\n\n if (inkKey.return) options.onSubmit?.();\n if (inkKey.escape) options.onEscape?.();\n if (inkKey.upArrow) options.onArrow?.(\"up\");\n if (inkKey.downArrow) options.onArrow?.(\"down\");\n if (inkKey.leftArrow) options.onArrow?.(\"left\");\n if (inkKey.rightArrow) options.onArrow?.(\"right\");\n}\n\nexport function useInput(handler: InputHandler, options?: UseInputHandlerOptions): UseInputReturn;\nexport function useInput(options?: UseInputOptions): UseInputReturn;\nexport function useInput(\n handlerOrOptions: InputHandler | UseInputOptions = {},\n handlerOptions: UseInputHandlerOptions = {},\n): UseInputReturn {\n const options =\n typeof handlerOrOptions === \"function\"\n ? { handler: handlerOrOptions, isActive: handlerOptions.isActive }\n : handlerOrOptions;\n\n const activeSource = options.isActive ?? options.active ?? true;\n const isActive = toRef(activeSource);\n const lastKey = ref<string | null>(null);\n const streams = useStreamsContext();\n let rawModeEnabled = false;\n\n const syncRawMode = (isEnabled: boolean) => {\n if (rawModeEnabled === isEnabled) return;\n streams.setRawMode(isEnabled);\n rawModeEnabled = isEnabled;\n };\n\n watch(lastKeyEvent, (event) => {\n if (!event || !isActive.value) return;\n\n const inkKey = toInkKey(event);\n const input = inputValue(event, inkKey);\n const pressedKey = keyName(event);\n\n if (input === \"c\" && inkKey.ctrl && streams.internal_exitOnCtrlC) return;\n\n lastKey.value = pressedKey || null;\n options.handler?.(input, inkKey);\n handleStructuredOptions(event, options, lastKey);\n });\n\n watch(lastPasteEvent, (event) => {\n if (!event || !isActive.value || hasActivePasteHandlers()) return;\n\n lastKey.value = event.text;\n options.handler?.(event.text, emptyKey());\n options.onChar?.(event.text);\n });\n\n watch(lastCompositionEvent, (event) => {\n if (!event || !isActive.value) return;\n\n if (event.type === \"compositionstart\") {\n options.onCompositionStart?.();\n } else if (event.type === \"compositionupdate\") {\n options.onCompositionUpdate?.(event.text, event.cursor);\n } else {\n options.onCompositionEnd?.(event.text);\n }\n });\n\n watch(isActive, syncRawMode, { immediate: true });\n onUnmounted(() => syncRawMode(false));\n\n const enable = () => {\n isActive.value = true;\n };\n\n const disable = () => {\n isActive.value = false;\n };\n\n return {\n isActive,\n lastKey,\n enable,\n disable,\n };\n}\n\n/**\n * Shorthand for handling specific key combinations\n */\nexport function useKeyPress(\n key: string,\n handler: () => void,\n options: { ctrl?: boolean; alt?: boolean; shift?: boolean; meta?: boolean } = {},\n) {\n const { ctrl = false, alt = false, shift = false, meta = false } = options;\n\n useInput({\n onKey: (pressedKey, modifiers) => {\n const matches =\n pressedKey.toLowerCase() === key.toLowerCase() &&\n modifiers.ctrl === ctrl &&\n modifiers.alt === alt &&\n modifiers.shift === shift &&\n modifiers.meta === meta;\n\n if (matches) {\n handler();\n }\n },\n });\n}\n"],"mappings":";;;AAQA,MAAa,oBACX,OAAO,uBAAuB;AAqChC,SAAgB,iCAA0C;CACxD,OAAO,QAAQ,IAAI,sBAAsB,UAAU,QAAQ,IAAI,yBAAyB;;AAG1F,SAASA,cAAY,OAAoC;CACvD,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU,OAAO,OAAO,MAAM;;AAIlF,SAASC,WAAS,MAA0B;CAC1C,MAAM,YAAYD,cAAY,KAAK,MAAM,cAAc;CACvD,IAAI,cAAc,KAAA,GAAW,OAAO;CACpC,IAAI,KAAK,SAAS,KAAA,GAAW,OAAO,KAAK;CAEzC,MAAM,WAAW,KAAK,MAAM,QAAQ,KAAK,MAAM;CAC/C,IAAI,OAAO,aAAa,YAAY,OAAO,aAAa,UAAU,OAAO,OAAO,SAAS;CAEzF,IAAI,KAAK,SAAS,SAAS;EACzB,MAAM,QAAQ,KAAK,MAAM;EACzB,MAAM,cAAc,KAAK,MAAM;EAC/B,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU,OAAO,OAAO,MAAM;EAChF,IAAI,OAAO,gBAAgB,YAAY,OAAO,gBAAgB,UAC5D,OAAO,OAAO,YAAY;;CAG9B,OAAO;;AAGT,SAAS,cAAc,MAA0B;CAC/C,MAAM,QAAS,KAAK,MAAM,SAAS,EAAE;CACrC,OAAOA,cAAY,MAAM,iBAAiB,MAAM,eAAe,IAAI;;AAGrE,SAAS,SAAS,MAAwC;CACxD,OAAOA,cAAY,KAAK,MAAM,aAAa;;AAG7C,SAAS,UAAU,MAAyC;CAC1D,MAAM,QAAQ,KAAK,MAAM;CACzB,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU,OAAO,KAAA;CAChD,OAAO;;AAGT,SAAS,aAAa,MAA2B;CAC/C,OAAO,KAAK,MAAM,mBAA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AC,SAAS,CAAC,SAAS,OAAO;EAE/B,IAAI,MAAM,SAAS,oBACjB,QAAQ,sBAAsB;OACzB,IAAI,MAAM,SAAS,qBACxB,QAAQ,sBAAsB,MAAM,MAAM,MAAM,OAAO;OAEvD,QAAQ,mBAAmB,MAAM,KAAK;GAExC;CAEF,MAAM,UAAU,aAAa,EAAE,WAAW,MAAM,CAAC;CACjD,kBAAkB,YAAY,MAAM,CAAC;CAErC,MAAM,eAAe;EACnB,SAAS,QAAQ;;CAGnB,MAAM,gBAAgB;EACpB,SAAS,QAAQ;;CAGnB,OAAO;EACL;EACA;EACA;EACA;EACD;;;;;AAMH,SAAgB,YACd,KACA,SACA,UAA8E,EAAE,EAChF;CACA,MAAM,EAAE,OAAO,OAAO,MAAM,OAAO,QAAQ,OAAO,OAAO,UAAU;CAEnE,SAAS,EACP,QAAQ,YAAY,cAAc;EAQhC,IANE,WAAW,aAAa,KAAK,IAAI,aAAa,IAC9C,UAAU,SAAS,QACnB,UAAU,QAAQ,OAClB,UAAU,UAAU,SACpB,UAAU,SAAS,MAGnB,SAAS;IAGd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/fresco",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.103.0",
|
|
4
4
|
"description": "Vue TUI framework - Build terminal UIs with Vue.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@vizejs/fresco-native": "0.
|
|
44
|
+
"@vizejs/fresco-native": "0.103.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "25.7.0",
|
|
@@ -52,6 +52,9 @@
|
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@vue/runtime-core": "^3.4.0"
|
|
54
54
|
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22"
|
|
57
|
+
},
|
|
55
58
|
"scripts": {
|
|
56
59
|
"build": "vp pack",
|
|
57
60
|
"dev": "vp pack --watch",
|