Cleaned up CliRenderer config by replacing overlapping renderer flags
with explicit modes.
The current config uses useAlternateScreen, useConsole, and
experimental_splitHeight. That setup makes it hard for you to tell:
- where the renderer draws
- whether it captures stdout or passes it through
- whether the console overlay is enabled
This makes it explicit:
- screenMode: alternate-screen | main-screen | split-footer
- externalOutputMode: capture-stdout | passthrough
- consoleMode: console-overlay | disabled
Goal is to make CliRenderer configuration simpler and easier to
understand. It replaces implicit flag combinations with explicit modes.
It's a breaking API change, obviously.
Prevent regressions where extensionless imports break consumers using
NodeNext
or Node's ESM loader.
tsconfigs override back to "bundler" because bun-ffi-structs and
bun-webgpu
don't export NodeNext-compatible types yet.
Change this once @kommander fixes upstream. I think we can merge this pr
now and update the last things once you've updated upstream.
Close: #843
Note: The input renderable/element does not automatically insert pasted
text. Needs to be captured and inserted. The input renderable will be
backed by an EditBuffer soon that will handle paste properly. Check the
solidjs input demo on how to hook it up.
Fixes issue with solid reusing old nodes in list arrangement. This
should also make things more performant.
Fixes issue where parents where destroying themselves instead of their
children first, leaving dangling children.
---------
Co-authored-by: Adictya <aditya.26101@gmail.com>
- Supports graphemes in native `OptimizedBuffer` and `TextBuffer`
- adds the `zg` dependency for the zig build, to iterate grapheme
clusters and measure their width
- Adds terminal capability detection, currently using explicit width
when available and setting preffered `WidthMethod`
- Cursor state is now Renderer scoped, not global anymore
- In ts `OptimizedBuffer` and `TextBuffer` now need a mandatory width
method value (will be taken from the renderer in most cases, as the
renderer holds the capabilities for the terminal)
- Refactors `Renderable` constructor to now take a `RenderContext` (the
renderer implements this context), moving the `id` into options and
making it optional to use a custom id.
- Made react and solid reconcilers `RenderContext` aware
- Fixes a mouse capture bug where renderables would not be draggable
anymore after dropping
Note: There are still known issues with unicode/grapheme rendering
across terminals, help wanted.