When using `WithRestoredIO()` or nested component, where Uninstall() was
followed by Install(), it caused a problem. The pending task to
`OnExit()` was causing the loop to immediately stop after restarting.
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/1162
This is better ergonomic, as `std::string_view` is lightweight and accept more conversion than `const std::string&`.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
- Set `visibility = ["//visibility:public"]` on the top-level `:ftxui` alias
so the library can be consumed from external Bazel workspaces.
- Add `bazel_integration/` minimal external workspace to validate
external usage via Bzlmod.
- Introduce `smoke` target that depends on `@ftxui//:ftxui`.
- Add CI job to build the smoke target using:
--enable_bzlmod
--override_module=ftxui=..
This prevents regressions in visibility or public API changes.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
Using Gemini, this provides a way to create translation of the
repository, Contributors can improve the translation as needed while
still having the ability to keep it in sync automatically.
This was discussed in:
https://github.com/ArthurSonzogni/FTXUI/pull/1141
Follow-up to #1015. This pull request replaces the full modules that represent headers, with partitions, to emphasise the belonging of the header to the module. This should hopefully provide a speedup to compilation, and confuse users less by aggregating the usable modules into a smaller set.
Enables applications to read piped data while maintaining interactive
keyboard input by redirecting stdin to /dev/tty when explicitly enabled.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
The multiplication in ComputeShrinkHard has the potential to overflow when
very large elements are present inside of a vbox. To mitigate the issue, the
multiplication happens in int64_t values.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
The `install(TARGETS ...)` command in `cmake/ftxui_install.cmake` was missing required destination specifications that became mandatory in CMake 3.12+. This caused build failures when users tried to install FTXUI with the minimum supported CMake version.
The issue occurred because the install command:
```cmake
install(
TARGETS screen dom component
EXPORT ftxui-targets
)
```
Was missing explicit destination specifications for different artifact types. CMake 3.12+ requires these destinations to be explicitly declared.
This PR adds the required destination specifications:
```cmake
install(
TARGETS screen dom component
EXPORT ftxui-targets
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
```
The fix ensures that:
- Static libraries (`.a` files) are installed to the archive destination
- Shared libraries are installed to the library destination
- Executables are installed to the runtime destination
All destinations use CMake's standard directory variables for proper cross-platform compatibility. The change is backward compatible and maintains the same installation behavior while satisfying CMake 3.12+ requirements.
Fixes#1118.
The cursor_ variable was being default initialized, which causes
undefined behaviour when accessing properties in
ScreenInteractive::Draw. This caused a crash when running with UBSAN.
```
ftxui/src/ftxui/component/screen_interactive.cpp:852:17: runtime error:
load of value 4195502944, which is not a valid value for type 'Shape'
```
This change causes the shape variable to be explicitly initialized,
similar to the x and y members.
Co-authored-by: Benjamin Gwin <bgwin@google.com>