Commit Graph

128 Commits

Author SHA1 Message Date
8519d204f3 fix(lint): correct spelling error
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m1s
2025-02-24 17:20:25 +01:00
33262c9638 add(testing): new namespace containing testing capabilities for zterm
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
The namespace shall also be used for testing the rendering of
`Container`s and `Element`s (including the `Scrollable` element).

The testing renderer currently is a striped down version of the double
buffered render without the secondary buffer and the flushing to stdout.
The internal `Cell` slice (the *screen*) is used for equality checks.

The testing namespace shall provide a way to describe the expected
`Cell` slices that should be validated against.
2025-02-24 17:14:57 +01:00
5c5c59cbfc fix(style): render only necessary bytes and change default fg color to .default
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 45s
2025-02-24 17:11:22 +01:00
c022d1d9e2 fix(lint): correct indentation and naming convention for constants
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m9s
2025-02-24 17:09:22 +01:00
12497e92f8 fix(lint): correct casing for constants
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 21s
2025-02-24 17:01:55 +01:00
d10f738c75 add(test): cell conversion to ansi enhanced strings
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 45s
2025-02-24 16:54:05 +01:00
140f27216a doc: move contents from README to wiki
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 6m49s
2025-02-22 11:00:38 +01:00
04ba88c68b doc: update README
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
2025-02-21 23:17:01 +01:00
6ccab74c94 add(examples/demo): application to showcase a more complex application
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 53s
Further improvements for example applications; Demo example is now
default build target (when not providing example configuration).
2025-02-21 22:57:14 +01:00
c634e1affc doc: update roadmap 2025-02-21 22:29:19 +01:00
dab486a2c1 add(examples/errors): error notifaction handling
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m33s
2025-02-21 22:25:42 +01:00
9b0dd3c52f doc: correct link to wiki
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-21 19:17:28 +01:00
f45e722578 fix(linter): spelling error in README
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 57s
2025-02-21 19:15:19 +01:00
7b005ea4b1 add(examples/styles): text and color styling possiblities
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
This also contains some minor refactoring to improve the readability
and understandability of the library (i.e. renaming of Style.Attributes
to Style.Emphasis).
2025-02-21 19:13:11 +01:00
c0c0590bb9 add(examples/styles): color palette to showcase all available colors to render (except for .default)
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2025-02-21 16:43:03 +01:00
16724f6a52 add(example/elements): distinct different scrollable containers
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-21 15:58:42 +01:00
44e92735cf ref(examples): avoid unnecessary casts
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-21 15:15:15 +01:00
8cc047c1fa fix(lint): spelling error in README
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 57s
2025-02-21 14:57:30 +01:00
8fbc958ca1 add(examples/elements): mouse clickable button
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
2025-02-21 14:50:29 +01:00
b980703350 fix(container): border separator handling
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
Due to the assigning back the increased value for the used gap in case
the separator was active, every .resize `Event` would add more to the
gap, leading to ever smaller sub-container's and different sizes after
resizes. This has been fixed to have consistent layouting done by the
`Container` and `Border`.
2025-02-21 12:25:47 +01:00
eb89f7f98b fix(renderer): reset color after each cell write
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 38s
2025-02-21 12:19:38 +01:00
cc847b7035 add(examples/layout): mixed content with different layout options 2025-02-21 12:19:16 +01:00
9dc1a4b95a add(examples/layout): vertical, horizontal and grid
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
2025-02-21 11:31:18 +01:00
69c1600eb9 mod(build): adjust name of enum values to be easier to type in command line
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2025-02-20 23:54:53 +01:00
c4639bf4bb add(example): input with simple text field
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m41s
2025-02-20 23:48:57 +01:00
07e932741c doc: update roadmap and further goals
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-20 18:56:56 +01:00
e4ff240839 doc: update roadmap and contents for future documentation goals
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 44s
2025-02-20 11:49:30 +01:00
96375e3b72 mod(build): build configuration for examples
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2025-02-20 11:16:42 +01:00
9322785ca0 mod: update zig version
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-19 22:55:03 +01:00
cc831a5cdf fix(element/scrollable): render horizontal directed contents correctly
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-19 22:23:32 +01:00
86b3e7d4ed feat(scrollable): make Container scrollable through Element Scrollable
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m35s
2025-02-19 20:32:26 +01:00
f55d71a7cb mod(mouse): fix input.Mouse.in method
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
Pass through mouse events where they actually match the corresponding
`Container`. Adopt mouse event accordingly in `Scrollable` `Element`
trait when passing through the mouse event to the scrollable
`Container`.
2025-02-18 19:09:03 +01:00
f66a870223 ref(input): move mouse.zig and key.zig into public input.zig namespace
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m41s
2025-02-18 18:24:09 +01:00
e2f9408850 add(input): mouse support
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-17 23:36:27 +01:00
c2080ab40f ref(ctlseqs): use control sequence file; rename key names
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-17 23:08:47 +01:00
a9f48bfb6a ref(key): make Key struct packed and rename constants
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m5s
2025-02-17 21:06:15 +01:00
7891af6c6f add(element/scrollable): implement content provider
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m49s
However this is only working for the same size as the parent container
(i.e. same `Size`). The `.resize` event for the `Container` of the
scrollable element needs to be the necessary and/or required size for
the contents (regardless of the screen viewport).
2025-02-17 19:58:25 +01:00
7b690d387b fix(lint): correct spelling errors
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (pull_request) Successful in 1m9s
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
2025-02-16 16:01:04 +01:00
5c929479b2 add(main): main executable with zig build run support
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (pull_request) Failing after 5m10s
The main executable contains a simple `Element` implementation example
showing how interaction through and outside of the event loop can be
implemented to impact the rendered contents.
2025-02-16 15:35:50 +01:00
d8a9e72b67 add(border): seperator line options with corresponding code points 2025-02-16 02:04:53 +01:00
d951906b2b rem: Scroll from Propierties of Container
Updated the corresponding documentation and ideas for how to realize
scrollable contents.
2025-02-15 18:50:36 +01:00
01eb14f1bd doc: update Roadmap section of README 2025-02-15 16:03:06 +01:00
1041b0a955 mod: update zg dependency
`zg` now supports zig 0.14 dev which this library already uses.
2025-02-15 16:00:55 +01:00
4781e9ce39 add(element): interface for injecting user behavior to containers
Some additional refactoring and documentation updates have also been
applied.
2025-02-15 15:56:30 +01:00
5c148e1aa5 fix(cotainer/border): seperator placement without border's and gap 2025-02-15 11:25:20 +01:00
a6aa6e5150 fix(container/border): correct location and rendering of separators between child elements 2025-02-15 11:10:37 +01:00
26d31a38de ref(container): use only one size for each container 2025-02-15 10:49:48 +01:00
01d121ef87 mod: update README and remove alignment options 2025-02-14 22:27:24 +01:00
abaea968a6 rem(container): sizing options
This enables the `Layout` struct to be packed (as well as the
`Properties` struct) which should further reduce the memory footprint.
2025-02-14 22:19:20 +01:00
73a7f740c9 ref(container): move size: Size member from Scroll to Container 2025-02-14 22:03:21 +01:00