Skip to content

v0.1.0

Latest

Choose a tag to compare

@muhammad-fiaz muhammad-fiaz released this 27 Nov 11:55
· 7 commits to main since this release
eb61034

What's New

This release migrates tui.zig to Zig 0.17+ with zero C dependencies and introduces a redesigned core runtime, double-buffered cell diff rendering, a constraint-based Ui layout context, deterministic headless snapshot testing, and an expanded 40+ widget suite.

Highlights & Core Architecture

  • Zig 0.17+ Toolchain & Zero C Dependencies: Built for Zig 0.17+ using native Win32 Console APIs on Windows and native POSIX interfaces (termios, poll, TIOCGWINSZ, SIGWINCH) on Linux, macOS, and BSD—supporting both 32-bit and 64-bit targets without linking ncurses or libc.
  • Allocator-Owning App Runtime: Initialize once via tui.init(allocator, options) to manage front/back cell buffers, a capacity-retaining scratch arena, EventParser, live terminal window titles (app.setTitle(...)), AppInfo metadata (ui.app), and clean terminal mode restoration on defer app.deinit().
  • Flicker-Free Double-Buffered Rendering: Diffs front and back cell grids per frame, writes only modified spans with delta SGR transitions, preserves column alignment for wide CJK and emoji clusters, emits OSC 8 clickable links, and brackets frames with synchronized output (CSI ? 2026 h/l).
  • Constraint & Responsive Layout Engine: Partition screens on the stack using rows, cols, and splitFixed with fixed sizes, percentages, ratios, min/max bounds, weighted .fill, flex spacing, edge-merged borders, and responsive breakpoint helpers (ui.isCompact).
  • Modular Internal Architecture: Reorganized the codebase into unified core, style, text, event, backend (ansi, capabilities, memory, posix, windows), terminal, and widgets modules, wired with tint (0.0.2) and zigantic (0.0.5).

Widgets, Styling & Internationalization

  • 40+ Widgets & Shell Components:
    • Navigation & Layout: Navbar, Left (LTR) / Right (RTL) Sidebar, cascading DropdownMenu / MenuState (with submenus and checkmarks), StatusBar, Block (edge collapsing, shadows, compact guards), Tabs, Accordion, Stepper, Pagination (sliding page window), Popup, and overflow-safe ToastManager.
    • Text, Inputs & Data: Wrapping paragraphs, Markdown viewer, tables, lists, collapsible Tree (expandAll / collapseAll), live-validated TextInput & multi-line TextArea (with selection and compact border fallback), switches, sliders, Calendar, command palettes, KeyValueList, LogViewer (per-source EWIDT target matrix and match highlighting), DiffViewer, and an embedded TerminalView (VtScreen in-memory VT100/ANSI screen buffer).
    • Charts, Motion & Extensibility: Gauges, sparklines, bar charts, XY Chart (.area, .step, .line, .scatter, .bar), PieChart (.solid, .segmented, .hud, .rose), Heatmap, vector canvases, Tween/Spring/Transition motion primitives, Skeleton loading shimmers, tui.fx buffer effects, and zero-vtable custom widget dispatch (ui.renderWidget and ui.renderStateful).
  • OKLCH Colors & 17 Built-In Themes: Supports 24-bit RGB, HSL, HSV, Hex, CSS named colors, and native Color.oklch, alongside 26 OKLCH color families, perceptual gradient interpolation (palette.gradientColors), automatic degradation to ANSI-256 and ANSI-16 terminals, JSON theme loading, and 17 built-in presets.
  • Fonts, RTL & Client-Owned Locales: Introduces text.BitmapFont / BitmapGlyph, RTL visual ordering, grapheme-aware text wrapping, and a client-owned text.Locale configuration struct.
  • Inline Scrollback & Headless CI Testing: Supports fullscreen alternate screens, fixed sub-rectangles, .inline_height viewports that append to scrollback via insertBefore, and an in-memory backend for deterministic unit tests and app.snapshot() / app.snapshotAlloc() verification.

Examples, Documentation & Tooling

  • 38 Runnable Examples: Replaced legacy demos with 38 standalone examples (including app_shell, custom_fonts_and_i18n, custom_event_loop, animations_and_effects, and examples/advanced/ applications), all tested via zig build run-all-examples (--headless).
  • Rebuilt Documentation: Updated VitePress guides and API references across docs/api/ and docs/guides/, along with CI workflows, README.md, CONTRIBUTING.md, and SECURITY.md.

Breaking Changes

Note

This release introduces breaking architectural and API changes across the library as part of the Zig 0.17+ migration. Existing applications upgrading to this version will need to update their toolchain and imports accordingly.

  • Toolchain Requirement: Minimum supported Zig version is now 0.17+.