Releases: Pondworks-lib/frog
Releases · Pondworks-lib/frog
Release v0.0.9
Focused pre-release aimed at hardening the Frog core ahead of v0.1.0.
Added
- Structured runtime errors with stable codes
FROG201..FROG208. - Extended validator coverage with new issue codes
FROG011,FROG109, andFROG110. frog.InspectModel(...)plus exported validation report/types for tooling and diagnostics.KeyMap,KeyBinding, andfrog.RenderKeyHelp(...)for lightweight in-app key help.frog.NewThrottledRenderer(...)for FPS-capped rendering.- Core tests covering renderer behavior, runtime safety, and validator rules.
Changed
frog.Runandfrog.RunContextnow return structured runtime errors for nil models/renderers, panics inInit/View/Update/Cmd, and nil models returned fromUpdate.- Renderer diffing now falls back to full repaint when wrapped lines make line-by-line updates unsafe.
- Full-frame rendering now uses Windows-safe output, fixing multi-line layout drift and stale fragments in wrapped views.
- Validator now blocks only on real errors; warning-only reports remain available through
frog.InspectModel(...). - Validator now detects typed-nil models and validates
Init()/Update()signatures more strictly. - Input and resize delivery are now context-aware, reducing blocked sends during shutdown.
- Windows VT handling is more robust for both output and input modes.
- Public docs and exported API comments were cleaned up ahead of release.
Notes
ValidateModel(...)is still the default gate infrog.Run(...), but warnings no longer stop app startup.InspectModel(...)is the recommended entry point for tooling, examples, and validator-focused workflows.View()should remain fast and side-effect free; the renderer is now more defensive around multi-line and wrapped content.v0.0.9is the stabilization pass before the plannedv0.1.0API freeze.
Release v0.0.6
Added
- Runtime Model Validator with stable error codes (FROG001..FROG010, FROG101..FROG108).
- Colored, structured error output; compact by default, detailed with
FROG_VALIDATE_FULL=1. - Timeout diagnostics try to include source location (file:line).
Changed
frog.Runandfrog.RunContextnow validate models before starting.
No need to import anyvalidatepackage in apps.
Notes
View()andInit()are invoked once during validation (guarded & time-limited).
KeepView()side-effect free and fast.- Env controls:
FROG_VALIDATE_FULL=1→ detailed sections (Errors/Warnings)FROG_COLOR=on|off(overrides detection)NO_COLORhonored
- Advanced users can bypass validation via
frog.NewApp(...).Run().
Release v0.0.5
Features
- Added mouse support (SGR mode): click, drag, wheel, coordinates with modifiers
- Added bracketed paste support: safe handling of multiline pasted input
Improvements
- Improved shutdown process: renderer and terminal state are restored more reliably
- Refined input parser: better escape sequence handling, UTF-8 decoding, and control byte filtering
- Introduced new options
WithMouse()andWithBracketedPaste()for explicit feature enabling
Breaking Changes
PasteMsgnow exposes fieldText(previouslyData)MouseMsgnow usesActionandButtoninstead ofEvent- Examples must be updated accordingly
Upgrade Notes
- Add
frog.WithMouse()to enable mouse support - Add
frog.WithBracketedPaste()to enable paste support - Update code using
PasteMsg.DataorMouseMsg.Eventto the new fields
Release v0.0.4
This release stabilizes the Frog core runtime for both interactive TUIs and non-interactive CLI/CI pipelines.
Highlights
Custom I/O
- Added
WithOut(io.Writer)andWithIn(io.Reader)to redirect output/input. - Works seamlessly with files, pipes, or test environments.
Non-interactive mode
WithNonInteractive()skips raw mode and input loops.- Automatically enabled when output is not a TTY.
- View is rendered once with ANSI stripped for clean CLI/CI logs.
Context-aware sessions
NewAppWithContextandRunContextprovide context-bound control and cancellation.
Improved robustness
- Panic recovery with proper terminal restore.
- Configurable resize polling interval with
WithResizeInterval. - Pluggable
LoggerviaWithLogger.
Command system
- New
Batchcombinator for running multiple commands sequentially.
Input handling
- Refactored to work with any
io.Reader. - Added
KeyQfor consistent quit handling.
Renderer
- Honors
NO_COLOR, detects TTY, strips ANSI when needed.
Notes
- Breaking change: quitting via
"q"is now consistently exposed asKeyQinstead of a genericKeyRune.
Release v0.0.3
This release introduces color and layout support, making Frog more expressive and professional for building TUIs.
Highlights
Color system
- Support for ANSI 16, ANSI 256, and TrueColor.
Stylestruct with chaining methods (Fg,Bg,Bolded,Underlined, etc.).- Named colors (
ColorRed,ColorBrightGreen, …). Colorizehelper for quick styled output.StripANSIutility for safe width calculations and plain rendering.
Layout utilities
- Horizontal and vertical alignment (left, center, right / top, middle, bottom).
CenterandPlaceBlockhelpers to position blocks inside a terminal area.- Proper width calculation ignoring ANSI codes.
Renderer improvements
- Auto-detect color profile (
NO_COLOR,COLORTERM, TERM, TTY check). - Option to force a specific profile with
WithColorProfile. - Safe ANSI stripping when colors are disabled.
Input improvements
- Added
KeyQfor quit shortcut. - Unified handling of UTF-8, ESC sequences, and Alt-modified keys.
Re-exports in frog.go
- Color constants and helpers (
NewStyle,RGB,ANSI256). - Layout helpers (
Center,PlaceBlock). - Renderer options (
WithDiff,WithColorProfile).
Examples
example/counter: refined keyboard handling.example/dashboard: mock CPU/RAM dashboard with aligned layout.example/loading: color loading animation with styles.example/progress-static: static gradient progress bar centered on screen.
Notes
This release sets the foundation for professional-grade TUIs with styled text, alignment, and color rendering. Future versions will expand components, widgets, and themes.
Frog v0.0.1 – Initial Pre-Release
Overview
This is the initial pre-release of Frog, the core TUI framework developed under the Pondworks organization.
Frog provides the foundation for building modern, reactive terminal user interfaces in Go, following the MUV pattern (Model, Update, View).
Highlights
- Introduced the
Sessionruntime to manage model lifecycle, rendering, input, and system signals. - Added message types (
Msg,KeyMsg,TickMsg,QuitMsg,ResizeMsg) for structured event handling. - Implemented command utilities:
Cmd,Batch,Tick,Quit,Nil
- Basic ANSI renderer with efficient diff rendering.
- Input system with raw mode and key event handling.
- Cross-platform support for enabling ANSI/VT sequences (Windows and Unix).
- Clean API re-export at the root level (
frog.go).
Next Steps
- Add more widgets and abstractions in the upcoming libraries (
lily,pad,splash,ripple). - Expand testing and provide official examples.
- Improve developer documentation.