Commit Graph
28 Commits
Author SHA1 Message Date
yves-biener 24a08e0e62 mod: bump zig version to 0.16.0 2026-05-19 23:08:32 +02: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 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 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 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 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 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 e53bb7880b mod: cleanup TODO and outdated comments 2025-11-05 18:32:49 +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 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 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 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 aa4adf20f9 refactor: zigify imports and correct minor mistakes 2025-05-20 18:23:44 +02:00
yves-biener ec22e68e8c ref(event): remove .resize and replace with recursize method calls
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 40s
This also means that currently the dynamic resizing through the app's
detached thread is not working, as it cannot send size updates. The
examples have been overhauled to still implement intermediate mode
applications accordingly.
2025-03-04 14:52:19 +01:00
yves-biener 591b990087 ref(event): split Size into two Points (one for the size and one for the anchor / origin)
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 39s
2025-03-04 00:04:56 +01:00
yves-biener 91ac6241f4 doc: correct TODO, NOTE and FIX comment statements
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 48s
2025-03-03 21:49:11 +01:00
yves-biener f66a870223 ref(input): move mouse.zig and key.zig into public input.zig namespace
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m41s
2025-02-18 18:24:09 +01:00
yves-biener e2f9408850 add(input): mouse support
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-17 23:36:27 +01:00
yves-biener a9f48bfb6a ref(key): make Key struct packed and rename constants
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m5s
2025-02-17 21:06:15 +01:00
yves-biener bbe6f4741e WIP: use viewport to allow sizes of scroll to extend further than renderable screen 2025-02-12 22:33:03 +01:00
yves-biener 1293cb065d WIP: add Container type with corresponding Properties configuration
The configuration of the `Container` types is very much inspired by
[clay](https://github.com/nicbarker/clay).
2025-02-01 01:05:56 +01:00
yves-biener bdbe05c996 mod(structure): update project structure
Remove examples, add description for design goals in README.md and
apply re-names and naming changes accordingly for the project structure.
Implement a flat hierachry, as the library shall remain pretty simple.
2025-01-30 23:02:34 +01:00
yves-biener 3048b59e84 add(view): View type for composing view modules
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 22s
2025-01-14 01:14:55 +01:00
yves-biener 3a989321fc feat(event): add focus in/out event to SystemEvents
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 3m54s
feat(app): add minimal size argument for App.start

Read more corresponding inputs from stdin and convert them correctly
(i.e. in band window resizing), further keys (arrow keys, F-keys, etc.).
Respect the provided minimal size for the application which posts an
error message in case the size is smaller than the requested minimal
size.
2024-12-25 12:53:39 +01:00
yves-biener 6cd78d0418 fix: release mode undefined usage (for optionals); bump to 0.14.dev
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2024-11-19 23:27:12 +01:00
yves-biener 4e8487353e fix(typos): correct spelling mistakes
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 52s
2024-11-09 21:34:33 +01:00
yves-biener 6d389bcd4b initial commit
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 30s
2024-11-09 21:24:42 +01:00