libghostty 0.0.5
libghostty: ^0.0.5 copied to clipboard
Dart bindings to libghostty-vt, the terminal emulator library from Ghostty.
Changelog #
0.0.5 #
Breaking #
- Upstream C API migration: replaced the custom
terminal-c-api.patchwith upstream Ghostty's natively exposed C headers. This is a complete rewrite of the bindings and implementation layer. - Restructured public API: the package barrel (
libghostty.dart) has a new export structure. Most types have been renamed or moved. - Removed types:
Line,Screen,Scrollback,TerminalOptions,TerminalEvent,TerminalModes,Disposable,Result. - Removed sub-barrels:
input.dartandparsing.dartare removed. Import everything fromlibghostty.dart.
Added #
- Mouse encoding:
MouseEncoderandMouseEventfor encoding mouse events into terminal escape sequences (X10, UTF-8, SGR, URxvt, SGR-Pixels). - Build info:
LibGhosttyBuildInfoexposes compile-time feature flags (SIMD, Kitty graphics, tmux passthrough) and version info. - Terminal modes:
TerminalModeprovides typed access to DEC private and ANSI modes with DECRPM report encoding. - Render state:
RenderStatefor efficient viewport snapshotting with two-layer dirty tracking (global + per-row). - Grid references:
GridReffor ad-hoc cell lookups by coordinate. - Formatter:
Formatterfor serializing terminal content as plain text, HTML, or full VT state. - Terminal effects: callback-based event model (
onWritePty,onBell,onTitleChanged, etc.) replacing theTerminalEventstream. - Focus and size report encoding:
FocusEventEncodeandSizeReportStyleEncodeextension types. - Programmatic ffigen: replaced declarative
ffigen.yamlwith a Dart driver that generates three specialized output files (native FFI, enums, WASM typed exports).
Changed #
- Bumped upstream ghostty to
b7e56044d. - Generated enums replace hand-written
src/enums/directory. - Bindings reorganized into
native/,wasm/, andtypes/directories. - Implementation layer reorganized into
src/impl/withkey/,mouse/, andterminal/subdirectories.
0.0.4 #
Added #
- Hyperlink support:
CellandScrollbackRowexpose OSC 8 hyperlink URIs via ahyperlinkfield. - Screen mode:
TerminalModesexposesscreenModeto distinguish primary and alternate screen. - Mouse alternate scroll:
TerminalModesexposesmouseAlternateScrollflag. - Mods toggle operator:
^operator onModsfor bitwise XOR toggling of modifier flags.
Fixed #
- Scrollback on alternate screen:
scrollbackLengthreturns zero when the terminal is on the alternate screen instead of stale values.
Changed #
- Bumped upstream ghostty to
04fa71e23.
0.0.3 #
0.0.2 #
Added #
- Sealed
TerminalEventhierarchy: typed events (BellReceived,TitleChanged,CursorChanged,MouseShapeChanged,ResponseReceived,ScreenChanged,ModeChanged) replace ad-hoc state polling. TerminalOptions: configure foreground/background color and scrollback limit at terminal creation.- Mouse support:
MouseShapeandMouseTrackingexposed via the terminal API. DirtyStateenum:clean/partial/fullfor render-level dirty tracking onScreen.- Reusable viewport buffer:
Screenreuses a single buffer across reads, reducing per-frame allocations. - Row wrapping detection:
ScreenandScrollbackreport whether a row is soft-wrapped. - Scrollback grapheme support:
Scrollbackreturns full grapheme clusters. CellWidthandSemanticContent: new cell metadata types.- 256-color palette: CIELAB interpolation and full 256-color palette generation with base16 theme support.
Changed #
TerminalViewportremoved: viewport reading now lives onScreendirectly.- Bumped upstream ghostty to
055ed285.
0.0.1 - 2026-02-25 #
Added #
- Terminal emulation: Full VT parser and screen buffer
- Screen, Line, Cell API for inspecting terminal content
- Cursor control and styling
- Terminal modes tracking
- Scrollback buffer support
- Key encoding: Kitty keyboard protocol implementation
- KeyEvent, KeyAction, Mods for key handling
- KeyEncoder for encoding key events to bytes
- SGR parsing: Parse Select Graphic Rendition escape sequences
- OSC parsing: Parse Operating System Commands (window title, hyperlinks)
- Paste validation: Security-focused paste validation to prevent injection attacks
- WASM support: WebAssembly build for browser environments
Supported Platforms #
- Android, iOS, macOS, Linux, Windows, Web
0.0.1-dev.3 #
- Fix release artifact filenames and download URLs
0.0.1-dev.2 #
- Add release automation with build and release workflows
- Add download_asset_hashes.dart script for preparing releases
0.0.1-dev.1 #
- Initial pre-release