ratatui_ruby 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a44249eb77ada15e7b0705c6fc4367241584f68271d932bc76b1b2dc1ee7d98
4
- data.tar.gz: 4758da71c5a93dd47d0f6b1929e8980ff70c9f4de49d09c70948546266b91def
3
+ metadata.gz: 45627e7b77b76ba56a7cb5bb3b0cb578d282a26782c6702abdc87893d89e14a9
4
+ data.tar.gz: b401cd48eb576970a74c8efc7bf22dba20a9bbd4d4378ff85b4a3f45797a3e31
5
5
  SHA512:
6
- metadata.gz: bb685f50e374810635686659567feeca0bf0f47760718b84586226585e417c6bfb51a75720bc4ec563f49e80f46382a74283a22d523f38ff5b140cfe0e849cd8
7
- data.tar.gz: 0e56b7c647489c2ef550575b6666317c9d93be3a911f386e2f113e3cb4a55eb0fc654623525d0117139466323496421770e487b4f547bddeac22df4024bf6de3
6
+ metadata.gz: 8ef1ed4f7c6c35df19e7955fd9fc752e5b73da316380fe21c9927b3f5c5fbc3d959948821b0c795572edf58cd43627be65922452f93dfa51dd54f93e1a2b164b
7
+ data.tar.gz: 13c4cb8c1de48f10920128527222f4ae94db9ac98f0ec1b3b975b3edd0a221859f352a2ddc570b0d955f566a393341413ea2e0ed9ea4e1e12f596973bf657723
data/.builds/ruby-3.2.yml CHANGED
@@ -16,7 +16,7 @@ packages:
16
16
  - clang
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.10.2.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.10.3.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
data/.builds/ruby-3.3.yml CHANGED
@@ -16,7 +16,7 @@ packages:
16
16
  - clang
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.10.2.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.10.3.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
data/.builds/ruby-3.4.yml CHANGED
@@ -16,7 +16,7 @@ packages:
16
16
  - clang
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.10.2.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.10.3.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
@@ -16,7 +16,7 @@ packages:
16
16
  - clang
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.10.2.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.10.3.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
data/CHANGELOG.md CHANGED
@@ -18,6 +18,26 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
18
18
 
19
19
  ### Removed
20
20
 
21
+ ## [0.10.3] - 2026-01-16
22
+
23
+ ### Added
24
+
25
+ - **Rect Destructuring**: `Rect` objects now support array destructuring (implementation of `to_ary`), allowing intuitive assignment like `x, y, w, h = rect`.
26
+ - **Global State Test Helpers**: New `RatatuiRuby::TestHelper::GlobalState` module (automatically included in `TestHelper`) provides `with_argv` and `with_env` methods for safely testing code that reads `ARGV` or `ENV`.
27
+
28
+ ### Changed
29
+
30
+ - **New Website**: RatatuiRuby now has a home on the world wide web at [www.ratatui-ruby.dev](https://www.ratatui-ruby.dev).
31
+ - **A New Way to Browse Examples**: You can now browse the source code of the example applications in our documentation site. See [AppAllEvents](https://www.ratatui-ruby.dev/docs/v0.10/examples/app_all_events/app_rb.html) for an example.
32
+ - **API Documentation on the Web**: RatatuiRuby's [extensive RDoc documentation is now available on the web](https://www.ratatui-ruby.dev/docs/v0.10/RatatuiRuby.html).
33
+ - **Guides on the Web**: RatatuiRuby's [in-depth guides are now available on the web](https://www.ratatui-ruby.dev/docs/v0.10/doc/index_md.html).
34
+ - **Versioned Examples, API Documentanion, and Guides**: API reference, guides, and examples are available on our website for current and past versions of ratatui_ruby, including the trunk version. Visit [www.ratatui-ruby.dev/docs](https://www.ratatui-ruby.dev/docs) to browse.
35
+
36
+ ### Fixed
37
+
38
+ - **Dependency Problems**: Removed the unused `ostruct` dependency from the gemspec. Added `rexml` as an explicit dependency.
39
+ - **Lazy REXML Loading**: `RatatuiRuby::Labs::A11y` now requires `rexml` lazily, preventing it from slowing down startup for users not using accessibility features.
40
+
21
41
  ## [0.10.2] - 2026-01-14
22
42
 
23
43
  ### Added
@@ -647,6 +667,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
647
667
  - **Testing Support**: Included `RatatuiRuby::TestHelper` and RSpec integration to make testing your TUI applications possible.
648
668
 
649
669
  [Unreleased]: https://git.sr.ht/~kerrick/ratatui_ruby/refs/HEAD
670
+ [0.10.3]: https://git.sr.ht/~kerrick/ratatui_ruby/refs/v0.10.3
650
671
  [0.10.2]: https://git.sr.ht/~kerrick/ratatui_ruby/refs/v0.10.2
651
672
  [0.10.1]: https://git.sr.ht/~kerrick/ratatui_ruby/refs/v0.10.1
652
673
  [0.10.1]: https://git.sr.ht/~kerrick/ratatui_ruby/refs/v0.10.1
@@ -0,0 +1,48 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Website Managed Loop Verification
7
+
8
+ Verifies the full-screen managed loop example on the [RatatuiRuby website](https://ratatui-ruby.dev).
9
+
10
+ This example exists as a documentation regression test. It ensures the website's "Build Something Real" managed loop demo remains functional.
11
+
12
+ ## Usage
13
+
14
+ ```ruby
15
+ RatatuiRuby.run do |tui|
16
+ loop do
17
+ tui.draw do |frame|
18
+ frame.render_widget(
19
+ tui.paragraph(
20
+ text: "Hello, RatatuiRuby!",
21
+ alignment: :center,
22
+ block: tui.block(
23
+ title: "My App",
24
+ titles: [{ content: "q: Quit", position: :bottom, alignment: :right }],
25
+ borders: [:all],
26
+ border_style: { fg: "cyan" }
27
+ )
28
+ ),
29
+ frame.area
30
+ )
31
+ end
32
+
33
+ case tui.poll_event
34
+ in { type: :key, code: "q" } | { type: :key, code: "c", modifiers: ["ctrl"] }
35
+ break
36
+ else nil
37
+ end
38
+ end
39
+ end
40
+ ```
41
+
42
+ ## Features Demonstrated
43
+
44
+ - **Full-screen mode**: Alternate screen with automatic terminal restoration
45
+ - **Managed lifecycle**: `RatatuiRuby.run` handles setup/teardown
46
+ - **Block with titles**: Top title and bottom key hints
47
+ - **Keyboard handling**: `q` and `Ctrl+C` to quit
48
+ - **Pattern matching**: Ruby 3.x pattern matching for event handling
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ #--
4
+ # SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
5
+ #
6
+ # SPDX-License-Identifier: AGPL-3.0-or-later
7
+ #++
8
+
9
+ # Test 3: Managed loop example
10
+ require "ratatui_ruby"
11
+
12
+ RatatuiRuby.run do |tui|
13
+ loop do
14
+ tui.draw do |frame|
15
+ frame.render_widget(
16
+ tui.paragraph(
17
+ text: "Hello, RatatuiRuby!",
18
+ alignment: :center,
19
+ block: tui.block(
20
+ title: "My App",
21
+ titles: [{ content: "q: Quit", position: :bottom, alignment: :right }],
22
+ borders: [:all],
23
+ border_style: { fg: "cyan" }
24
+ )
25
+ ),
26
+ frame.area
27
+ )
28
+ end
29
+
30
+ case tui.poll_event
31
+ in { type: :key, code: "q" } | { type: :key, code: "c", modifiers: ["ctrl"] }
32
+ break
33
+ else nil
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,60 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Website Menu Verification
7
+
8
+ Verifies the inline menu example on the [RatatuiRuby website](https://ratatui-ruby.dev).
9
+
10
+ This example exists as a documentation regression test. It ensures the website's inline viewport menu demo remains functional.
11
+
12
+ ## Usage
13
+
14
+ ```ruby
15
+ choices = ["Production", "Staging", "Development"]
16
+ index = 0
17
+
18
+ RatatuiRuby.run(viewport: :inline, height: 5) do |tui|
19
+ loop do
20
+ tui.draw do |frame|
21
+ items = choices.map.with_index do |c, i|
22
+ prefix = i == index ? "● " : "○ "
23
+ "#{prefix}#{c}"
24
+ end
25
+ widget = tui.paragraph(
26
+ text: items.join("\n"),
27
+ block: tui.block(
28
+ borders: :all,
29
+ title: "Select Environment",
30
+ titles: [{ content: "↑/↓ Enter | Ctrl+C", position: :bottom, alignment: :right }]
31
+ )
32
+ )
33
+ frame.render_widget(widget, frame.area)
34
+ end
35
+
36
+ case tui.poll_event
37
+ in { type: :key, code: "up" }
38
+ index = (index - 1) % choices.size
39
+ in { type: :key, code: "down" }
40
+ index = (index + 1) % choices.size
41
+ in { type: :key, code: "enter" } | { type: :key, code: "c", modifiers: ["ctrl"] }
42
+ area = tui.viewport_area
43
+ RatatuiRuby.cursor_position = [0, area.y + area.height]
44
+ break
45
+ else nil
46
+ end
47
+ end
48
+ end
49
+
50
+ puts
51
+ puts "Deploying to #{choices[index]}..."
52
+ ```
53
+
54
+ ## Features Demonstrated
55
+
56
+ - **Inline viewport**: 5-line viewport with bordered menu
57
+ - **Keyboard navigation**: Arrow keys for selection, Enter to confirm
58
+ - **Ctrl+C handling**: Graceful exit on cancellation
59
+ - **Bottom title**: Key hints rendered on the bottom border
60
+ - **Cursor positioning**: Proper cursor placement after inline viewport exit
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ #--
4
+ # SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
5
+ #
6
+ # SPDX-License-Identifier: AGPL-3.0-or-later
7
+ #++
8
+
9
+ # Test 2: Inline menu example (fixed)
10
+ require "ratatui_ruby"
11
+
12
+ choices = ["Production", "Staging", "Development"]
13
+ index = 0
14
+
15
+ RatatuiRuby.run(viewport: :inline, height: 5) do |tui|
16
+ loop do
17
+ tui.draw do |frame|
18
+ items = choices.map.with_index do |c, i|
19
+ prefix = (i == index) ? "● " : "○ "
20
+ "#{prefix}#{c}"
21
+ end
22
+ widget = tui.paragraph(
23
+ text: items.join("\n"),
24
+ block: tui.block(
25
+ borders: :all,
26
+ title: "Select Environment",
27
+ titles: [{ content: "↑/↓ Enter | Ctrl+C: Cancel", position: :bottom, alignment: :right }]
28
+ )
29
+ )
30
+ frame.render_widget(widget, frame.area)
31
+ end
32
+
33
+ case tui.poll_event
34
+ in { type: :key, code: "up" }
35
+ index = (index - 1) % choices.size
36
+ in { type: :key, code: "down" }
37
+ index = (index + 1) % choices.size
38
+ in { type: :key, code: "enter" }
39
+ area = tui.viewport_area
40
+ RatatuiRuby.cursor_position = [0, area.y + area.height]
41
+ break
42
+ in { type: :key, code: "c", modifiers: ["ctrl"] }
43
+ area = tui.viewport_area
44
+ RatatuiRuby.cursor_position = [0, area.y + area.height]
45
+ index = nil
46
+ break
47
+ else nil
48
+ end
49
+ end
50
+ end
51
+
52
+ puts
53
+ if index
54
+ puts "Deploying to #{choices[index]}..."
55
+ else
56
+ puts "Cancelled."
57
+ end
@@ -0,0 +1,44 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Website Spinner Verification
7
+
8
+ Verifies the inline spinner example on the [RatatuiRuby website](https://ratatui-ruby.dev).
9
+
10
+ This example exists as a documentation regression test. It ensures the website's inline viewport spinner demo remains functional.
11
+
12
+ ## Usage
13
+
14
+ ```ruby
15
+ class Spinner
16
+ def main
17
+ RatatuiRuby.run(viewport: :inline, height: 1) do |tui|
18
+ until connected?
19
+ status = tui.paragraph(text: "#{spin} Connecting...")
20
+ tui.draw { |frame| frame.render_widget(status, frame.area) }
21
+ return ending(tui, "Canceled!", :red) if tui.poll_event.ctrl_c?
22
+ end
23
+ ending(tui, "Connected!", :green)
24
+ end
25
+ end
26
+
27
+ def ending(tui, message, color) = tui.draw do |frame|
28
+ frame.render_widget(tui.paragraph(text: message, fg: color), frame.area)
29
+ end
30
+
31
+ def initialize = (@i, @end = 0, Time.now + 2)
32
+ def connected? = Time.now >= @end
33
+ def spin = SPINNER[(@i += 1) % SPINNER.length]
34
+ SPINNER = %w[⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏]
35
+ end
36
+ Spinner.new.main; puts
37
+ ```
38
+
39
+ ## Features Demonstrated
40
+
41
+ - **Inline viewport**: 1-line viewport that preserves terminal scrollback
42
+ - **Ctrl+C handling**: Graceful cancellation with `poll_event.ctrl_c?`
43
+ - **Colored output**: Status messages with `:red` and `:green` colors
44
+ - **Timeout pattern**: Uses `Time.now` for connection simulation
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ #--
4
+ # SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
5
+ #
6
+ # SPDX-License-Identifier: AGPL-3.0-or-later
7
+ #++
8
+
9
+ # Test 1: Inline spinner example
10
+ require "ratatui_ruby"
11
+
12
+ class Spinner
13
+ def main
14
+ RatatuiRuby.run(viewport: :inline, height: 1) do |tui|
15
+ until connected?
16
+ status = tui.paragraph(text: "#{spin} Connecting...")
17
+ tui.draw { |frame| frame.render_widget(status, frame.area) }
18
+ return ending(tui, "Canceled!", :red) if tui.poll_event.ctrl_c?
19
+ end
20
+ ending(tui, "Connected!", :green)
21
+ end
22
+ end
23
+
24
+ def ending(tui, message, color) = tui.draw do |frame|
25
+ frame.render_widget(tui.paragraph(text: message, fg: color), frame.area)
26
+ end
27
+
28
+ def initialize = (@frame, @finish = 0, Time.now + 1)
29
+ def connected? = Time.now >= @finish # Simulate work
30
+ def spin = SPINNER[(@frame += 1) % SPINNER.length]
31
+ SPINNER = %w[⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏]
32
+ end
33
+ Spinner.new.main; puts
@@ -1059,7 +1059,7 @@ dependencies = [
1059
1059
 
1060
1060
  [[package]]
1061
1061
  name = "ratatui_ruby"
1062
- version = "0.10.2"
1062
+ version = "0.10.3"
1063
1063
  dependencies = [
1064
1064
  "bumpalo",
1065
1065
  "lazy_static",
@@ -3,7 +3,7 @@
3
3
 
4
4
  [package]
5
5
  name = "ratatui_ruby"
6
- version = "0.10.2"
6
+ version = "0.10.3"
7
7
  edition = "2021"
8
8
 
9
9
  [lib]
@@ -6,7 +6,6 @@
6
6
  #++
7
7
 
8
8
  require "tmpdir"
9
- require "rexml/document"
10
9
 
11
10
  module RatatuiRuby
12
11
  module Labs
@@ -21,6 +20,7 @@ module RatatuiRuby
21
20
  class << self
22
21
  # Dumps the widget tree to XML (single widget for tree mode).
23
22
  def dump_widget_tree(widget, _area = nil)
23
+ ensure_rexml_loaded
24
24
  doc = REXML::Document.new
25
25
  doc.add(REXML::XMLDecl.new("1.0", "UTF-8"))
26
26
  doc.add(build_element(widget))
@@ -42,6 +42,7 @@ module RatatuiRuby
42
42
 
43
43
  # Dumps multiple widgets captured from Frame API mode.
44
44
  def dump_widgets(widgets_with_areas)
45
+ ensure_rexml_loaded
45
46
  Labs.warn_once!("Labs::A11y (RR_LABS=A11Y)")
46
47
 
47
48
  # Reset counter each frame for stable IDs
@@ -167,6 +168,14 @@ module RatatuiRuby
167
168
 
168
169
  element
169
170
  end
171
+
172
+ # Lazily loads REXML when first needed.
173
+ private def ensure_rexml_loaded
174
+ return if defined?(@rexml_loaded) && @rexml_loaded
175
+
176
+ require "rexml/document"
177
+ @rexml_loaded = true
178
+ end
170
179
  end
171
180
  end
172
181
  end
@@ -701,6 +701,30 @@ module RatatuiRuby
701
701
  centered_horizontally(horizontal_constraint).centered_vertically(vertical_constraint)
702
702
  end
703
703
 
704
+ # Enables array destructuring of the rectangle.
705
+ #
706
+ # Inline viewports and layout code often need position and size together.
707
+ # Accessing x, y, width, height individually is verbose.
708
+ #
709
+ # This method allows convenient array destructuring.
710
+ #
711
+ # === Example
712
+ #
713
+ #--
714
+ # SPDX-SnippetBegin
715
+ # SPDX-FileCopyrightText: 2026 Kerrick Long
716
+ # SPDX-License-Identifier: MIT-0
717
+ #++
718
+ # area = tui.viewport_area
719
+ # x, y, width, height = area
720
+ # # Now you can use x, y, width, height directly
721
+ #--
722
+ # SPDX-SnippetEnd
723
+ #++
724
+ def to_ary
725
+ [x, y, width, height]
726
+ end
727
+
704
728
  # Ruby-idiomatic aliases (TIMTOWTDI)
705
729
  alias position as_position
706
730
  alias size as_size
@@ -8,5 +8,5 @@
8
8
  module RatatuiRuby
9
9
  # The version of the ratatui_ruby gem.
10
10
  # See https://semver.org/spec/v2.0.0.html
11
- VERSION = "0.10.2"
11
+ VERSION = "0.10.3"
12
12
  end
@@ -58,6 +58,8 @@ module RatatuiRuby
58
58
  module A11y
59
59
  OUTPUT_PATH: String
60
60
 
61
+ @rexml_loaded: bool?
62
+
61
63
  def self.dump_widget_tree: ((_CustomWidget | widget) widget, ?Layout::Rect? area) -> void
62
64
  def self.dump_widgets: (Array[[(_CustomWidget | widget), Layout::Rect]] widgets_with_areas) -> void
63
65
  def self.startup_message: () -> String
@@ -70,6 +72,7 @@ module RatatuiRuby
70
72
  def self.add_members: (REXML::Element element, untyped node, ?parent_id: String?) -> void
71
73
  def self.scalar?: (untyped value) -> bool
72
74
  def self.build_child_element: (Symbol key, untyped value, ?is_wrapper: bool, ?parent_id: String?) -> REXML::Element
75
+ def self.ensure_rexml_loaded: () -> void
73
76
  end
74
77
  end
75
78
 
@@ -5,40 +5,137 @@ SPDX-License-Identifier: AGPL-3.0-or-later
5
5
  -->
6
6
 
7
7
  <!DOCTYPE html>
8
- <html>
8
+ <html lang="en">
9
9
  <head>
10
+ <meta charset="UTF-8">
10
11
  <title><%= project_name %> documentation</title>
11
12
  <meta name="viewport" content="width=device-width, initial-scale=1">
12
- <style>
13
- :root { color-scheme: light dark; }
14
- body { font-family: system-ui, sans-serif; max-width: 800px; margin: 0 auto; padding: 2rem; line-height: 1.5; color: light-dark(#111, #eee); background: light-dark(#fff, #111); }
15
- h1 { border-bottom: 2px solid light-dark(#eee, #333); padding-bottom: 0.5rem; }
16
- ul { list-style: none; padding: 0; }
17
- li { margin: 0.5rem 0; border: 1px solid light-dark(#ddd, #444); border-radius: 4px; }
18
- a { display: block; padding: 1rem; text-decoration: none; color: light-dark(#0055aa, #44aaff); font-weight: bold; }
19
- a:hover { background: light-dark(#f5f5f5, #222); }
20
- .meta { font-weight: normal; color: light-dark(#666, #aaa); font-size: 0.9em; float: right; }
21
- </style>
13
+ <meta name="description" content="API documentation and guides for <%= project_name %>, organized by version.">
14
+ <link rel="stylesheet" href="../styles.css">
15
+ <link rel="preconnect" href="https://fonts.googleapis.com">
16
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
17
+ <link
18
+ href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Source+Sans+3:ital,wght@0,300..900;1,300..900&display=swap"
19
+ rel="stylesheet">
22
20
  </head>
23
21
  <body>
24
- <h1><%= project_name %> documentation</h1>
25
- <ul>
26
- <% versions.each do |version| %>
27
- <li>
28
- <a href='<%= version.slug %>/index.html'>
29
- <%= version.name %>
30
- <span class='meta'>
31
- <% if version.latest? %>
32
- Latest
33
- <% elsif version.edge? %>
34
- Edge
35
- <% else %>
36
- Historical
37
- <% end %>
38
- </span>
39
- </a>
40
- </li>
41
- <% end %>
42
- </ul>
22
+ <header class="header">
23
+ <div class="header__inner">
24
+ <a href="/" class="header__brand">
25
+ <img src="../logo-small.png" alt="RatatuiRuby Logo" class="header__logo" width="48" height="48">
26
+ <span class="header__wordmark">RatatuiRuby</span>
27
+ </a>
28
+ <nav class="header__nav" aria-label="Primary">
29
+ <a href="/#rich-moments">Better <abbr title="Command Line Interfaces">CLIs</abbr></a>
30
+ <a href="/#build">Full <abbr title="Terminal User Interfaces">TUIs</abbr></a>
31
+ <a href="/#frameworks">Frameworks</a>
32
+ <a href="/docs/v0.10/" class="header__nav-external">API →</a>
33
+ <a href="/docs/v0.10/doc/index_md.html" class="header__nav-external">Guides →</a>
34
+ </nav>
35
+ </div>
36
+ </header>
37
+
38
+ <main>
39
+ <section class="section">
40
+ <div class="section__inner">
41
+ <header class="section__header">
42
+ <span class="section__eyebrow">Reference</span>
43
+ <h1 class="section__title">Documentation</h1>
44
+ <p class="section__intro">API reference, guides, and examples for current and past versions of <%= project_name %>.</p>
45
+ </header>
46
+
47
+ <ul class="version-list">
48
+ <% versions.each do |version| %>
49
+ <li class="version-list__item<%= ' version-list__item--latest' if version.latest? %>">
50
+ <a href="<%= version.slug %>/index.html" class="version-list__link">
51
+ <span class="version-list__name"><%= version.name %></span>
52
+ <span class="version-list__meta">
53
+ <% if version.latest? %>
54
+ Latest release via RubyGems
55
+ <% elsif version.edge? %>
56
+ Pre-release via git
57
+ <% else %>
58
+ Historical
59
+ <% end %>
60
+ </span>
61
+ </a>
62
+ </li>
63
+ <% end %>
64
+ </ul>
65
+ </div>
66
+ </section>
67
+ </main>
68
+
69
+ <footer class="footer">
70
+ <div class="footer__inner">
71
+ <!-- Megafooter columns -->
72
+ <div class="footer__columns">
73
+ <div class="footer__column">
74
+ <h3 class="footer__heading">Get Started</h3>
75
+ <ul class="footer__list">
76
+ <li><a href="/docs/v0.10/doc/getting_started/quickstart_md.html">Quickstart <span
77
+ class="footer__tag">Alpha</span></a>
78
+ </li>
79
+ <li><a href="/docs/v0.10/examples/app_cli_rich_moments/README_md.html">Examples</a></li>
80
+ <li><a href="/docs/v0.10/"><abbr title="Application Programming Interface">API</abbr> Reference</a></li>
81
+ <li><a href="/docs/v0.10/doc/index_md.html">Guides</a></li>
82
+ </ul>
83
+ </div>
84
+
85
+ <div class="footer__column">
86
+ <h3 class="footer__heading">Ecosystem</h3>
87
+ <ul class="footer__list">
88
+ <li><a href="https://git.sr.ht/~kerrick/ratatui_ruby-tea">Tea <span
89
+ class="footer__tag">Alpha</span></a></li>
90
+ <li><a href="https://sr.ht/~kerrick/ratatui_ruby/#chapter-3-the-object-path--kit">Kit <span
91
+ class="footer__tag footer__tag--muted">Planned</span></a></li>
92
+ <li><a href="https://sr.ht/~kerrick/ratatui_ruby/#chapter-5-the-framework">Framework <span
93
+ class="footer__tag footer__tag--muted">Planned</span></a></li>
94
+ <li><a href="https://sr.ht/~kerrick/ratatui_ruby/#chapter-6-licensing"><abbr
95
+ title="User Interface">UI</abbr> Widgets
96
+ <span class="footer__tag footer__tag--muted">Planned</span></a></li>
97
+ </ul>
98
+ </div>
99
+
100
+ <div class="footer__column">
101
+ <h3 class="footer__heading">Community</h3>
102
+ <ul class="footer__list">
103
+ <li><a href="https://lists.sr.ht/~kerrick/ratatui_ruby-discuss">Discuss and Chat</a></li>
104
+ <li><a href="https://lists.sr.ht/~kerrick/ratatui_ruby-announce">Announcements</a></li>
105
+ <li><a href="https://lists.sr.ht/~kerrick/ratatui_ruby-devel">Development</a></li>
106
+ <li><a href="https://todo.sr.ht/~kerrick/ratatui_ruby">Bug Tracker</a></li>
107
+ </ul>
108
+ </div>
109
+
110
+ <div class="footer__column">
111
+ <h3 class="footer__heading">Contribute</h3>
112
+ <ul class="footer__list">
113
+ <li><a href="https://man.sr.ht/~kerrick/ratatui_ruby/contributing.md">Contributing Guide</a></li>
114
+ <li><a href="https://man.sr.ht/~kerrick/ratatui_ruby/code_of_conduct.md">Code of Conduct</a></li>
115
+ <li><a href="https://man.sr.ht/~kerrick/ratatui_ruby/history/index.md">Project History</a></li>
116
+ <li><a href="https://lists.sr.ht/~kerrick/ratatui_ruby-devel/patches">Pull Requests</a></li>
117
+ </ul>
118
+ </div>
119
+ </div>
120
+
121
+ <!-- Bottom bar -->
122
+ <div class="footer__bottom">
123
+ <div class="footer__brand">
124
+ <img src="../logo-small.png" alt="" class="footer__logo" width="32" height="32" aria-hidden="true">
125
+ <span class="footer__wordmark">RatatuiRuby</span>
126
+ </div>
127
+ <nav class="footer__meta" aria-label="Meta links">
128
+ <a href="https://git.sr.ht/~kerrick/ratatui_ruby">Source</a>
129
+ <a href="https://rubygems.org/gems/ratatui_ruby">RubyGems</a>
130
+ <a href="https://ratatui.rs">Ratatui</a>
131
+ <a href="https://builds.sr.ht/~kerrick/ratatui_ruby?">Build Status</a>
132
+ </nav>
133
+ <p class="footer__copy">© 2026&nbsp;Kerrick&nbsp;Long · Library:&nbsp;<a
134
+ href="https://spdx.org/licenses/LGPL-3.0-or-later.html">LGPL-3.0-or-later</a> · Website:&nbsp;<a
135
+ href="https://spdx.org/licenses/CC-BY-NC-ND-4.0.html">CC-BY-NC-ND-4.0</a> · Snippets:&nbsp;<a
136
+ href="https://spdx.org/licenses/MIT-0.html">MIT-0</a></p>
137
+ </div>
138
+ </div>
139
+ </footer>
43
140
  </body>
44
141
  </html>
@@ -52,11 +52,11 @@ end
52
52
 
53
53
  class Edge < Version
54
54
  def slug
55
- "main"
55
+ "trunk"
56
56
  end
57
57
 
58
58
  def name
59
- "main"
59
+ "trunk"
60
60
  end
61
61
 
62
62
  def type
@@ -29,7 +29,7 @@ class VersionedDocumentation
29
29
 
30
30
  Dir.chdir(source_path) do
31
31
  title = "#{project_name} #{@version.name}"
32
- title = "#{project_name} (main)" if @version.edge?
32
+ title = "#{project_name} (trunk)" if @version.edge?
33
33
 
34
34
  # Use rake rerdoc to ensure copy_examples runs
35
35
  # Set environment variables to override rdoc settings
data/tasks/website.rake CHANGED
@@ -11,7 +11,7 @@ require "tmpdir"
11
11
  require_relative "rdoc_config"
12
12
 
13
13
  namespace :website do
14
- desc "Build documentation for main (current dir) and all git tags"
14
+ desc "Build documentation for trunk (current dir) and all git tags"
15
15
  task :build do
16
16
  require_relative "website/website"
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratatui_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kerrick Long
@@ -24,19 +24,19 @@ dependencies:
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0.9'
26
26
  - !ruby/object:Gem::Dependency
27
- name: ostruct
27
+ name: rexml
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.6'
32
+ version: '3.4'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.6'
39
+ version: '3.4'
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rake-compiler
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -229,6 +229,12 @@ files:
229
229
  - examples/verify_quickstart_lifecycle/app.rb
230
230
  - examples/verify_readme_usage/README.md
231
231
  - examples/verify_readme_usage/app.rb
232
+ - examples/verify_website_managed/README.md
233
+ - examples/verify_website_managed/app.rb
234
+ - examples/verify_website_menu/README.md
235
+ - examples/verify_website_menu/app.rb
236
+ - examples/verify_website_spinner/README.md
237
+ - examples/verify_website_spinner/app.rb
232
238
  - examples/widget_barchart/README.md
233
239
  - examples/widget_barchart/app.rb
234
240
  - examples/widget_block/README.md