ratatui_ruby 0.2.0 → 0.3.1

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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.builds/ruby-3.2.yml +2 -2
  3. data/.builds/ruby-3.3.yml +2 -2
  4. data/.builds/ruby-3.4.yml +2 -2
  5. data/.builds/{ruby-4.0.0-preview3.yml → ruby-4.0.0.yml} +8 -9
  6. data/.pre-commit-config.yaml +9 -2
  7. data/AGENTS.md +59 -4
  8. data/CHANGELOG.md +58 -1
  9. data/README.md +6 -6
  10. data/REUSE.toml +1 -6
  11. data/{docs → doc}/contributors/index.md +2 -1
  12. data/doc/custom.css +8 -0
  13. data/doc/images/examples-custom_widget.rb.png +0 -0
  14. data/doc/images/examples-popup_demo.rb.gif +0 -0
  15. data/doc/images/examples-scroll_text.rb.png +0 -0
  16. data/doc/images/examples-table_select.rb.png +0 -0
  17. data/{docs → doc}/index.md +1 -1
  18. data/{docs → doc}/quickstart.md +24 -0
  19. data/examples/custom_widget.rb +43 -0
  20. data/examples/popup_demo.rb +105 -0
  21. data/examples/scroll_text.rb +74 -0
  22. data/examples/table_select.rb +70 -0
  23. data/examples/test_popup_demo.rb +62 -0
  24. data/examples/test_scroll_text.rb +130 -0
  25. data/examples/test_table_select.rb +37 -0
  26. data/ext/ratatui_ruby/Cargo.lock +167 -50
  27. data/ext/ratatui_ruby/Cargo.toml +4 -4
  28. data/ext/ratatui_ruby/src/buffer.rs +54 -0
  29. data/ext/ratatui_ruby/src/events.rs +111 -106
  30. data/ext/ratatui_ruby/src/lib.rs +15 -6
  31. data/ext/ratatui_ruby/src/rendering.rs +15 -0
  32. data/ext/ratatui_ruby/src/style.rs +2 -1
  33. data/ext/ratatui_ruby/src/terminal.rs +24 -19
  34. data/ext/ratatui_ruby/src/widgets/calendar.rs +4 -3
  35. data/ext/ratatui_ruby/src/widgets/canvas.rs +1 -2
  36. data/ext/ratatui_ruby/src/widgets/center.rs +0 -2
  37. data/ext/ratatui_ruby/src/widgets/chart.rs +11 -4
  38. data/ext/ratatui_ruby/src/widgets/clear.rs +37 -0
  39. data/ext/ratatui_ruby/src/widgets/cursor.rs +1 -1
  40. data/ext/ratatui_ruby/src/widgets/layout.rs +2 -1
  41. data/ext/ratatui_ruby/src/widgets/list.rs +6 -4
  42. data/ext/ratatui_ruby/src/widgets/mod.rs +1 -0
  43. data/ext/ratatui_ruby/src/widgets/overlay.rs +2 -1
  44. data/ext/ratatui_ruby/src/widgets/paragraph.rs +10 -0
  45. data/ext/ratatui_ruby/src/widgets/table.rs +25 -6
  46. data/ext/ratatui_ruby/src/widgets/tabs.rs +2 -1
  47. data/lib/ratatui_ruby/dsl.rb +2 -0
  48. data/lib/ratatui_ruby/schema/clear.rb +83 -0
  49. data/lib/ratatui_ruby/schema/paragraph.rb +7 -4
  50. data/lib/ratatui_ruby/schema/rect.rb +24 -0
  51. data/lib/ratatui_ruby/schema/table.rb +8 -2
  52. data/lib/ratatui_ruby/version.rb +1 -1
  53. data/lib/ratatui_ruby.rb +3 -1
  54. data/mise.toml +1 -1
  55. data/sig/ratatui_ruby/buffer.rbs +11 -0
  56. data/sig/ratatui_ruby/schema/rect.rbs +14 -0
  57. data/tasks/bump/changelog.rb +37 -0
  58. data/tasks/bump/comparison_links.rb +41 -0
  59. data/tasks/bump/header.rb +30 -0
  60. data/tasks/bump/history.rb +30 -0
  61. data/tasks/bump/manifest.rb +8 -0
  62. data/tasks/bump/ruby_gem.rb +6 -10
  63. data/tasks/bump/sem_ver.rb +6 -0
  64. data/tasks/bump/unreleased_section.rb +38 -0
  65. data/tasks/bump.rake +5 -1
  66. data/tasks/doc.rake +5 -4
  67. data/tasks/resources/build.yml.erb +1 -14
  68. data/tasks/resources/rubies.yml +1 -1
  69. data/tasks/sourcehut.rake +11 -2
  70. data/tasks/website/version.rb +1 -0
  71. data/tasks/website/version_menu.rb +68 -0
  72. data/tasks/website/versioned_documentation.rb +2 -1
  73. data/tasks/website/website.rb +4 -1
  74. data/tasks/website.rake +3 -3
  75. metadata +76 -26
  76. data/CODE_OF_CONDUCT.md +0 -30
  77. data/CONTRIBUTING.md +0 -40
  78. /data/{docs → doc}/application_testing.md +0 -0
  79. /data/{docs → doc}/contributors/design/ruby_frontend.md +0 -0
  80. /data/{docs → doc}/contributors/design/rust_backend.md +0 -0
  81. /data/{docs → doc}/contributors/design.md +0 -0
  82. /data/{docs → doc}/images/examples-analytics.rb.png +0 -0
  83. /data/{docs → doc}/images/examples-box_demo.rb.png +0 -0
  84. /data/{docs → doc}/images/examples-calendar_demo.rb.png +0 -0
  85. /data/{docs → doc}/images/examples-chart_demo.rb.png +0 -0
  86. /data/{docs → doc}/images/examples-dashboard.rb.png +0 -0
  87. /data/{docs → doc}/images/examples-list_styles.rb.png +0 -0
  88. /data/{docs → doc}/images/examples-login_form.rb.png +0 -0
  89. /data/{docs → doc}/images/examples-map_demo.rb.png +0 -0
  90. /data/{docs → doc}/images/examples-mouse_events.rb.png +0 -0
  91. /data/{docs → doc}/images/examples-quickstart_lifecycle.rb.png +0 -0
  92. /data/{docs → doc}/images/examples-scrollbar_demo.rb.png +0 -0
  93. /data/{docs → doc}/images/examples-stock_ticker.rb.png +0 -0
  94. /data/{docs → doc}/images/examples-system_monitor.rb.png +0 -0
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
+ # SPDX-License-Identifier: AGPL-3.0-or-later
5
+
6
+ # History manages the versioned history of the changelog.
7
+ class History
8
+ # Extracts the history section from the given content, between unreleased and links.
9
+ def self.parse(content, header_length, unreleased_length, links_text)
10
+ start = header_length + unreleased_length
11
+ text = content[start...content.index(links_text)].strip + "\n"
12
+ new(text)
13
+ end
14
+
15
+ # Creates a new History from the given content.
16
+ def initialize(content)
17
+ @content = content.dup
18
+ end
19
+
20
+ # Adds a new versioned section to the history.
21
+ def add(section)
22
+ @content = "#{section}\n\n#{@content}".strip + "\n"
23
+ nil
24
+ end
25
+
26
+ # Returns the current state of the history as a string.
27
+ def to_s
28
+ @content
29
+ end
30
+ end
@@ -14,6 +14,14 @@ class Manifest < Data.define(:path, :pattern, :primary)
14
14
  super
15
15
  end
16
16
 
17
+ def version
18
+ content = read
19
+ match = content.match(pattern)
20
+ raise "Version missing in manifest #{path}" unless match
21
+
22
+ SemVer.parse(match[0])
23
+ end
24
+
17
25
  def write(version)
18
26
  return unless File.exist?(path)
19
27
 
@@ -4,35 +4,31 @@
4
4
  # SPDX-License-Identifier: AGPL-3.0-or-later
5
5
 
6
6
  class RubyGem
7
- def initialize(manifests:, lockfile:)
7
+ def initialize(manifests:, lockfile:, changelog:)
8
8
  raise ArgumentError, "Must have exactly one primary manifest" unless manifests.count(&:primary) == 1
9
9
  @manifests = manifests
10
10
  @lockfile = lockfile
11
+ @changelog = changelog
11
12
  end
12
13
 
13
14
  def version
14
- source = @manifests.find(&:primary)
15
- content = source.read
16
- match = content.match(source.pattern)
17
- raise "Version missing in manifest #{source.path}" unless match
18
-
19
- segments = Gem::Version.new(match[0]).segments
20
- SemVer.new(segments.fill(0, 3).first(3))
15
+ @manifests.find(&:primary).version
21
16
  end
22
17
 
23
18
  def bump(segment)
24
19
  target = version.next(segment)
25
20
 
26
21
  puts "Bumping #{segment}: #{version} -> #{target}"
22
+ @changelog.release(target)
27
23
  @manifests.each { |manifest| manifest.write(target) }
28
24
  @lockfile.refresh
29
25
  end
30
26
 
31
27
  def set(version_string)
32
- segments = Gem::Version.new(version_string).segments.fill(0, 3).first(3)
33
- target = SemVer.new(segments)
28
+ target = SemVer.parse(version_string)
34
29
 
35
30
  puts "Setting version: #{version} -> #{target}"
31
+ @changelog.release(target)
36
32
  @manifests.each { |manifest| manifest.write(target) }
37
33
  @lockfile.refresh
38
34
  end
@@ -7,6 +7,12 @@
7
7
  class SemVer
8
8
  SEGMENTS = [:major, :minor, :patch].freeze
9
9
 
10
+ def self.parse(string)
11
+ require "rubygems"
12
+ segments = Gem::Version.new(string).segments.fill(0, 3).first(3)
13
+ new(segments)
14
+ end
15
+
10
16
  def initialize(segments)
11
17
  @segments = segments
12
18
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
+ # SPDX-License-Identifier: AGPL-3.0-or-later
5
+
6
+ require "date"
7
+
8
+ # UnreleasedSection manages the [Unreleased] section of the changelog.
9
+ class UnreleasedSection
10
+ PATTERN = /^(## \[Unreleased\].*?)(?=## \[\d)/m
11
+
12
+ # Extracts the unreleased section from the given content.
13
+ def self.parse(content)
14
+ match = content.match(PATTERN)
15
+ new(match[1].strip) if match
16
+ end
17
+
18
+ # Creates a new UnreleasedSection from the given unreleased content.
19
+ def initialize(content)
20
+ @content = content.dup
21
+ end
22
+
23
+ # Returns the unreleased content as a versioned section.
24
+ def as_version(new_version)
25
+ date = Date.today.iso8601
26
+ @content.sub(/^## \[Unreleased\]/, "## [#{new_version}] - #{date}")
27
+ end
28
+
29
+ # Returns a fresh unreleased section.
30
+ def self.fresh
31
+ new("## [Unreleased]\n\n### Added\n\n### Changed\n\n### Fixed\n\n### Removed")
32
+ end
33
+
34
+ # Returns the current state of the section as a string.
35
+ def to_s
36
+ @content
37
+ end
38
+ end
data/tasks/bump.rake CHANGED
@@ -9,6 +9,7 @@ require_relative "bump/sem_ver"
9
9
  require_relative "bump/manifest"
10
10
  require_relative "bump/cargo_lockfile"
11
11
  require_relative "bump/ruby_gem"
12
+ require_relative "bump/changelog"
12
13
 
13
14
  namespace :bump do
14
15
  ratatuiRuby = RubyGem.new(
@@ -28,18 +29,21 @@ namespace :bump do
28
29
  path: "ext/ratatui_ruby/Cargo.lock",
29
30
  dir: "ext/ratatui_ruby",
30
31
  name: "ratatui_ruby"
31
- )
32
+ ),
33
+ changelog: Changelog.new
32
34
  )
33
35
 
34
36
  SemVer::SEGMENTS.each do |segment|
35
37
  desc "Bump #{segment} version"
36
38
  task segment do
37
39
  ratatuiRuby.bump(segment)
40
+ Rake::Task["sourcehut"].invoke
38
41
  end
39
42
  end
40
43
 
41
44
  desc "Set exact version (e.g. rake bump:exact[0.1.0])"
42
45
  task :exact, [:version] do |_, args|
43
46
  ratatuiRuby.set(args[:version])
47
+ Rake::Task["sourcehut"].invoke
44
48
  end
45
49
  end
data/tasks/doc.rake CHANGED
@@ -8,15 +8,16 @@ require "rdoc/task"
8
8
  require_relative "rdoc_config"
9
9
 
10
10
  RDoc::Task.new do |rdoc|
11
- rdoc.rdoc_dir = "doc"
11
+ rdoc.rdoc_dir = "tmp/rdoc"
12
12
  rdoc.main = RDocConfig::MAIN
13
13
  rdoc.rdoc_files.include(RDocConfig::RDOC_FILES)
14
+ rdoc.options << "--template-stylesheets=doc/custom.css"
14
15
  end
15
16
 
16
17
  task :copy_doc_images do
17
- if Dir.exist?("docs/images")
18
- FileUtils.mkdir_p "doc/docs/images"
19
- FileUtils.cp_r Dir["docs/images/*.png"], "doc/docs/images"
18
+ if Dir.exist?("doc/images")
19
+ FileUtils.mkdir_p "tmp/rdoc/doc/images"
20
+ FileUtils.cp_r Dir["doc/images/*.png"], "tmp/rdoc/doc/images"
20
21
  end
21
22
  end
22
23
 
@@ -31,34 +31,21 @@ tasks:
31
31
  sed -i 's/ruby = .*/ruby = "<%= ruby_version %>"/' mise.toml
32
32
  mise install
33
33
  mise x -- pip install reuse
34
- mise x -- gem install bundler
34
+ mise x -- gem install bundler:<%= bundler_version %>
35
35
  mise reshim
36
36
  mise x -- bundle config set --local frozen 'true'
37
37
  mise x -- bundle install
38
- <% if ruby_version.start_with?("4.0") -%>
39
- # We allow this to fail so we can see logs without stopping the CI pipeline
40
- mise x -- bundle exec rake compile || echo "⚠️ Compilation failed (Allowed Failure)"
41
- <% else -%>
42
38
  mise x -- bundle exec rake compile
43
- <% end -%>
44
39
  - test: |
45
40
  . ~/.buildenv
46
41
  cd ratatui_ruby
47
42
  echo "Testing Ruby <%= ruby_version %>"
48
- <% if ruby_version.start_with?("4.0") -%>
49
- mise x -- bundle exec rake test || true
50
- <% else -%>
51
43
  mise x -- bundle exec rake test
52
- <% end -%>
53
44
  - lint: |
54
45
  . ~/.buildenv
55
46
  cd ratatui_ruby
56
47
  echo "Linting Ruby <%= ruby_version %>"
57
- <% if ruby_version.start_with?("4.0") -%>
58
- mise x -- bundle exec rake lint || true
59
- <% else -%>
60
48
  mise x -- bundle exec rake lint
61
- <% end -%>
62
49
  - package: |
63
50
  . ~/.buildenv
64
51
  cd ratatui_ruby
@@ -4,4 +4,4 @@
4
4
  - "3.2"
5
5
  - "3.3"
6
6
  - "3.4"
7
- - "4.0.0-preview3"
7
+ - "4.0.0"
data/tasks/sourcehut.rake CHANGED
@@ -9,9 +9,18 @@ task :sourcehut do
9
9
  require "yaml"
10
10
 
11
11
  spec = Gem::Specification.load("ratatui_ruby.gemspec")
12
- gem_filename = "#{spec.name}-#{spec.version}.gem"
12
+
13
+ # Read version directly from file to ensure we get the latest version
14
+ # even if it was just bumped in the same Rake execution
15
+ version_content = File.read("lib/ratatui_ruby/version.rb")
16
+ version = version_content.match(/VERSION = "(.+?)"/)[1]
17
+
18
+ gem_filename = "#{spec.name}-#{version}.gem"
13
19
 
14
20
  rubies = YAML.load_file("tasks/resources/rubies.yml")
21
+
22
+ bundler_version = File.read("Gemfile.lock").match(/BUNDLED WITH\n\s+([\d.]+)/)[1]
23
+
15
24
  template = File.read("tasks/resources/build.yml.erb")
16
25
  erb = ERB.new(template, trim_mode: "-")
17
26
 
@@ -23,7 +32,7 @@ task :sourcehut do
23
32
  rubies.each do |ruby_version|
24
33
  filename = ".builds/ruby-#{ruby_version}.yml"
25
34
  puts "Generating #{filename}..."
26
- content = erb.result_with_hash(ruby_version:, gem_filename:)
35
+ content = erb.result_with_hash(ruby_version:, gem_filename:, bundler_version:)
27
36
  File.write(filename, content)
28
37
  end
29
38
  end
@@ -67,6 +67,7 @@ class Edge < Version
67
67
 
68
68
  files.each do |file|
69
69
  dest = File.join(path, file)
70
+ next unless File.exist?(file) # Skip files that are in the index but deleted in the working tree
70
71
  FileUtils.mkdir_p(File.dirname(dest))
71
72
  FileUtils.cp(file, dest)
72
73
  end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
+ # SPDX-License-Identifier: AGPL-3.0-or-later
5
+
6
+ class VersionMenu
7
+ def initialize(root:, versions:)
8
+ @root = root
9
+ @versions = versions
10
+ end
11
+
12
+ def run
13
+ puts "Injecting version menu into generated HTML..."
14
+
15
+ # Process all HTML files in the output directory
16
+ Dir.glob(File.join(@root, "**/*.html")).each do |file|
17
+ inject_menu(file)
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ def inject_menu(file)
24
+ content = File.read(file)
25
+
26
+ # Find the injection point (before the theme toggle button)
27
+ pattern = /(<button[^>]*id="theme-toggle"[^>]*>)/mi
28
+
29
+ unless content.match?(pattern)
30
+ # warn "Could not find theme-toggle in #{file}"
31
+ return
32
+ end
33
+
34
+ # Calculate relative path to root from this file
35
+ file_dir = File.dirname(file)
36
+ relative_path_to_root = Pathname.new(@root).relative_path_from(Pathname.new(file_dir)).to_s
37
+ relative_path_to_root += "/" unless relative_path_to_root.end_with?("/")
38
+
39
+ # Determine current version from file path
40
+ relative_path_from_root = Pathname.new(file).relative_path_from(Pathname.new(@root)).to_s
41
+ current_version_slug = relative_path_from_root.split("/").first
42
+
43
+ # Build options
44
+ options = @versions.map do |version|
45
+ value = "#{relative_path_to_root}#{version.slug}/index.html"
46
+ selected = (version.slug == current_version_slug) ? "selected" : ""
47
+ display_name = version.name
48
+ display_name += " (latest)" if version.respond_to?(:latest?) && version.latest?
49
+ display_name += " (dev)" if version.edge?
50
+
51
+ %Q{<option value="#{value}" #{selected}>#{display_name}</option>}
52
+ end.join("\n")
53
+
54
+ # margin-left: auto pushes it to the right
55
+ # margin-right: 1rem spacing from the theme toggle
56
+ switcher_html = <<~HTML
57
+ <select class="version-menu" onchange="window.location.href=this.value" style="margin-left: auto; padding: 0.25rem; border-radius: 4px; border: 1px solid #ccc; margin-right: 1rem;">
58
+ #{options}
59
+ <option value="#{relative_path_to_root}index.html">All Versions</option>
60
+ </select>
61
+ HTML
62
+
63
+ # Inject before the button
64
+ new_content = content.sub(pattern, "#{switcher_html}\n\\1")
65
+
66
+ File.write(file, new_content)
67
+ end
68
+ end
@@ -15,6 +15,7 @@ class VersionedDocumentation
15
15
 
16
16
  absolute_path = File.absolute_path(path)
17
17
  gemfile_path = File.absolute_path("Gemfile")
18
+ custom_css_path = File.absolute_path("doc/custom.css")
18
19
 
19
20
  @version.checkout(globs: globs) do |source_path|
20
21
  Dir.chdir(source_path) do
@@ -26,7 +27,7 @@ class VersionedDocumentation
26
27
 
27
28
  system(
28
29
  { "BUNDLE_GEMFILE" => gemfile_path },
29
- "bundle exec rdoc -o #{absolute_path} --main #{RDocConfig::MAIN} --title '#{title}' #{files.join(' ')}"
30
+ "bundle exec rdoc -o #{absolute_path} --main #{RDocConfig::MAIN} --title '#{title}' --template-stylesheets \"#{custom_css_path}\" #{files.join(' ')}"
30
31
  )
31
32
 
32
33
  copy_assets_to(absolute_path, assets)
@@ -6,10 +6,11 @@
6
6
  require_relative "version"
7
7
  require_relative "versioned_documentation"
8
8
  require_relative "index_page"
9
+ require_relative "version_menu"
9
10
  require "fileutils"
10
11
 
11
12
  class Website
12
- def initialize(at: "public", project_name:, globs:, assets: [])
13
+ def initialize(at: "www", project_name:, globs:, assets: [])
13
14
  @destination = at
14
15
  @project_name = project_name
15
16
  @globs = globs
@@ -30,6 +31,8 @@ class Website
30
31
 
31
32
  IndexPage.new(versions).publish_to(join("index.html"), project_name: @project_name)
32
33
 
34
+ VersionMenu.new(root: @destination, versions: versions).run
35
+
33
36
  puts "Website built in #{@destination}/"
34
37
  end
35
38
 
data/tasks/website.rake CHANGED
@@ -14,13 +14,13 @@ namespace :website do
14
14
  require_relative "website/website"
15
15
 
16
16
  spec = Gem::Specification.load(Dir["*.gemspec"].first)
17
- globs = RDocConfig::RDOC_FILES + ["*.gemspec", "docs/images/**/*"]
17
+ globs = RDocConfig::RDOC_FILES + ["*.gemspec", "doc/images/**/*"]
18
18
 
19
19
  Website.new(
20
- at: "public",
20
+ at: "www",
21
21
  project_name: spec.name,
22
22
  globs: globs,
23
- assets: ["docs/images"] # directories to copy
23
+ assets: ["doc/images"] # directories to copy
24
24
  ).build
25
25
  end
26
26
  end
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.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kerrick Long
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0.9'
26
+ - !ruby/object:Gem::Dependency
27
+ name: ostruct
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.6'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.6'
26
40
  - !ruby/object:Gem::Dependency
27
41
  name: rake-compiler
28
42
  requirement: !ruby/object:Gem::Requirement
@@ -37,6 +51,20 @@ dependencies:
37
51
  - - "~>"
38
52
  - !ruby/object:Gem::Version
39
53
  version: '1.2'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rdoc
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '7.0'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '7.0'
40
68
  description: ratatui_ruby is a wrapper for the Ratatui Rust crate <https://ratatui.rs>.
41
69
  It allows you to cook up Terminal User Interfaces in Ruby.
42
70
  email:
@@ -49,13 +77,11 @@ files:
49
77
  - ".builds/ruby-3.2.yml"
50
78
  - ".builds/ruby-3.3.yml"
51
79
  - ".builds/ruby-3.4.yml"
52
- - ".builds/ruby-4.0.0-preview3.yml"
80
+ - ".builds/ruby-4.0.0.yml"
53
81
  - ".pre-commit-config.yaml"
54
82
  - ".rubocop.yml"
55
83
  - AGENTS.md
56
84
  - CHANGELOG.md
57
- - CODE_OF_CONDUCT.md
58
- - CONTRIBUTING.md
59
85
  - LICENSE
60
86
  - LICENSES/AGPL-3.0-or-later.txt
61
87
  - LICENSES/BSD-2-Clause.txt
@@ -65,41 +91,50 @@ files:
65
91
  - README.md
66
92
  - REUSE.toml
67
93
  - Rakefile
68
- - docs/application_testing.md
69
- - docs/contributors/design.md
70
- - docs/contributors/design/ruby_frontend.md
71
- - docs/contributors/design/rust_backend.md
72
- - docs/contributors/index.md
73
- - docs/images/examples-analytics.rb.png
74
- - docs/images/examples-box_demo.rb.png
75
- - docs/images/examples-calendar_demo.rb.png
76
- - docs/images/examples-chart_demo.rb.png
77
- - docs/images/examples-dashboard.rb.png
78
- - docs/images/examples-list_styles.rb.png
79
- - docs/images/examples-login_form.rb.png
80
- - docs/images/examples-map_demo.rb.png
81
- - docs/images/examples-mouse_events.rb.png
82
- - docs/images/examples-quickstart_lifecycle.rb.png
83
- - docs/images/examples-scrollbar_demo.rb.png
84
- - docs/images/examples-stock_ticker.rb.png
85
- - docs/images/examples-system_monitor.rb.png
86
- - docs/index.md
87
- - docs/quickstart.md
94
+ - doc/application_testing.md
95
+ - doc/contributors/design.md
96
+ - doc/contributors/design/ruby_frontend.md
97
+ - doc/contributors/design/rust_backend.md
98
+ - doc/contributors/index.md
99
+ - doc/custom.css
100
+ - doc/images/examples-analytics.rb.png
101
+ - doc/images/examples-box_demo.rb.png
102
+ - doc/images/examples-calendar_demo.rb.png
103
+ - doc/images/examples-chart_demo.rb.png
104
+ - doc/images/examples-custom_widget.rb.png
105
+ - doc/images/examples-dashboard.rb.png
106
+ - doc/images/examples-list_styles.rb.png
107
+ - doc/images/examples-login_form.rb.png
108
+ - doc/images/examples-map_demo.rb.png
109
+ - doc/images/examples-mouse_events.rb.png
110
+ - doc/images/examples-popup_demo.rb.gif
111
+ - doc/images/examples-quickstart_lifecycle.rb.png
112
+ - doc/images/examples-scroll_text.rb.png
113
+ - doc/images/examples-scrollbar_demo.rb.png
114
+ - doc/images/examples-stock_ticker.rb.png
115
+ - doc/images/examples-system_monitor.rb.png
116
+ - doc/images/examples-table_select.rb.png
117
+ - doc/index.md
118
+ - doc/quickstart.md
88
119
  - examples/analytics.rb
89
120
  - examples/box_demo.rb
90
121
  - examples/calendar_demo.rb
91
122
  - examples/chart_demo.rb
123
+ - examples/custom_widget.rb
92
124
  - examples/dashboard.rb
93
125
  - examples/list_styles.rb
94
126
  - examples/login_form.rb
95
127
  - examples/map_demo.rb
96
128
  - examples/mouse_events.rb
129
+ - examples/popup_demo.rb
97
130
  - examples/quickstart_dsl.rb
98
131
  - examples/quickstart_lifecycle.rb
99
132
  - examples/readme_usage.rb
133
+ - examples/scroll_text.rb
100
134
  - examples/scrollbar_demo.rb
101
135
  - examples/stock_ticker.rb
102
136
  - examples/system_monitor.rb
137
+ - examples/table_select.rb
103
138
  - examples/test_analytics.rb
104
139
  - examples/test_box_demo.rb
105
140
  - examples/test_calendar_demo.rb
@@ -107,13 +142,17 @@ files:
107
142
  - examples/test_list_styles.rb
108
143
  - examples/test_login_form.rb
109
144
  - examples/test_map_demo.rb
145
+ - examples/test_popup_demo.rb
146
+ - examples/test_scroll_text.rb
110
147
  - examples/test_stock_ticker.rb
111
148
  - examples/test_system_monitor.rb
149
+ - examples/test_table_select.rb
112
150
  - ext/ratatui_ruby/.cargo/config.toml
113
151
  - ext/ratatui_ruby/.gitignore
114
152
  - ext/ratatui_ruby/Cargo.lock
115
153
  - ext/ratatui_ruby/Cargo.toml
116
154
  - ext/ratatui_ruby/extconf.rb
155
+ - ext/ratatui_ruby/src/buffer.rs
117
156
  - ext/ratatui_ruby/src/events.rs
118
157
  - ext/ratatui_ruby/src/lib.rs
119
158
  - ext/ratatui_ruby/src/rendering.rs
@@ -125,6 +164,7 @@ files:
125
164
  - ext/ratatui_ruby/src/widgets/canvas.rs
126
165
  - ext/ratatui_ruby/src/widgets/center.rs
127
166
  - ext/ratatui_ruby/src/widgets/chart.rs
167
+ - ext/ratatui_ruby/src/widgets/clear.rs
128
168
  - ext/ratatui_ruby/src/widgets/cursor.rs
129
169
  - ext/ratatui_ruby/src/widgets/gauge.rs
130
170
  - ext/ratatui_ruby/src/widgets/layout.rs
@@ -145,6 +185,7 @@ files:
145
185
  - lib/ratatui_ruby/schema/canvas.rb
146
186
  - lib/ratatui_ruby/schema/center.rb
147
187
  - lib/ratatui_ruby/schema/chart.rb
188
+ - lib/ratatui_ruby/schema/clear.rb
148
189
  - lib/ratatui_ruby/schema/constraint.rb
149
190
  - lib/ratatui_ruby/schema/cursor.rb
150
191
  - lib/ratatui_ruby/schema/gauge.rb
@@ -152,6 +193,7 @@ files:
152
193
  - lib/ratatui_ruby/schema/list.rb
153
194
  - lib/ratatui_ruby/schema/overlay.rb
154
195
  - lib/ratatui_ruby/schema/paragraph.rb
196
+ - lib/ratatui_ruby/schema/rect.rb
155
197
  - lib/ratatui_ruby/schema/scrollbar.rb
156
198
  - lib/ratatui_ruby/schema/sparkline.rb
157
199
  - lib/ratatui_ruby/schema/style.rb
@@ -160,6 +202,7 @@ files:
160
202
  - lib/ratatui_ruby/test_helper.rb
161
203
  - lib/ratatui_ruby/version.rb
162
204
  - mise.toml
205
+ - sig/ratatui_ruby/buffer.rbs
163
206
  - sig/ratatui_ruby/ratatui_ruby.rbs
164
207
  - sig/ratatui_ruby/schema/bar_chart.rbs
165
208
  - sig/ratatui_ruby/schema/block.rbs
@@ -174,6 +217,7 @@ files:
174
217
  - sig/ratatui_ruby/schema/list.rbs
175
218
  - sig/ratatui_ruby/schema/overlay.rbs
176
219
  - sig/ratatui_ruby/schema/paragraph.rbs
220
+ - sig/ratatui_ruby/schema/rect.rbs
177
221
  - sig/ratatui_ruby/schema/scrollbar.rbs
178
222
  - sig/ratatui_ruby/schema/sparkline.rbs
179
223
  - sig/ratatui_ruby/schema/style.rbs
@@ -183,9 +227,14 @@ files:
183
227
  - sig/ratatui_ruby/version.rbs
184
228
  - tasks/bump.rake
185
229
  - tasks/bump/cargo_lockfile.rb
230
+ - tasks/bump/changelog.rb
231
+ - tasks/bump/comparison_links.rb
232
+ - tasks/bump/header.rb
233
+ - tasks/bump/history.rb
186
234
  - tasks/bump/manifest.rb
187
235
  - tasks/bump/ruby_gem.rb
188
236
  - tasks/bump/sem_ver.rb
237
+ - tasks/bump/unreleased_section.rb
189
238
  - tasks/doc.rake
190
239
  - tasks/extension.rake
191
240
  - tasks/lint.rake
@@ -198,6 +247,7 @@ files:
198
247
  - tasks/website.rake
199
248
  - tasks/website/index_page.rb
200
249
  - tasks/website/version.rb
250
+ - tasks/website/version_menu.rb
201
251
  - tasks/website/versioned_documentation.rb
202
252
  - tasks/website/website.rb
203
253
  - vendor/goodcop/base.yml
@@ -211,7 +261,7 @@ metadata:
211
261
  changelog_uri: https://git.sr.ht/~kerrick/ratatui_ruby/tree/main/item/CHANGELOG.md
212
262
  mailing_list_uri: https://lists.sr.ht/~kerrick/ratatui_ruby-discuss
213
263
  source_code_uri: https://git.sr.ht/~kerrick/ratatui_ruby
214
- documentation_uri: https://git.sr.ht/~kerrick/ratatui_ruby/tree/HEAD/docs/index.md
264
+ documentation_uri: https://git.sr.ht/~kerrick/ratatui_ruby/tree/HEAD/doc/index.md
215
265
  wiki_uri: https://man.sr.ht/~kerrick/ratatui_ruby/
216
266
  funding_uri: https://opencollective.com/ratatui
217
267
  rdoc_options: []
@@ -231,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
281
  - !ruby/object:Gem::Version
232
282
  version: '0'
233
283
  requirements: []
234
- rubygems_version: 3.6.9
284
+ rubygems_version: 4.0.3
235
285
  specification_version: 4
236
286
  summary: "\U0001F48E Unofficial Ruby wrapper for the Ratatui \U0001F468‍\U0001F373\U0001F400."
237
287
  test_files: []
data/CODE_OF_CONDUCT.md DELETED
@@ -1,30 +0,0 @@
1
- <!--
2
- SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
3
- SPDX-License-Identifier: CC-BY-SA-4.0
4
- -->
5
- # **ratatui_ruby** Code of Conduct
6
-
7
- This project is intended to be a safe, productive collaboration, and contributors are expected to adhere to the [Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct/).
8
-
9
- For your convenience, it is reproduced below. If this document ever falls out of date and/or conflicts with the linked [Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct/) document, the linked document takes precedence.
10
-
11
-
12
- <!-- SPDX-SnippetBegin -->
13
- <!--
14
- SPDX-FileCopyrightText: 2016 Yukihiro Matsumoto <matz@netlab.jp>
15
- SPDX-License-Identifier: BSD-2-Clause
16
- -->
17
-
18
-
19
- ## The Ruby Community Conduct Guideline
20
-
21
- > **We have picked the following conduct guideline based on an early proposed draft of the PostgreSQL CoC, for Ruby developers community for safe, productive collaboration. Each Ruby related community (conference etc.) may pick their own Code of Conduct.**
22
- >
23
- > This document provides community guidelines for a safe, respectful, productive, and collaborative place for any person who is willing to contribute to the Ruby community. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.).
24
- >
25
- > - Participants will be tolerant of opposing views.
26
- > - Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
27
- > - When interpreting the words and actions of others, participants should always assume good intentions.
28
- > - Behaviour which can be reasonably considered harassment will not be tolerated.
29
-
30
- <!-- SPDX-SnippetEnd -->