Commit Graph

271 Commits

Author SHA1 Message Date
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
yves-biener ba25e6056c feat(element/scrollable): scrollbar rendering
Configuration to enable scrollbar rendering for scrollable `Element`s.
Currently only the fg `Color` of the scrollbar can be configured while
the background uses the same fg `Color` but adds the emphasis `.dim` to
make it obvious what the is the actual scrollbar. In the future it might
be necessary to provide the user with more options to configure the
representation of the scrollbar.

Tests have been added to test the scrollbar rendering and placement
accordingly.
2025-05-21 18:20:52 +02:00
yves-biener aa4adf20f9 refactor: zigify imports and correct minor mistakes 2025-05-20 18:23:44 +02:00
yves-biener 50adf32f14 add(style): cursor style to indicate a cursor position
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 25s
2025-04-20 20:54:30 +02:00
yves-biener a4293ff243 add(event): mouse event has relative position for receiving elements
Zig Project Action / Lint, Spell-check and test zig project (push) Has been cancelled
2025-04-20 20:53:46 +02:00
yves-biener 50450f3bbc fix(container): growth resize for size all size options and starting sizes (i.e. the smallest being a non grow-able one)
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m14s
2025-04-07 20:55:21 +02:00
yves-biener bce134f052 rem: unnecessary signal handler
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m1s
No event-based re-sizing, instead each re-render resizes by default.
2025-04-01 21:53:52 +02:00
yves-biener 962a384ecf add(Scrollable): init function with corresponding usages
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
2025-03-29 21:21:23 +01:00
yves-biener 0b7d032b11 tag: 0.2.0
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m15s
0.2.0
2025-03-27 21:43:02 +01:00
yves-biener 7e20dd73d9 mod: add missing inline function attribute
Correct example to use the actual `zterm.Error` type accordingly.
2025-03-27 21:41:18 +01:00