1876 Commits

Author SHA1 Message Date
dependabot[bot]
54bb651008
build(deps): bump hashbrown from 0.15.2 to 0.15.3 (#1821) 2025-05-12 08:45:08 -07:00
Jagoda Estera Ślązak
daeba85f14
build(deps): bump kasuari and line-clipping (#1844) 2025-05-12 01:55:49 -07:00
Josh McKinney
93143126b3
fix(layout): feature flag cache related types (#1842) 2025-05-11 01:55:12 -07:00
Jagoda Estera Ślązak
b46778dd1d
chore(breaking-changes): add details to no_std-related breaking changes (#1828)
Some corrections and added details to BREAKING-CHANGES.md.

I decided to remove:

- `Backend` now uses `Self::Error` for error handling instead of
`std::io::Error`
- `Terminal<B>` now uses `B::Error` for error handling instead of
`std::io::Error`

...as we are still using `std::io::Error` in built-in backends, so this
will only be breaking if a third-party backend decides to use a custom
error other than `std::io::Error`, which would be a breaking change in
downstream and not `ratatui`.

The exception to that is `TestBackend`, which uses `Infallible`, but
this already has its own breaking changes entry.
2025-05-11 11:45:30 +03:00
Josh McKinney
8d60e96b2b
refactor(examples): use crossterm event methods (#1792)
Crossterm 0.29 introduced methods to easily check / extract the event
type. E.g. as_key_press_event() and is_key_press(). This commit
updates the examples to use these methods instead of matching on
the event type. This makes the code cleaner and easier to read.

Also does a general cleanup of the event handling code in the examples.
2025-05-10 10:35:12 -07:00
Jagoda Estera Ślązak
1874b9dd55
chore: move time to dev-dependencies (#1835) 2025-05-10 08:11:00 -07:00
Jagoda Estera Ślązak
2dd1977c59
fix(layout-cache): import NonZeroUsize only when layout-cache is enabled (#1839)
This silences unused import warning, when `layout-cache` is disabled.
2025-05-10 08:09:47 -07:00
三咲雅 · Misaki Masa
c238aca83a
fix: padding_right() should set right padding instead of left (#1837)
Fixes https://github.com/ratatui/ratatui/issues/1836
2025-05-09 23:31:16 -07:00
Jagoda Estera Ślązak
60a81913ed
chore(widgets): move crossterm to dev-dependencies (#1834)
Crossterm in widgets is used only in tests.
2025-05-09 16:16:32 -07:00
Tayfun Bocek
2e54d5e22c
fix(macros): use $crate re-export in text macro (#1832) 2025-05-09 09:54:15 -07:00
Jagoda Estera Ślązak
3e1c72fb27
feat(no_std)!: make ratatui compatible with #![no_std] (#1794)
Resolves #1781

This PR makes it possible to compile ratatui with `#![no_std]`.
Also makes me answer "We Are So Embedded" to "Are We Embedded Yet?"
2025-05-07 13:42:03 -07:00
Jagoda Estera Ślązak
ab48c06171
feat(no_std)!: option to disable layout cache for no_std compatibility (#1795)
Resolves #1780 

BREAKING CHANGE: Disabling `default-features` will now disable layout
cache, which can have a negative impact on performance.
`Layout::init_cache` and `Layout::DEFAULT_CACHE_SIZE` are now only
available if `layout-cache` feature is enabled.
2025-05-07 13:00:22 -07:00
Jagoda Estera Ślązak
09173d1829
feat(no_std)!: make TestBackend::Error Infallible (#1823)
BREAKING CHANGE: `TestBackend` now uses `core::convert::Infallible` for
error handling instead of `std::io::Error`
2025-05-07 00:33:26 -07:00
Jagoda Estera Ślązak
c7912f3990
docs(breaking-changes): fix header level (#1825) 2025-05-06 23:17:37 -07:00
M Arjun Krishna
53cdbbccd5
feat: Enable serde propagation to backend crates (crossterm, termion) (#1812)
This PR propagates the serde feature from the main ratatui crate to the
ratatui-crossterm and ratatui-termion backend crates. Solves #1805
2025-04-29 13:29:49 -07:00
Josh McKinney
1197b2a02c
docs(contributing): add note about using nightly for formatting (#1816) 2025-04-28 21:25:09 +03:00
Tatesa Uradnik
08b08cc45b
feat(rect): centering (#1814)
Resolves #617
2025-04-28 11:16:58 -07:00
Jagoda Estera Ślązak
007713e50a
feat(no_std)!: replace Backend's io::Error usages with associated Error type (#1778)
Resolves #1775 

BREAKING CHANGE: Custom backends now have to implement `Backend::Error`
and `Backend::clear_region`. Additionally some generic `Backend` usage
will have to explicitly set trait bounds for `Backend::Error`.
2025-04-23 15:05:59 -07:00
dependabot[bot]
3745a67ba0
build(deps): bump rand from 0.9.0 to 0.9.1 (#1804)
Bumps [rand](https://github.com/rust-random/rand) from 0.9.0 to 0.9.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-random/rand/blob/master/CHANGELOG.md">rand's
changelog</a>.</em></p>
<blockquote>
<h2>[0.9.1] - 2025-04-17</h2>
<h3>Security and unsafe</h3>
<ul>
<li>Revise &quot;not a crypto library&quot; policy again (<a
href="https://redirect.github.com/rust-random/rand/issues/1565">#1565</a>)</li>
<li>Remove <code>zerocopy</code> dependency from <code>rand</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1579">#1579</a>)</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Fix feature <code>simd_support</code> for recent nightly rust (<a
href="https://redirect.github.com/rust-random/rand/issues/1586">#1586</a>)</li>
</ul>
<h3>Changes</h3>
<ul>
<li>Allow <code>fn rand::seq::index::sample_weighted</code> and <code>fn
IndexedRandom::choose_multiple_weighted</code> to return fewer than
<code>amount</code> results (<a
href="https://redirect.github.com/rust-random/rand/issues/1623">#1623</a>),
reverting an undocumented change (<a
href="https://redirect.github.com/rust-random/rand/issues/1382">#1382</a>)
to the previous release.</li>
</ul>
<h3>Additions</h3>
<ul>
<li>Add <code>rand::distr::Alphabetic</code> distribution. (<a
href="https://redirect.github.com/rust-random/rand/issues/1587">#1587</a>)</li>
<li>Re-export <code>rand_core</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1604">#1604</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ec6d5c06a5"><code>ec6d5c0</code></a>
Prepare rand_core v0.9.1 (<a
href="https://redirect.github.com/rust-random/rand/issues/1591">#1591</a>)</li>
<li><a
href="6a06056e8a"><code>6a06056</code></a>
rand_core: introduce an UnwrapMut wrapper (<a
href="https://redirect.github.com/rust-random/rand/issues/1589">#1589</a>)</li>
<li><a
href="8929123b4d"><code>8929123</code></a>
Add <code>Alphabetic</code> distribution (<a
href="https://redirect.github.com/rust-random/rand/issues/1587">#1587</a>)</li>
<li><a
href="06b16426bd"><code>06b1642</code></a>
Remove unnecessary underscore from `impl&lt;T, const N: usize&gt;
Distribution&lt;[T; ...</li>
<li><a
href="49d76cd7b4"><code>49d76cd</code></a>
rename extract to extract_lane (<a
href="https://redirect.github.com/rust-random/rand/issues/1586">#1586</a>)</li>
<li><a
href="e0a70fd8be"><code>e0a70fd</code></a>
Change to use <code>array::from_fn</code> in <code>Distribution\&lt;[T;
N]&gt; for StandardUniform</code> ...</li>
<li><a
href="0bc3f652c4"><code>0bc3f65</code></a>
Move rand distr (<a
href="https://redirect.github.com/rust-random/rand/issues/1577">#1577</a>)</li>
<li><a
href="2677c49960"><code>2677c49</code></a>
Revise &quot;not a crypto library&quot; policy and SECURITY.md (<a
href="https://redirect.github.com/rust-random/rand/issues/1565">#1565</a>)</li>
<li><a
href="bfd1826c36"><code>bfd1826</code></a>
SeedableRng docs: add note on (lack of) reproducibility (<a
href="https://redirect.github.com/rust-random/rand/issues/1572">#1572</a>)</li>
<li><a
href="c01aee7a13"><code>c01aee7</code></a>
Fix some links (<a
href="https://redirect.github.com/rust-random/rand/issues/1571">#1571</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-random/rand/compare/0.9.0...rand_core-0.9.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rand&package-manager=cargo&previous-version=0.9.0&new-version=0.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-21 21:14:44 +03:00
dependabot[bot]
98f77f296b
build(deps): bump clap from 4.5.36 to 4.5.37 (#1803)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.36 to 4.5.37.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.37</h2>
<h2>[4.5.37] - 2025-04-18</h2>
<h3>Features</h3>
<ul>
<li>Added <code>ArgMatches::try_clear_id()</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.37] - 2025-04-18</h2>
<h3>Features</h3>
<ul>
<li>Added <code>ArgMatches::try_clear_id()</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c54ffa17f5"><code>c54ffa1</code></a>
chore: Release</li>
<li><a
href="26eab7b4e5"><code>26eab7b</code></a>
docs: Update changelog</li>
<li><a
href="f275804c23"><code>f275804</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5805">#5805</a>
from epage/style</li>
<li><a
href="7c7742cae8"><code>7c7742c</code></a>
fix(complete): Adjust dynamic for MSRV</li>
<li><a
href="f1ae3c0e49"><code>f1ae3c0</code></a>
style: Make clippy happy</li>
<li><a
href="5c932b7079"><code>5c932b7</code></a>
chore(deps): Update Rust crate divan to v0.1.15 (<a
href="https://redirect.github.com/clap-rs/clap/issues/5798">#5798</a>)</li>
<li><a
href="bc0537f589"><code>bc0537f</code></a>
chore(deps): Update compatible (dev) (<a
href="https://redirect.github.com/clap-rs/clap/issues/5797">#5797</a>)</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.36...clap_complete-v4.5.37">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.36&new-version=4.5.37)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-21 21:01:16 +03:00
Tyler Breisacher
d88cd29079
chore: Add 'const' to functions where possible. (#1802)
The Clippy check for this (missing_const_for_fn) is already enabled, but
catches more cases in upcoming toolchain versions.

This is part of the work to unblock #1727
2025-04-20 18:48:49 -07:00
Josh McKinney
79cc92dfb6
chore(deps): bump proc-macro2 (#1793) 2025-04-17 01:03:23 -07:00
Josh McKinney
5a3be12ebd
ci: run clippy using rust stable and beta (#1757)
This makes it possible to pre-emptively catch upcoming clippy issues. We
should not block PRs on these generally (unless the PR introduces a
valid clippy warning), so the workflow is set up to not fail on beta.
2025-04-15 11:09:20 -07:00
Josh McKinney
bb068892c9
chore: fix io_other_error clippy lints (#1756)
Pre-emptive fix for new lint to be added in 1.87 (currently in beta).

https://rust-lang.github.io/rust-clippy/master/index.html\#io_other_error
2025-04-15 11:09:05 -07:00
cgzones
deb1b8ec43
test: ensure Style::new() and Style::default() are equivalent (#1789) 2025-04-15 10:21:19 -07:00
cgzones
0f80c5e87e
chore!: use expect() instead of allow() for lint overrides (#1786)
BREAKING CHANGE: MSRV is now 1.81
2025-04-15 10:20:22 -07:00
dependabot[bot]
a03ba0de5c
build(deps): bump crossterm from 0.28.1 to 0.29.0 (#1771)
Bumps [crossterm](https://github.com/crossterm-rs/crossterm) from 0.28.1
to 0.29.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crossterm-rs/crossterm/releases">crossterm's
releases</a>.</em></p>
<blockquote>
<h2>0.29</h2>
<h1>Version 0.29</h1>
<h2>Added </h2>
<ul>
<li>Copy to clipboard using OSC52 (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/974">#974</a>)</li>
<li>Derive standard traits for &quot;SetCursorStyle&quot; (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/909">#909</a>)</li>
<li>Add query_keyboard_enhancement_flags to read enabled flags (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/958">#958</a>)</li>
<li>Add is_* and as_* methods to the event enums (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/949">#949</a>)</li>
<li>Add a feature flag for derive_more impls (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/970">#970</a>)</li>
<li>Update rustix to 1.0 (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/982">#982</a>)</li>
<li>Upgrade various dependencies</li>
</ul>
<h2>Breaking ⚠️</h2>
<ul>
<li>Correctly fix KeyModifiers Display impl Properly adding + in between
modifiers (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/979">#979</a>)</li>
</ul>
<p><a href="https://github.com/joshka"><code>@​joshka</code></a> <a
href="https://github.com/linrongbin16"><code>@​linrongbin16</code></a>
<a href="https://github.com/kmicklas"><code>@​kmicklas</code></a> <a
href="https://github.com/maciek50322"><code>@​maciek50322</code></a> <a
href="https://github.com/rosew0od"><code>@​rosew0od</code></a> <a
href="https://github.com/sxyazi"><code>@​sxyazi</code></a> <a
href="https://github.com/the-mikedavis"><code>@​the-mikedavis</code></a>
<a href="https://github.com/hthuz"><code>@​hthuz</code></a> <a
href="https://github.com/aschey"><code>@​aschey</code></a> <a
href="https://github.com/naseschwarz"><code>@​naseschwarz</code></a> <a
href="https://github.com/Flokkq"><code>@​Flokkq</code></a> <a
href="https://github.com/gaesa"><code>@​gaesa</code></a> <a
href="https://github.com/WindSoilder"><code>@​WindSoilder</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md">crossterm's
changelog</a>.</em></p>
<blockquote>
<h1>Unreleased</h1>
<h1>Version 0.29</h1>
<h2>Added </h2>
<ul>
<li>Copy to clipboard using OSC52 (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/974">#974</a>)</li>
<li>Derive standard traits for &quot;SetCursorStyle&quot; (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/909">#909</a>)</li>
<li>Add query_keyboard_enhancement_flags to read enabled flags (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/958">#958</a>)</li>
<li>Add is_* and as_* methods to the event enums (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/949">#949</a>)</li>
<li>Add a feature flag for derive_more impls (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/970">#970</a>)</li>
<li>Update rustix to 1.0 (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/982">#982</a>)</li>
</ul>
<h2>Breaking ⚠️</h2>
<ul>
<li>Correctly fix KeyModifiers Display impl Properly adding + in between
modifiers (<a
href="https://redirect.github.com/crossterm-rs/crossterm/issues/979">#979</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/crossterm-rs/crossterm/commits/0.29">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crossterm&package-manager=cargo&previous-version=0.28.1&new-version=0.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh McKinney <joshka@users.noreply.github.com>
2025-04-15 09:35:41 -07:00
Jagoda Estera Ślązak
b4a71e5fd5
chore(lint): add std instead of core/alloc lints to ratatui-widgets (#1763)
Resolves #1761
2025-04-15 09:21:46 -07:00
Jagoda Estera Ślązak
a42a17e184
feat(no_std): make ratatui-widgets no_std (#1779)
Resolves #1776
2025-04-15 09:16:06 -07:00
Edwin Burwell
07bec55b7d
refactor(no_std): Make usages of std explicit in ratatui-core. (#1782)
### This commit does the following:

- Adds `#[no_std]` to `lib.rs`.
- Adds `extern crate std;` to `lib.rs`.
- Updates `ratatui-core` to explicitly `use` items from std and alloc.
- Prefers `use`-ing alloc over std when possible.

### Explanation:

This allows usages of `std` in `ratatui-core` to be clearly pointed out
and dealt with individually.

Eventually, when `std` is to be feature gated, the associated commit
will be much cleaner.
2025-04-15 09:14:25 -07:00
cgzones
02e53de0f8
refactor: make use of iter::repeat_n() (#1788)
Applied via clippy --fix.
Available since 1.82.0.
2025-04-14 21:43:38 +03:00
cgzones
c90ba9781e
fix: avoid unnecessary imports in minimal build (#1787)
core::ops::Range is only used with the feature `scrolling-regions`.
Ensure a minimal `cargo check` reports no warnings.
2025-04-14 21:38:47 +03:00
dependabot[bot]
799a6c66a7
build(deps): bump clap from 4.5.35 to 4.5.36 (#1790)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.35 to 4.5.36.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.36</h2>
<h2>[4.5.36] - 2025-04-11</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Revert 4.5.35's &quot;Don't leave space for shorts
if there are none&quot; for now</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.36] - 2025-04-11</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Revert 4.5.35's &quot;Don't leave space for shorts
if there are none&quot; for now</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7a6475e3c1"><code>7a6475e</code></a>
chore: Release</li>
<li><a
href="0266c4197f"><code>0266c41</code></a>
docs: Update changelog</li>
<li><a
href="6ec0b43448"><code>6ec0b43</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5791">#5791</a>
from okapia/zsh-default-fallback</li>
<li><a
href="e40168c2fd"><code>e40168c</code></a>
fix(zsh): Use _default as zsh completion fallback</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.35...clap_complete-v4.5.36">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.35&new-version=4.5.36)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 20:49:18 +03:00
Ben Beasley
fc4b996c59
build(deps): update compact_str requirement from 0.8.1 to 0.9.0 (#1783)
Looking at
https://github.com/ParkMyCar/compact_str/blob/v0.9.0/CHANGELOG.md#090,
there are a few API changes, but it doesn’t seem like anything there
should be a problem given that `cargo test` still passes in
`ratatui-core/`.
2025-04-13 10:51:21 +03:00
Austin Schey
6836a6903e
feat: implement styled for other primitives (#1684) 2025-04-11 07:52:33 -07:00
Cristian Le
d28a08237a
chore(deps): drop unused font8x8 dependency (#1777) 2025-04-11 15:28:11 +03:00
dependabot[bot]
5f8c159484
build(deps): bump crossbeam-channel from 0.5.14 to 0.5.15 in the cargo group (#1774)
Bumps the cargo group with 1 update:
[crossbeam-channel](https://github.com/crossbeam-rs/crossbeam).

Updates `crossbeam-channel` from 0.5.14 to 0.5.15
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crossbeam-rs/crossbeam/releases">crossbeam-channel's
releases</a>.</em></p>
<blockquote>
<h2>crossbeam-channel 0.5.15</h2>
<ul>
<li>Fix regression introduced in 0.5.12 that can lead to a double free
when dropping unbounded channel. (<a
href="https://redirect.github.com/crossbeam-rs/crossbeam/issues/1187">#1187</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d35ffde18a"><code>d35ffde</code></a>
Prepare for the next release</li>
<li><a
href="6ec74ecae8"><code>6ec74ec</code></a>
crossbeam-channel: prevent double free on Drop (<a
href="https://redirect.github.com/crossbeam-rs/crossbeam/issues/1187">#1187</a>)</li>
<li>See full diff in <a
href="https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crossbeam-channel&package-manager=cargo&previous-version=0.5.14&new-version=0.5.15)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/ratatui/ratatui/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-11 14:36:09 +03:00
Jagoda Estera Ślązak
5a232a3115
feat(no_std): remove redundant std usages in ratatui-widgets (#1762) 2025-04-08 08:59:31 -07:00
dependabot[bot]
577bd17bba
build(deps): bump clap from 4.5.34 to 4.5.35 (#1770)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.34 to 4.5.35.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.35</h2>
<h2>[4.5.35] - 2025-04-01</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Align positionals and flags when put in the same
<code>help_heading</code></li>
<li><em>(help)</em> Don't leave space for shorts if there are none</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.35] - 2025-04-01</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Align positionals and flags when put in the same
<code>help_heading</code></li>
<li><em>(help)</em> Don't leave space for shorts if there are none</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="55a18f518b"><code>55a18f5</code></a>
chore: Release</li>
<li><a
href="3b0563580d"><code>3b05635</code></a>
fix(complete): Ensure new enough clap is used</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.34...clap_complete-v4.5.35">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.34&new-version=4.5.35)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-08 13:23:20 +03:00
dependabot[bot]
fdc1746eff
build(deps): bump tokio from 1.44.1 to 1.44.2 (#1769)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.1 to 1.44.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.44.2</h2>
<p>This release fixes a soundness issue in the broadcast channel. The
channel
accepts values that are <code>Send</code> but <code>!Sync</code>.
Previously, the channel called
<code>clone()</code> on these values without synchronizing. This release
fixes the channel
by synchronizing calls to <code>.clone()</code> (Thanks Austin Bonander
for finding and
reporting the issue).</p>
<h3>Fixed</h3>
<ul>
<li>sync: synchronize <code>clone()</code> call in broadcast channel (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7232">#7232</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/7232">#7232</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7232">tokio-rs/tokio#7232</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ec4b1d7215"><code>ec4b1d7</code></a>
chore: forward port 1.43.x</li>
<li><a
href="e3c3a56718"><code>e3c3a56</code></a>
Merge branch 'tokio-1.43.x' into forward-port-1.43.x</li>
<li><a
href="a7b658c35b"><code>a7b658c</code></a>
chore: prepare Tokio v1.43.1 release</li>
<li><a
href="c1c8d1033d"><code>c1c8d10</code></a>
Merge remote-tracking branch 'origin/tokio-1.38.x' into
forward-port-1.38.x</li>
<li><a
href="aa303bc205"><code>aa303bc</code></a>
chore: prepare Tokio v1.38.2 release</li>
<li><a
href="7b6ccb515f"><code>7b6ccb5</code></a>
chore: backport CI fixes</li>
<li><a
href="4b174ce2c9"><code>4b174ce</code></a>
sync: fix cloning value when receiving from broadcast channel</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.44.1...tokio-1.44.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.44.1&new-version=1.44.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-08 13:23:02 +03:00
Josh McKinney
fcb47d60f3
feat!: rename Alignment to HorizontalAlignment and add VerticalAlignment (#1735)
We don't anticipate removing or deprecating the type alias in the near
future, but it is recommended to update your imports to use the new
name.

Added a VerticalAlignment enum to make the API more consistent. We don't
have a specific use case for it yet, but it's better to add it now and
be able to use it in the future.

BREAKING-CHANGE: The `Alignment` enum has been renamed to
`HorizontalAlignment` to better reflect its purpose. A type alias has
been added to maintain backwards compatibility, however there are some
cases where type aliases are not enough to maintain backwards
compatibility. E.g. when using glob imports to import all the enum
variants. This should not affect most users, but it is recommended to
update your imports to use the new name.

```diff
- use ratatui::layout::Alignment;
+ use ratatui::layout::HorizontalAlignment;

- use Alignment::*;
+ use HorizontalAlignment::*;
```
2025-04-06 20:00:59 +03:00
Jagoda Estera Ślązak
2be9ccb120
docs(layout): remove unnecessary path prefix (#1766) 2025-04-06 18:19:36 +03:00
Jagoda Estera Ślązak
b669cebcaf
docs(layout): change cassowary to kasuari crate reference (#1765) 2025-04-06 18:19:19 +03:00
Jagoda Estera Ślązak
cef617cc35
chore(lint): add std instead of core/alloc lints to ratatui-core (#1759)
Resolves #1752
2025-04-04 03:59:22 -07:00
Josh McKinney
3d5b250e74
build(deps): use kasuari instead of cassowary (#1758)
[Kasuari](https://github.com/ratatui/kasuari) is a maintained fork of Cassowary.
2025-04-04 00:03:39 -07:00
Jagoda Estera Ślązak
ebe10cd81f
feat(no_std): remove redundant std usages in ratatui-core (#1753)
Resolves https://github.com/ratatui/ratatui/issues/1751
2025-04-03 20:02:54 -07:00
Jagoda Estera Ślązak
416ebdf8c8
fix: correct clippy errors introduced by rust 1.86.0 update (#1755)
New version of rust (1.86.0) caused CI to fail.
2025-04-03 16:43:12 -07:00
Jagoda Estera Ślązak
ce16692b9a
docs(release): fix typo (#1754) 2025-04-03 21:51:03 +03:00
EdJoPaTo
ba9eed7742
perf(table): replace while loop with simple min operation (#1747) 2025-04-02 14:55:47 -07:00
dependabot[bot]
c27fba06f1
build(deps): bump clap from 4.5.32 to 4.5.34 (#1742)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.32 to 4.5.34.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.34</h2>
<h2>[4.5.34] - 2025-03-27</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Don't add extra blank lines with
<code>flatten_help(true)</code> and subcommands without arguments</li>
</ul>
<h2>v4.5.33</h2>
<h2>[4.5.33] - 2025-03-26</h2>
<h3>Fixes</h3>
<ul>
<li><em>(error)</em> When showing the usage of a suggestion for an
unknown argument, don't show the group</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.34] - 2025-03-27</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Don't add extra blank lines with
<code>flatten_help(true)</code> and subcommands without arguments</li>
</ul>
<h2>[4.5.33] - 2025-03-26</h2>
<h3>Fixes</h3>
<ul>
<li><em>(error)</em> When showing the usage of a suggestion for an
unknown argument, don't show the group</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5d2cdac3e6"><code>5d2cdac</code></a>
chore: Release</li>
<li><a
href="f1c10ebe58"><code>f1c10eb</code></a>
docs: Update changelog</li>
<li><a
href="a4d1a7fe2b"><code>a4d1a7f</code></a>
chore(ci): Take a break from template updates</li>
<li><a
href="e95ed396c4"><code>e95ed39</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5775">#5775</a>
from vivienm/master</li>
<li><a
href="18f8d4c3f5"><code>18f8d4c</code></a>
chore(deps): Update Rust Stable to v1.82 (<a
href="https://redirect.github.com/clap-rs/clap/issues/5788">#5788</a>)</li>
<li><a
href="f35d8e09fb"><code>f35d8e0</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5787">#5787</a>
from epage/template</li>
<li><a
href="1389d7d689"><code>1389d7d</code></a>
chore: Update from '_rust/main' template</li>
<li><a
href="dbc9faa79d"><code>dbc9faa</code></a>
chore(ci): Initialize git for template update</li>
<li><a
href="3dac2f3683"><code>3dac2f3</code></a>
chore(ci): Get history for template update</li>
<li><a
href="e1f77dacf1"><code>e1f77da</code></a>
chore(ci): Fix branch for template update</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.32...clap_complete-v4.5.34">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.32&new-version=4.5.34)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-01 07:33:01 +03:00