Commit graph

7 commits

Author SHA1 Message Date
Josh McKinney
a41c97b413
chore: move unstable widget refs to ratatui (#1491)
These are less stable than the non-ref traits as we have not yet
committed to the exact API. This change moves them to ratatui from
ratatui-core.

To facilitate this:
- implementations of WidgetRef for all internal widgets are removed and
  replaced with implementations of Widget for references to those
  widgets.
- Widget is now implemented for Option<W> where W: Widget, allowing for
  rendering of optional widgets.
- The blanket implementation of Widget for WidgetRef is reversed, to be
  a blanket implementation of WidgetRef for all &W where W: Widget.

BREAKING CHANGE: implementations of WidgetRef no longer have a blanket
implementation of Widget, so Widgets should generally implement the
Widget trait on a reference to the widget rather than implementing
WidgetRef directly. This has the advantage of not requiring unstable
features to be enabled.

Part of: https://github.com/ratatui/ratatui/issues/1388

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-11-18 14:19:21 -08:00
Orhun Parmaksız
46902f5587
docs: improve docs for workspace crates (#1490)
Overall makes improvements in the documentation of the workspace crates and checking them.
2024-11-18 02:03:44 +03:00
Josh McKinney
e7085e3a3e
chore: move widgets into ratatui-widgets crate (#1474)
All the widgets now live in their own ratatui-widgets crate, but are re-exported in the main ratatui crate.
This makes it easier to use portions of the ratatui library and is part of the effort to modularize

Part of: #1388

---------

Co-authored-by: Orhun Parmaksız <orhun@archlinux.org>
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-11-15 19:42:07 -08:00
Josh McKinney
e461b724a6
refactor: move {Stateful,}Widget{,Ref} types into individual files (#1479)
This is a preparatory refactoring for modularization. No user visible
changes.
2024-11-12 15:34:48 +03:00
dependabot[bot]
02c8c9373e
chore(deps): bump unicode-truncate from 1.1.0 to 2.0.0 (#1481)
Bumps [unicode-truncate](https://github.com/Aetf/unicode-truncate) from
1.1.0 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Aetf/unicode-truncate/releases">unicode-truncate's
releases</a>.</em></p>
<blockquote>
<h2>v2.0.0</h2>
<h3>Fixed</h3>
<ul>
<li><em>(deps)</em> update rust crate unicode-width to 0.2</li>
</ul>
<h3>Other</h3>
<ul>
<li>make release-plz use github app token</li>
<li>[<strong>breaking</strong>] bump MSRV to 1.66</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Aetf/unicode-truncate/blob/master/CHANGELOG.md">unicode-truncate's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/Aetf/unicode-truncate/compare/v1.1.0...v2.0.0">2.0.0</a>
- 2024-11-10</h2>
<h3>Fixed</h3>
<ul>
<li><em>(deps)</em> update rust crate unicode-width to 0.2</li>
</ul>
<h3>Other</h3>
<ul>
<li>make release-plz use github app token</li>
<li>[<strong>breaking</strong>] bump MSRV to 1.66</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="95b4d26103"><code>95b4d26</code></a>
chore: release v2.0.0</li>
<li><a
href="4c0b472226"><code>4c0b472</code></a>
ci: make release-plz use github app token</li>
<li><a
href="2812162513"><code>2812162</code></a>
build!: bump MSRV to 1.66</li>
<li><a
href="8984d1529a"><code>8984d15</code></a>
fix(deps): update rust crate unicode-width to 0.2</li>
<li><a
href="abd6d916b9"><code>abd6d91</code></a>
fix(deps): update rust crate unicode-segmentation to v1.12.0</li>
<li>See full diff in <a
href="https://github.com/Aetf/unicode-truncate/compare/v1.1.0...v2.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=unicode-truncate&package-manager=cargo&previous-version=1.1.0&new-version=2.0.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>
2024-11-12 03:42:47 -08:00
Orhun Parmaksız
e5e2316451
chore(ci): add check for keeping README.md up-to-date (#1473) 2024-11-07 09:45:14 +03:00
Josh McKinney
98df774d7f
chore(core): move core types to ratatui-core (#1460)
The buffer, layout, style, symbols, text, and the top level of widgets
modules are moved to ratatui-core. This is the first step in
modularizing the library so that the core types can be used in other
projects without the need for the backend / widgets types.

This helps reduce the need for updating other crates as often due to
semver changes outside of the core types.

---------

Co-authored-by: Orhun Parmaksız <orhun@archlinux.org>
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-11-06 09:10:49 +03:00