Tim Culverhouse
4f5db2b224
core: apply quirk for termux
...
Termux spews SGR sequences to the screen if they are not legacy encoded.
Add a quirk for termux (TERMUX_VERSION will be set)
2024-05-17 07:25:06 -05:00
Tim Culverhouse
9d11d13085
window: remove deprecated code, add printSegment
2024-05-16 07:00:41 -05:00
Tim Culverhouse
9f015b7f49
docs: refactor docs build step
2024-05-14 12:53:29 -05:00
Tim Culverhouse
dea1a875e0
chore: zig fmt
2024-05-12 20:27:24 -05:00
00JCIV00
173ff4e216
Removed old vaxis.zig
2024-05-12 20:25:51 -05:00
00JCIV00
6e97c8d21d
Fixed PR Corrections
2024-05-12 20:25:51 -05:00
00JCIV00
d117a5f5fa
Remove old docs directory
2024-05-12 20:25:51 -05:00
00JCIV00
ee13f32b17
Removed previously missing (now duplicative) assert declaration
2024-05-12 20:25:51 -05:00
00JCIV00
037a301bd6
Added missing 'assert' definition for TextInput
2024-05-12 20:25:51 -05:00
00JCIV00
ca0371bc44
Updated 'os' to 'posix' for Zig v0.12-3457
2024-05-12 20:25:51 -05:00
00JCIV00
46b82062de
Improved the Table Widget
...
- Added support for creating Tables from `ArrayList([]const u8)`.
- Added the `col_width` field to TableContext to help with Mouse support.
2024-05-12 20:25:51 -05:00
00JCIV00
0329ae9b95
Improved the Table Widget
...
- Added better Integer bounds checks with Saturated Operators.
- Implemented truncated cells using the "..." suffix.
2024-05-12 20:25:51 -05:00
00JCIV00
d75c44725e
Added the basic example for pausing the TUI with a Child Process.
2024-05-12 20:25:51 -05:00
00JCIV00
96cbae13fc
Improved Integer bounds checking with Saturated Operators.
2024-05-12 20:25:51 -05:00
00JCIV00
3e1e6200b4
Added the read_thread
to the Vaxis struct and made null handling more idiomatic.
2024-05-12 20:25:51 -05:00
00JCIV00
8d842c8b44
Added some various integer overflow protections
2024-05-12 20:25:51 -05:00
00JCIV00
32a4b4baab
Added bounds protection to Alignment Window initialization
2024-05-12 20:25:51 -05:00
00JCIV00
26cd121a75
Reset the 'enter' binding to 0x0D after upstream fix
2024-05-12 20:25:51 -05:00
00JCIV00
a07d4f19a7
Reorganized Namespaces
...
- Consolidated `main.zig` into `vaxis.zig` as the new library entry point.
- Exposed more Types throughout the library for more transparent doc navigation.
- Reorganized certain Modules and Types to be more coherent and readable.
- Re-generated docs to reflect these changes.
2024-05-12 20:25:51 -05:00
00JCIV00
f8544be262
Added the table.zig
example
...
- Created a basic user management example for the Table widget.
2024-05-12 20:25:51 -05:00
00JCIV00
09a8188851
Added the new Table Widget
...
- Added `Table.zig` under the `src/widgets` directory and `widgets.zig` module.
- Created the `drawTable()` function to draw a Table to the provided parent Window based on the provided ArrayList.
- Created the `TableContext` struct to manage state and attributes for the `drawTable()` function.
2024-05-12 20:25:51 -05:00
00JCIV00
392dffb307
Made more declarations public in src/Window.zig
2024-05-12 20:25:51 -05:00
00JCIV00
1e30dd7d31
Fixed main.Key.enter binding
2024-05-12 20:25:51 -05:00
00JCIV00
845a3a6786
Added build step to .
2024-05-12 20:25:51 -05:00
Tim Culverhouse
ca4346e35a
window(fill): fix bounds check
...
The bounds check should terminate at the window height.
Fixes: f7f4606f1d
"window(fill): bounds check the memcpy op"
2024-05-12 20:24:31 -05:00
Tim Culverhouse
f7f4606f1d
window(fill): bounds check the memcpy op
...
Bounds check our window before performing any direct buffer access. This
affects clear and fill, and allows a window to technically be out of
bounds, but only the visual portion of the window will be filled.
2024-05-11 06:38:08 -05:00
Tim Culverhouse
cce22e8850
options: allow applications to set requested kitty flags
2024-05-10 19:57:02 -05:00
Tim Culverhouse
972129a764
vaxis: apply quirk for vhs
...
Apply a quirk when in a vhs recording session. Vaxis will automatically
use `wcwidth` and no kitty keyboard
2024-05-09 20:22:45 -05:00
CJ van den Berg
8819e192cc
vaxis: export Parser, Tty and getWinsize for applications that cannot use Loop
2024-05-09 19:14:49 -05:00
CJ van den Berg
cde85103a1
window: add readCell method
2024-05-09 06:20:56 -05:00
Tim Culverhouse
bb5d79ef75
core: implement legacy SGR sequences and fallbacks
2024-05-08 13:59:57 -05:00
Tim Culverhouse
48a8aa509c
widgets(text_input): protect against zero-width window
...
A zero-width window could set the text_input.draw method into an
infinite loop. Explicitly protect against this case.
2024-05-06 19:03:07 -05:00
Tim Culverhouse
920e490e4c
widgets: add Scrollbar widget
2024-05-06 18:54:35 -05:00
Tim Culverhouse
fa7d94f3df
window(print): use const Segment
2024-05-03 13:58:23 -05:00
Tim Culverhouse
6abfd8fc3f
render: skip clearing images if they aren't supported
2024-05-03 13:57:03 -05:00
Tim Culverhouse
0fe1142989
widgets(nvim): fix scroll down
2024-05-03 12:30:04 -05:00
Tim Culverhouse
cbfa56bb1b
log: remove cursor log lines
2024-05-03 12:12:01 -05:00
Tim Culverhouse
ed1867cf39
examples(nvim): update example api
...
The nvim widget needs work, but at least you can run the example
2024-05-02 20:13:45 -05:00
Tim Culverhouse
a0db41f87c
render: add cli renderer
...
Add a renderer for applications running on the primary screen. This
renderer uses relative cursor positioning, and works with all the same
primitives as the alternate screen.
Fix a bug where repositioning was never turned back to false. This was a
nasty one with huge perf implications.
Set internal cells to a space and default on init. This prevents us from
writing them. As a result, we now issue a hardware clear on resize.
2024-05-02 12:50:33 -05:00
Tim Culverhouse
e43f0907ec
vaxis: fix InternalScreen.writeCell
...
writeCell was clearing the retaining capacity of the wrong arraylist
when writing the uri_id.
2024-05-02 10:38:39 -05:00
Tim Culverhouse
852e2d1db3
readme: update zig version
2024-04-30 17:21:39 -05:00
Tim Culverhouse
50242b984b
loop: fully clean up tty when stopping event loop
...
Previously, stopping the read thread would not fully clean up the tty.
This could result in issues such as #9 where the terminal state was
borked upon return to shell or if temporarily exiting the TUI.
Fixes : #9
2024-04-30 16:42:10 -05:00
Tim Culverhouse
2f83b0d6ca
update readme
2024-04-30 16:00:23 -05:00
Tim Culverhouse
6d995fe737
color: change eql to switch statement
2024-04-30 13:38:32 -05:00
Tim Culverhouse
2d48093d3a
examples(pathological): improve printing of time
2024-04-30 12:57:29 -05:00
Tim Culverhouse
fc9f55d6fa
perf: improve perf of fill and Screen.init
...
Use @memset for initializing and filling a Screen.
2024-04-30 12:33:46 -05:00
Tim Culverhouse
31b97f73d2
tests: fix TextInput test
2024-04-30 09:02:32 -05:00
Tim Culverhouse
5ad01f6a3a
image: fix base64 and example
2024-04-30 09:02:16 -05:00
Tim Culverhouse
df2f936317
tty: handle key_release events
2024-04-30 08:55:26 -05:00
Tim Culverhouse
92883f5d42
event: handle key_release events
2024-04-30 08:42:21 -05:00