These libraries are experimental. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.

Vaxis

@korulang/vaxis@0.0.1

Terminal UI library for Koru wrapping libvaxis with phantom type obligations

vaxis/index.kz · 39 tors

Koru Vaxis Library — Reactive TUI wrapper, effect-branch shape · 28 more lines
Koru Vaxis Library — Reactive TUI wrapper, effect-branch shape `run` is a single long-running proc that owns the terminal for its entire body: init → loop emitting effects → deinit. Consumers handle terminal events as effect branches; they don't write an outer loop. USAGE: ~import koru/vaxis ~koru/vaxis:run(title: "Hello") ! draw _ |> koru/vaxis:write-at(x: 2, y: 2, text: "Hello! Press q to quit.") ! char k when k.ch == 'q' |> koru/vaxis:quit() | done _ |> _ | err e |> _ draw refires on every damage event and run auto-renders — no explicit render() calls. Input arrives decoded: ! char for text, ! up / ! enter / ! escape … for named keys, ! wheel-up / ! press … for the mouse, with ! key-raw / ! mouse-raw as the taps. MODULE-SCOPE REACH-BACK ($mod.): `run` is an effect-branch event, so its |zig body is SPLICED into the consumer's frame (cut-1 inlining) — where this module's bare names don't exist. Every reference to this module's own state (the vars/consts below) from inside a proc body uses the sanctioned `$mod.` spelling so the emitter rewrites it to the right namespace on the splice path and strips it to bare names on the standalone-handler path. `std` is exempt (it auto-rewrites to @import("std")). See koru pin 400_155 for the contract.

run

comptimetransform index.kz:373

mouse-decode

index.kz:988

write-at

index.kz:1016

write-styled

index.kz:1044

sub-from-bottom

index.kz:1102

sub-fill

index.kz:1119

stack-row

index.kz:1148

write-in

index.kz:1163

progress-bar

index.kz:1179

stopwatch

index.kz:1416

text-input

index.kz:1476

viewport

index.kz:1780

wrap-lines

index.kz:1798

scrollview

index.kz:1812

paginator

index.kz:1835

filepicker

index.kz:2299

textarea

index.kz:2416

view

comptimetransform index.kz:2585

default

keywordcomptimetransformpre index.kz:2720

shader

comptimetransformpre index.kz:2931

component

comptimetransformpre index.kz:3594