Expand description
Core: terminal lifecycle, capability detection, events, and input parsing.
§Role in FrankenTUI
ftui-core is the input layer. It owns terminal session setup/teardown,
capability probing, and normalized event types that the runtime consumes.
§Primary responsibilities
- TerminalSession: RAII lifecycle for raw mode, alt-screen, and cleanup.
- Event: canonical input events (keys, mouse, paste, resize, focus).
- Capability detection: terminal features and overrides.
- Input parsing: robust decoding of terminal input streams.
§How it fits in the system
The runtime (ftui-runtime) consumes ftui-core::Event values and drives
application models. The render kernel (ftui-render) is independent of
input, so ftui-core is the clean bridge between terminal I/O and the
deterministic render pipeline.
Modules§
- animation
- Composable animation primitives.
- capability_
override - Runtime capability override injection for testing (bd-k4lj.3).
- cursor
- Cursor save/restore strategy for inline mode robustness.
- event
- Canonical input/event types.
- event_
coalescer - Event coalescing for high-frequency input events.
- geometry
- Geometric primitives.
- gesture
- Gesture recognition: transforms raw terminal events into semantic events.
- glyph_
policy - Glyph capability policy (Unicode/ASCII, emoji, and width calibration).
- hover_
stabilizer - Hover jitter stabilization using CUSUM change-point detection.
- inline_
mode - Inline Mode Spike: Validates correctness-first inline mode strategies.
- input_
parser - Input parser state machine.
- key_
sequence - Key sequence interpreter for multi-key sequences (bd-2vne.2).
- keybinding
- Keybinding sequence detection and action mapping.
- logging
- Logging and tracing support.
- mux_
passthrough - Multiplexer passthrough wrappers for escape sequences.
- semantic_
event - High-level semantic events derived from raw terminal input (bd-3fu8).
- terminal_
capabilities - Terminal capability detection model with tear-free output strategies.
- terminal_
session - Terminal session lifecycle guard.
- text_
width - Shared display width helpers for layout and rendering.
Macros§
- debug
- No-op debug macro when tracing is disabled.
- debug_
span - No-op debug_span macro when tracing is disabled.
- error
- No-op error macro when tracing is disabled.
- error_
span - No-op error_span macro when tracing is disabled.
- info
- No-op info macro when tracing is disabled.
- info_
span - No-op info_span macro when tracing is disabled.
- trace
- No-op trace macro when tracing is disabled.
- trace_
span - No-op trace_span macro when tracing is disabled.
- warn
- No-op warn macro when tracing is disabled.
- warn_
span - No-op warn_span macro when tracing is disabled.