tuil
ReferencePackages

@mwillbanks/tuil-ink

Ink renderer, terminal input, semantics, primitives, and overlays for tuil.

View rawEdit

Overview

Ink renderer, terminal input, semantics, primitives, and overlays for tuil.

@mwillbanks/tuil-ink is independently installable and also participates in the umbrella @mwillbanks/tuil runtime where applicable.

Installation

npm install @mwillbanks/tuil-ink

How it operates

The Ink adapter composes runtime, theme, focus, hotkeys, semantics, overlays, and terminal input around Ink rendering. It supports interactive output, static output, and capability-aware fallbacks.

Documentation flow diagram. create runtime tree; attach input; render; wait or snapshot; unmount; S0 leads to S1; S1 leads to S2; S2 leads to S3
Documentation flow diagram. create runtime tree; attach input; render; wait or snapshot; unmount; S0 leads to S1; S1 leads to S2; S2 leads to S3

API

APISignatureDescription
Alertfunction AlertPublic function Alert.
AlertPropsinterface AlertPropsPublic interface AlertProps.
AppBarfunction AppBarPublic function AppBar.
AppShellfunction AppShellPublic function AppShell.
Badgefunction BadgePublic function Badge.
BadgePropsinterface BadgePropsPublic interface BadgeProps.
Boxfunction BoxPublic function Box.
BoxPropsinterface BoxPropsPublic interface BoxProps.
Buttonfunction ButtonPublic function Button.
ButtonPropsinterface ButtonPropsPublic interface ButtonProps.
CommonComponentPropsinterface CommonComponentPropsPublic interface CommonComponentProps.
Containerfunction ContainerPublic function Container.
ContainerPropsinterface ContainerPropsPublic interface ContainerProps.
createRuntimeElementfunction createRuntimeElementPublic function createRuntimeElement.
DismissableLayerfunction DismissableLayerPublic function DismissableLayer.
Dividerfunction DividerPublic function Divider.
DividerPropsinterface DividerPropsPublic interface DividerProps.
escapeTerminalControlCharactersexport escapeTerminalControlCharactersPublic export escapeTerminalControlCharacters.
ExternalSnapshotStoreinterface ExternalSnapshotStorePublic interface ExternalSnapshotStore.
Headingfunction HeadingPublic function Heading.
HeadingPropsinterface HeadingPropsPublic interface HeadingProps.
HStackfunction HStackPublic function HStack.
InkRendererBackendclass InkRendererBackendPublic class InkRendererBackend.
InkRendererTreetype InkRendererTreePublic type InkRendererTree.
Overlayfunction OverlayPublic function Overlay.
OverlayPropsinterface OverlayPropsPublic interface OverlayProps.
OverlayProviderfunction OverlayProviderPublic function OverlayProvider.
OverlayStatusinterface OverlayStatusPublic interface OverlayStatus.
PointerEventBindinginterface PointerEventBindingPublic interface PointerEventBinding.
Progressfunction ProgressPublic function Progress.
ProgressPropsinterface ProgressPropsPublic interface ProgressProps.
renderfunction renderPublic function render.
renderStaticfunction renderStaticPublic function renderStatic.
renderTerminalImagefunction renderTerminalImagePublic function renderTerminalImage.
resolveSemanticNodefunction resolveSemanticNodePublic function resolveSemanticNode.
ResponsiveStackfunction ResponsiveStackPublic function ResponsiveStack.
ResponsiveStackPropsinterface ResponsiveStackPropsPublic interface ResponsiveStackProps.
SemanticNodeinterface SemanticNodePublic interface SemanticNode.
SemanticProviderfunction SemanticProviderPublic function SemanticProvider.
SemanticRegistryclass SemanticRegistryPublic class SemanticRegistry.
Spinnerfunction SpinnerPublic function Spinner.
SpinnerPropsinterface SpinnerPropsPublic interface SpinnerProps.
Stackfunction StackPublic function Stack.
StackPropsinterface StackPropsPublic interface StackProps.
StatusBarfunction StatusBarPublic function StatusBar.
TerminalImagefunction TerminalImagePublic function TerminalImage.
TerminalImagePropsinterface TerminalImagePropsPublic interface TerminalImageProps.
TerminalImageSourceinterface TerminalImageSourcePublic interface TerminalImageSource.
TerminalInputHandlerexport TerminalInputHandlerPublic export TerminalInputHandler.
TerminalInputLayerexport TerminalInputLayerPublic export TerminalInputLayer.
TerminalScrollAreaOptionsinterface TerminalScrollAreaOptionsPublic interface TerminalScrollAreaOptions.
TerminalSemanticNodefunction TerminalSemanticNodePublic function TerminalSemanticNode.
TerminalSemanticNodePropsinterface TerminalSemanticNodePropsPublic interface TerminalSemanticNodeProps.
TerminalSizeinterface TerminalSizePublic interface TerminalSize.
Textfunction TextPublic function Text.
TextPropsinterface TextPropsPublic interface TextProps.
TuilRenderInstanceinterface TuilRenderInstancePublic interface TuilRenderInstance.
TuilRenderOptionsinterface TuilRenderOptionsPublic interface TuilRenderOptions.
useOptionalExternalStorefunction useOptionalExternalStorePublic function useOptionalExternalStore.
useOverlayStatusfunction useOverlayStatusPublic function useOverlayStatus.
usePointerCapturefunction usePointerCapturePublic function usePointerCapture.
usePointerEventfunction usePointerEventPublic function usePointerEvent.
usePointerEventsfunction usePointerEventsPublic function usePointerEvents.
useSemanticNodefunction useSemanticNodePublic function useSemanticNode.
useSemanticRegistryfunction useSemanticRegistryPublic function useSemanticRegistry.
useTerminalInputexport useTerminalInputPublic export useTerminalInput.
useTerminalScrollAreafunction useTerminalScrollAreaPublic function useTerminalScrollArea.
useTerminalSizefunction useTerminalSizePublic function useTerminalSize.
useTerminalViewportfunction useTerminalViewportPublic function useTerminalViewport.
VStackfunction VStackPublic function VStack.

Events and lifecycle

Input first flows through overlay handlers, scoped terminal handlers, hotkeys, then focus traversal. Application events remain on the runtime event bus.

All subscriptions and registrations return a disposer or belong to an owning runtime that disposes them in reverse order.

Example

import { render } from "@mwillbanks/tuil-ink";

const instance = render(<App />, { app });
await instance.waitUntilExit();

On this page