yves-biener
5831a8e2d2
mod: non blocking read of stdin regardless of raw mode option
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 11m42s
2026-06-03 22:50:24 +02:00
yves-biener
cb262aa51f
mod: use unbuffered streaming writer for TUIs
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 15m36s
2026-06-03 17:39:11 +02:00
yves-biener
24a08e0e62
mod: bump zig version to 0.16.0
2026-05-19 23:08:32 +02:00
yves-biener
bdf58f5102
mod(example): direct rendering "q" to quit
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 2m58s
2026-05-09 20:59:24 +02:00
yves-biener
312fbedf4c
mod(renderer/direct): buffer and flush screen output accordingly
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m31s
2026-04-02 09:53:37 +02:00
yves-biener
b39d4326be
mod(app): remove interupt method, merged with stop
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m13s
2026-02-13 13:27:58 +01:00
yves-biener
0bb91cab0d
mod(app): SIG.INT handler for Ctrl-C which issues a .cancel event
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m28s
2026-02-02 21:28:21 +01:00
yves-biener
6781c43fcc
add(renderer/direct): write newline function to align view if necessary
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m8s
2026-01-27 15:33:35 +01:00
yves-biener
eb36c7c410
fix: correctly read inputs from *stdin* when not using *raw mode*
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m6s
2026-01-23 12:44:48 +01:00
yves-biener
4441f1b933
feat(app): event line provides entire line contents as a single event; add(event): .cancel event
...
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m5s
Introduce `.cancel` event that is fired when the user sends EOF
in *non raw mode* renderings. The event `.line` now sends the
entire line (even if larger than the internal buffer) but requires
now an `Allocator`.
2026-01-22 08:56:12 +01:00
yves-biener
39fb8af174
fix(app): do not reset remaining bytes after reading
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m15s
2026-01-22 07:15:46 +01:00
yves-biener
bfbe75f8d3
feat(inline): rendering without alternate screen
...
Zig Project Action / Lint, Spell-check and test zig project (pull_request) Successful in 1m10s
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 55s
Fix issue with growth resize for containers with corresponding
borders, padding and gaps.
2026-01-20 23:09:16 +01:00
yves-biener
89517b2546
fix: add newly introduced parameter for App.start function to all corresponding usages
2026-01-20 15:16:10 +01:00
yves-biener
a71d808250
add: .line core event for line contents in non *raw mode* instead of .key core events
...
The end of the `.line` event received contents is highlighted by a trailing newline
(which cannot occur before, as that triggers the line event itself).
Add signal handler for SIGCONT which forces a `.resize` event that should re-draw the
contents after continuing a suspended application (i.e. ctrl+z followed by `fg`).
2026-01-20 15:11:19 +01:00
yves-biener
97a240c54d
mod: example shows how dynamic sizing is achived that can be independent form the reported terminal size
...
Setting the cursor with the `Direct` handler will cause the rendering
to halt at that point and leave the cursor at point.
Due to not enabling *raw mode* with the newly introduced `App.start`
configuration options corresponding inputs are only visible to `zterm`
once the input has been completed with a newline. With this it is not
necessary for the renderer to know nothing more than the width of the
terminal (which is implied through the `Container` sizes). Making it
very trivial to implement.
2026-01-20 13:57:55 +01:00
yves-biener
c29c60bd89
WIP make example interactive
...
Handle inputs as per usual (which however is a bit weak, is it goes through
key by key and not the entire line), batch all events such that all events
are handled before the next frame is rendered. For this the `App.start`
function needs to become configurable, such that it changes the termios as
configured (hence it is currently all commented out for testing).
2026-01-20 11:54:28 +01:00
yves-biener
4a3bec3edc
add: Direct Renderer implementation rendering the fixed size of the root Container
...
A corresponding example has been added, which is very minimalistic as of now,
but will add further functionality to test the corresponding workflow that is
usual in `zterm` such that it in the best case only a swap in the renderer to
switch from alternate mode drawing to direct drawing.
2026-01-20 11:28:37 +01:00
yves-biener
836d7669e5
feat: introduce growth options .horizontal_only and .vertical_only
...
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m5s
Growing containers only in one specific direction while fixing the
other dimension (which is then required to be provided - just like
before).
2026-01-18 13:36:03 +01:00
yves-biener
1621715ad8
lint: correct typo
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m7s
2026-01-17 12:29:42 +01:00
yves-biener
4874252e8c
mod: adapt implementation to zig version 0.15.2
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 54s
2026-01-17 12:05:20 +01:00
yves-biener
e1e8907848
doc: remove hint as builds now use latest zig version
2026-01-17 12:04:52 +01:00
yves-biener
1cb7fca701
mod(ci): change target zig version to *latest*
2026-01-17 12:04:19 +01:00
yves-biener
19d1602d3b
ref: omit capture instead of dropping
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 49s
2026-01-12 23:28:30 +01:00
yves-biener
88c7eea356
feat(unicode): accept unicode characters through the app's input handler to be handled correctly; key introduce isUnicode method
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m21s
With the `isUnicode` method the read unicode characters from the user
can be checked against displayable text and rendered on the screen accordingly.
2026-01-12 22:47:20 +01:00
yves-biener
b1a0d60ae3
mod: bump zig master version
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m9s
2026-01-06 22:58:10 +01:00
yves-biener
c49c2a5c6d
mod(app): export TextField from App to be used in other Element implementations similar to App.Input
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m1s
2025-12-27 19:56:44 +01:00
yves-biener
8b5d3757fc
mod(element/Input): split into TextField without associated event to automatically trigger
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m9s
2025-12-27 17:06:07 +01:00
yves-biener
06ab32bdde
mod(container): Size property handling for .fixed, .horizontal and .vertical check with assertions required values
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m0s
2025-12-17 22:58:58 +01:00
yves-biener
8e3b43fa61
mod(container): .horizontal and .vertical size.grow respect minSize value if no size.dim is used
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m0s
2025-12-17 22:48:02 +01:00
yves-biener
6b2797cd8c
mod(container): .fixed sizing behavior with minSize Container / Element function
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m1s
2025-12-17 22:04:06 +01:00
yves-biener
e972a2ea0f
mod(container): integrate minSize call when fit_resize is calculated
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 57s
2025-11-28 15:31:45 +01:00
yves-biener
67bfd90a2c
WIP(container): fit_size call minSize for determining the minimal required size of a given Container
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 57s
2025-11-28 15:25:10 +01:00
yves-biener
40fa080af6
WIP(container): use another approach
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 57s
2025-11-28 15:08:58 +01:00
yves-biener
d92f562a57
WIP(container): propagate individual child sizes correctly
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 57s
2025-11-28 15:03:50 +01:00
yves-biener
f7025a0fc2
fix(container): minSize should not add children's sizes, but take max instead
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 57s
2025-11-28 14:34:32 +01:00
yves-biener
41229c13d3
mod(container): provide minSize function for Element implementation to refer for nested structures
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m6s
2025-11-28 14:27:41 +01:00
yves-biener
855594a8c8
mod(element): introduce deinit interface for deinitializing Elements automatically with the Container
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m34s
2025-11-27 21:13:03 +01:00
yves-biener
9488d0b64d
feat(terminal/cursor): add support for cursor shape configuration
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m5s
2025-11-20 18:46:58 +01:00
yves-biener
424740d350
feat(terminal/osc12): define cursor color through style of cell that describes the cursor position
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m33s
The `.default` color will reset the cursor color to the terminal's default color
2025-11-19 18:42:13 +01:00
yves-biener
28c733352e
feat(event): introduce .bell system event
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 16m37s
2025-11-17 18:30:31 +01:00
yves-biener
3b5507ec1e
fix(lint): correct typo
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m4s
2025-11-10 17:18:36 +01:00
yves-biener
38d31fae72
feat(element): parameter *const App.Model
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 55s
The renderer will provide `resize`, `reposition` and `minSize` (for
the `Scrollable` `Element`) with a read-only pointer to the model of
the application (similar to how it is already done for `handle` and
`content`). Every interface function now has the same data that it can
each use for implementing its corresponding task based on local and
shared variables through the element instance and model pointer.
2025-11-10 17:09:29 +01:00
yves-biener
79a0d17a66
feat(io): introduce std.Io parameter for App.init
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m22s
The provided `std.Io` is used for running the input reading and the
rendering asynch. The user can provide their desired `std.Io`
implementation as they wish to use. The examples use `std.Io.Threaded`
as a simple threaded solution.
2025-11-10 16:44:02 +01:00
yves-biener
accbb4c97d
mod: bump action dependencies
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 56s
2025-11-05 22:45:56 +01:00
yves-biener
ad32e46bc9
feat(element/scrollable): mouse support for scrollbar interaction
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 55s
Fix an issue with the scrollbar contents to work proper with statically
defined `Container` sizes through its `Properties` sizing option.
2025-11-05 22:08:35 +01:00
yves-biener
8ebab702ac
fix(element/scrollable): reduce the number of minSize calls and correctly resize scrollable Container
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m26s
2025-11-05 18:33:16 +01:00
yves-biener
e53bb7880b
mod: cleanup TODO and outdated comments
2025-11-05 18:32:49 +01:00
yves-biener
a83e86f8d9
feat(element/scrollable): background configuration
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m30s
2025-11-02 21:00:17 +01:00
yves-biener
4567963ff2
mod(example/text): improve event loop; add stick table heading for used emphasis
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 59s
This should be the way it should be done all the time, such that you
are not rendering for every input, but instead handle all `App.Event`s
that happened between the last render and the current. This shares
similarities with the continuous event loops, which also batches
the events only with the exception that it instead blocks (see
`App.Queue.poll`).
2025-11-02 16:10:11 +01:00
yves-biener
d4cc520826
fix(element/scrollable): display and user interaction
...
Fix initial render to show scrollbar immediately if required. Show and
hide scrollbar correctly when content size or terminal size changes. Add
keybindings for scrolling similar to pager keybindings.
2025-11-02 16:05:53 +01:00
yves-biener
b3dc8096d7
mod(event): do not care about enum declarations
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 56s
The union type can not be constructed with declarations anyway:
`error: reified unions must have no decls`; meaning there is no point in
even trying to do so.
2025-11-01 21:44:53 +01:00
yves-biener
7cd1fb139f
mod(element/scrollable): ensure minSize returns correct dimensions
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 56s
Enforce that `minSize` returns a `Point` with corresponding minimal
dimensions with respect to the provided available size. This means that
an `Element` implementation that provides a `minSize` function may even
return a too small dimension, which would automatically be resized to be
at least as big as the provided size.
2025-11-01 14:37:14 +01:00
yves-biener
f70ea05244
mod(element/scrollable): introduce minSize function for Element
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 3m24s
The minimal required size can the queried from the containing `Element`
of the `Container` that is provided to the `Scrollable` to dynamically
adjust its size.
Currently abritrary nesting is not supported / tested.
2025-11-01 13:55:16 +01:00
yves-biener
c645c2efee
fix: changes from newest zig version
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m3s
2025-11-01 00:03:04 +01:00
yves-biener
89aeac1e96
doc: correct alert blocks
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m0s
2025-10-26 21:46:00 +01:00
yves-biener
feae9fa1a4
feat(model): implement Elm architecture
...
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m2s
Now the `App` contains a state which is a user-defined `struct` which
is passed to the `handle` and `contents` callbacks for `Container`'s and
`Element`'s. Built-in `Element`'s shall not access the `App.Model` and
should therefore never cause any side-effects.
User-defined events shall be used to act as *messages* to cause
potential side-effects for the model. This is the reason why only
the `handle` callback has a non-const pointer to the `App.Model`. The
`contents` callback can only access the `App.Model` read-only to use for
generating the *view* (in context of the elm architecture).
2025-10-26 15:58:07 +01:00
yves-biener
8f90f57f44
fix(terminal): correctly restore termios and screen's during panic_handler
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m1s
2025-10-19 11:44:17 +02:00
yves-biener
fee3c796d9
doc(terminal): remove resolved issue
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m0s
2025-10-18 23:31:49 +02:00
yves-biener
547f553404
fix(terminal): restore screen correctly with alt screen
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m3s
2025-10-18 23:30:15 +02:00
yves-biener
1f6bbcc45e
mod(examples/progress): show multiple different configuration options
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 59s
2025-10-01 11:14:22 +02:00
yves-biener
832fc45c3e
chor: use new Writer interface for terminal's Writer; fix test cases
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 3m38s
2025-10-01 10:59:29 +02:00
yves-biener
aa17e13b99
lint: correct typo
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 58s
2025-09-29 23:11:28 +02:00
yves-biener
cba07b119c
chor: upgrade to latest zig; remove zg dependency
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 55s
2025-09-29 23:09:42 +02:00
yves-biener
f256a79da0
chor: bumb zig version to 0.16.0-dev
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m41s
2025-08-27 12:17:20 +02:00
yves-biener
c50b10f32d
fix: zig update build errors
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m35s
2025-08-06 16:14:22 +02:00
yves-biener
4f6cabf898
chor: update zig version
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m3s
2025-08-04 21:09:56 +02:00
yves-biener
853f4d9769
mod(event): documentation of unsupported creation of declarations during comptime
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 56s
The functionality remains in the code, but will cause an compilation
error when the user provided tagged union for the application events
has declarations. This way it is at least explicit that no declarations
are supported (even if this is actually a nice to have).
For details see this [issue](https://github.com/ziglang/zig/issues/6709 ).
2025-07-17 23:15:45 +02:00
yves-biener
edbca39c38
mod(event): merge the declarations of the tagged unions alongside the fields
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 55s
2025-07-17 22:27:02 +02:00
yves-biener
0de50e7016
feat(element/selection): Element implementation for selecting an enum variant
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m35s
2025-07-17 21:00:00 +02:00
yves-biener
088e1a9246
add(element/radio-button): RadioButton Element implementation
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 2m6s
This can be used to visualize the values of `bool`'s, which is relevant
when creating form's based on `struct`'s automatically.
2025-07-13 21:02:28 +02:00
yves-biener
df78c7d6eb
mod: bump zg dependency version
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m19s
2025-07-11 22:38:47 +02:00
yves-biener
66b3a77805
feat(container): negative layout padding
...
Zig Project Action / Lint, Spell-check and test zig project (push) Has been cancelled
Negative paddings use the current size to calculate the padding from
the opposite orientation. For a given dimension (horizontal or vertical)
if the size is `30` a padding of `5` would be equivalent to a padding
of `-25`. This enables to describe the size of the container using
the padding property of the `Layout` and gives users more freedom to
describe different layouts.
2025-07-11 22:33:32 +02:00
yves-biener
b401b5ece8
lint(container): style
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m41s
2025-07-07 23:08:06 +02:00
yves-biener
9f33c902ee
mod(container): cleanup and highlight points for improvement
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m42s
2025-07-06 00:42:00 +02:00
yves-biener
9f29ac6a77
feat(element/progress): Progress bar implementation as an Element
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 2m42s
2025-07-05 18:29:49 +02:00
yves-biener
f775a6ab2d
formatting
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 13s
2025-06-30 22:53:05 +02:00
yves-biener
a39cee7ccb
feat(element/button): add builtin Element implementation for buttons
2025-06-30 22:52:27 +02:00
yves-biener
7875db0aea
feat(element/input): make accept event agnostic to u8 and u21 slices
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 50s
There are now comptime checks in place an the corresponding triggered
event will be automatically converted to the correct type to support
simple ascii strings (`[]u8`) or utf-8 strings (`[]u21`).
2025-06-30 22:03:59 +02:00
yves-biener
7595e3b5bb
feat(element/input): text input element implementation
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 14s
Moved implementation from example/input as a standalone `Element`
implementation, which is directly used by the example instead.
The provided argument is the `App.Event`'s event that should be
triggered on acceptance for the contents of the Input `Element`.
Currently only `[]u21` strings are supported, but in the future also
`[]u8` strings shall be supported and automatically converted when
pushed as an `App.Event` into the app's queue.
2025-06-29 11:19:09 +02:00
yves-biener
2ba0ed85fb
fix(app): remove exported Exec Element - it does not exist in this branch
2025-06-29 10:34:53 +02:00
yves-biener
439520d4fe
mod(example/input): ellipse rendering with scrolling for text field contents
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 17s
2025-06-28 22:09:36 +02:00
yves-biener
ded1f2c17e
mod(example/input): reorder input handling cases; add alt-b/f binding implementations
2025-06-28 22:08:19 +02:00
yves-biener
92ae8c9681
feat(example/input): readline shortcuts; better navigation;
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 58s
This will be the basis for a Textfield `Element` implementation to make
it easier to add user inputs into the container structures.
2025-06-28 13:04:00 +02:00
yves-biener
743cdca174
mod: bump zg dependency version
...
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 26s
As the dependency is still using version 0.14.0, it still causes an
error during testing. Corresponding examples are still working as
expected.
2025-06-24 20:48:32 +02:00
yves-biener
7d8e902ce2
chor: bump zig version and fix corresponding errors
2025-06-24 20:47:47 +02:00
yves-biener
ed0010c8af
lint: correct reported typos (including a rename)
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 26s
2025-06-24 20:35:28 +02:00
yves-biener
a8e138deb7
action: bump zig installation version
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 15s
2025-06-24 20:27:07 +02:00
yves-biener
d0453d08b8
fix: render cursor correctly in case the same character remains the cursor position
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 47s
2025-06-11 20:32:35 +02:00
yves-biener
825fb63bc8
ref: rename gpa usages to the aliased DebugAllocator
2025-06-11 20:31:41 +02:00
yves-biener
76f708d9d7
add(continous): example which provides a fixed render schedule
...
The other examples did rendering based on events, which this renderer
does not. This makes these applications potentially not that efficient,
but allows for consistent frame times that make animations, etc.
possible. This example serves to show that you can use `zterm` for both
types of render scheduling and even change between them without much
efford.
2025-05-30 23:02:56 +02:00
yves-biener
0d2644f476
mod(input): handle remaining key codes remove unused ones
2025-05-30 23:01:48 +02:00
yves-biener
9a818117d7
feat(panic): panic handler to recover termios when crashing
2025-05-30 23:00:45 +02:00
yves-biener
5ba5b2b372
feat(element/alignment): alignment Element implementation
...
You can now align a `Container` using the Alignment `Element` similar to
how you make a `Container` scrollable. For usage details please see the
example and the corresponding tests.
2025-05-28 14:42:02 +02:00
yves-biener
3cb0d11e71
add: necessary assert statement; rem: unnecessary render resize in testing
2025-05-28 14:40:25 +02:00
yves-biener
4cc749facc
feat(app): read input options correctly
2025-05-28 14:39:27 +02:00
yves-biener
c6d8eec287
feat(debug): render debug support
2025-05-26 15:43:47 +02:00
yves-biener
2572b57697
refactor: remove unnecessary comptime keyword
2025-05-26 15:15:30 +02:00
yves-biener
80a36a9947
refactor: zigify imports and usages
2025-05-26 14:23:18 +02:00
yves-biener
4cde0640c8
fix(element/scrollable): adjust anchor for scrollable element during resize
2025-05-22 23:39:05 +02:00
yves-biener
e9a9c2b680
feat(app): signal WINCH for .resize system event
...
This allows the application to automatically re-draw and resize if the
application receives the signal by the terminal emulator.
2025-05-21 22:49:08 +02:00