* feat(core): use uv input scanner
* chore: bump ultraviolet
* feat(input): use uv new input api
* chore: update ultraviolet dependency
* chore: bump ultraviolet to v0.0.0-20250810001545-aa2a3c4457a6 to fix esc
timeout
* chore: bump: update ultraviolet to v0.0.0-20250811190745-12cb2616ad77
* feat: enable Win32 Input Mode on Windows to get paste support
* chore: bump ultraviolet to a28b1e47903f to fix win32-input-mode paste
* Revert "feat: enable Win32 Input Mode on Windows to get paste support"
This reverts commit 6c5845ae7a.
* chore: bump ultraviolet to fix win32-input-mode issues
* fix(termios): windows console optimizations
Kitty keyboard can be set to a specific state instead of using the
push/pop stack approach. The latter might break and sometimes won't work
with things like Zellij.
* fix: windows: enable mouse mode on demand
This fixes an issue where mouse mode is always enabled on Windows. With
this patch, we enable mouse events only it is requested.
Needs: https://github.com/charmbracelet/x/pull/386
Related: https://github.com/charmbracelet/bubbletea/issues/1313
* refactor: mouse: properly handle mouse mode
Since mouse mode has a special case on Windows, we now have
separate msg types for mouse events.
* chore: go mod tidy
This change separates the viw from the main model by introducing new
interfaces `ViewModel` and `CursorModel`. The `ViewModel` interface
provides a view method that returns the string to render, while the
`CursorModel` interface provides a view method that returns the string
to render and the cursor position.
If a program does not implement a view interface, the program won't
render anything. This removes the need for the `WithoutRenderer` option.
The cursed renderer moves the cursor between renders, which can cause
issues when the terminal is released and restored. For instance, when
we exec a command using tea.Exec, we want the cursor position to remain
the same after the command finishes and goes back to the same position
as before the command was executed.
With tea.Suspend on the other hand, we want to make sure we reset the
cursor position because the program stops executing and is put to
suspend. Resuming the program again initializes the renderer and its
cursor position again from scratch as if it was a new program.
This wasn't an issue for the standard renderer because we always put the
cursor at the lower left corner of the screen. Releasing and restoring
the program wasn't an issue because the cursor was always at the same
position.
This change exposes the `KeyboardEnhancements` type and tracks requested
and active enhancements in the `Program` struct. This change also
renames the `KeyboardEnhancement` type to `KeyboardEnhancementOption`
and `keyboardEnhancements` to `KeyboardEnhancements` as well as
`EnableKeyboardEnhancements` to `RequestKeyboardEnhancements`.
This implements the new cursed ferocious renderer. This is based on the
new `cellbuf.Screen` renderer. This renderer is more efficient and
flexible than the previous renderer.
The renderer controls the altscreen buffer and cursor visibility which
means we don't need to do so in Bubble Tea. Instead, Bubble Tea can
focus on the event loop and the application state.
* feat: updating x/ansi
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: enable/disable mode
* fix: execute in private mode, fix tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: update deps
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* feat: update cellbuf
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* all the updates
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit wraps the input parser in a struct and moves the tracing
logic to the program and its writer and input driver.
It also changes the behavior of the tracer to only enable tracing for
local environment variables i.e. from `os.Getenv` and not from the
program's environment. In other words, it will ignore the program's
environment variables when it comes to tracing.
This implements the meat of the cell renderer. It performs rendering changes
using a cell-based tracking. Changed cells are marked as dirty and only the
changed cells are rendered to the terminal. This is more efficient than
line rendering.
* feat: combine keyboard enhancements into a nicer API
This change combines the keyboard enhancements into a nicer API. Kitty
keyboard protocol and XTerm modifyOtherKeys are now combined into a
single API. This makes it easier to enable keyboard enhancements.
Use `WithKeyboardEnhancements` to enable keyboard enhancements. This
function accepts a list of `KeyboardEnhancement` functions that can be
used to enable different keyboard features.
For now, we only support the `WithReleaseKeys` enhancement which enables
support for reporting release key events.
* Update options.go
Co-authored-by: Christian Rocha <christian@rocha.is>
* chore: go mod tidy
* chore: gofumpt
* fix: simplify keyboard enhancements disambiguation
* feat: make KeyboardEnhancementsMsg helpers always return true on Windows
* fix: remove unused win32input mode
* refactor: rename KeyboardEnhancementsMsg methods
---------
Co-authored-by: Christian Rocha <christian@rocha.is>