ratatui_ruby 0.7.1 → 0.7.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.
Files changed (311) hide show
  1. checksums.yaml +4 -4
  2. data/.builds/ruby-3.2.yml +1 -1
  3. data/.builds/ruby-3.3.yml +1 -1
  4. data/.builds/ruby-3.4.yml +1 -1
  5. data/.builds/ruby-4.0.0.yml +1 -1
  6. data/AGENTS.md +12 -4
  7. data/CHANGELOG.md +49 -0
  8. data/README.md +7 -7
  9. data/Rakefile +1 -1
  10. data/doc/{application_architecture.md → concepts/application_architecture.md} +30 -0
  11. data/doc/{application_testing.md → concepts/application_testing.md} +4 -2
  12. data/doc/{event_handling.md → concepts/event_handling.md} +1 -1
  13. data/doc/contributors/auditing/parity.md +233 -0
  14. data/doc/contributors/developing_examples.md +10 -10
  15. data/doc/contributors/upstream_requests/tab_rects.md +173 -0
  16. data/doc/contributors/upstream_requests/title_rects.md +132 -0
  17. data/doc/contributors/v1.0.0_blockers.md +54 -747
  18. data/doc/{quickstart.md → getting_started/quickstart.md} +26 -26
  19. data/doc/{why.md → getting_started/why.md} +1 -1
  20. data/doc/index.md +23 -9
  21. data/doc/{terminal_limitations.md → troubleshooting/terminal_limitations.md} +33 -0
  22. data/doc/troubleshooting/tui_output.md +76 -0
  23. data/examples/app_all_events/README.md +1 -0
  24. data/examples/app_all_events/app.rb +2 -0
  25. data/examples/app_all_events/model/app_model.rb +2 -0
  26. data/examples/app_all_events/model/event_color_cycle.rb +2 -0
  27. data/examples/app_all_events/model/event_entry.rb +2 -0
  28. data/examples/app_all_events/model/msg.rb +2 -0
  29. data/examples/app_all_events/model/timestamp.rb +2 -0
  30. data/examples/app_all_events/update.rb +2 -0
  31. data/examples/app_all_events/view/app_view.rb +2 -0
  32. data/examples/app_all_events/view/controls_view.rb +2 -0
  33. data/examples/app_all_events/view/counts_view.rb +2 -0
  34. data/examples/app_all_events/view/live_view.rb +2 -0
  35. data/examples/app_all_events/view/log_view.rb +2 -0
  36. data/examples/app_all_events/view.rb +2 -0
  37. data/examples/app_color_picker/README.md +2 -0
  38. data/examples/app_color_picker/app.rb +2 -0
  39. data/examples/app_color_picker/clipboard.rb +2 -0
  40. data/examples/app_color_picker/color.rb +2 -0
  41. data/examples/app_color_picker/controls.rb +2 -0
  42. data/examples/app_color_picker/copy_dialog.rb +2 -0
  43. data/examples/app_color_picker/export_pane.rb +2 -0
  44. data/examples/app_color_picker/harmony.rb +2 -0
  45. data/examples/app_color_picker/input.rb +2 -0
  46. data/examples/app_color_picker/main_container.rb +2 -0
  47. data/examples/app_color_picker/palette.rb +2 -0
  48. data/examples/app_login_form/README.md +3 -0
  49. data/examples/app_login_form/app.rb +2 -0
  50. data/examples/app_stateful_interaction/README.md +2 -0
  51. data/examples/app_stateful_interaction/app.rb +2 -0
  52. data/examples/timeout_demo.rb +2 -0
  53. data/examples/verify_quickstart_dsl/README.md +2 -2
  54. data/examples/verify_quickstart_dsl/app.rb +2 -0
  55. data/examples/verify_quickstart_layout/README.md +2 -2
  56. data/examples/verify_quickstart_layout/app.rb +2 -0
  57. data/examples/verify_quickstart_lifecycle/README.md +2 -2
  58. data/examples/verify_quickstart_lifecycle/app.rb +2 -0
  59. data/examples/verify_readme_usage/app.rb +2 -0
  60. data/examples/{widget_barchart_demo → widget_barchart}/README.md +5 -3
  61. data/examples/{widget_barchart_demo → widget_barchart}/app.rb +7 -5
  62. data/examples/{widget_block_demo → widget_block}/README.md +5 -3
  63. data/examples/{widget_block_demo → widget_block}/app.rb +6 -4
  64. data/examples/{widget_box_demo → widget_box}/README.md +7 -4
  65. data/examples/{widget_box_demo → widget_box}/app.rb +7 -5
  66. data/examples/{widget_calendar_demo → widget_calendar}/README.md +6 -3
  67. data/examples/{widget_calendar_demo → widget_calendar}/app.rb +6 -4
  68. data/examples/{widget_canvas_demo → widget_canvas}/README.md +2 -2
  69. data/examples/{widget_canvas_demo → widget_canvas}/app.rb +6 -4
  70. data/examples/{widget_cell_demo → widget_cell}/README.md +6 -3
  71. data/examples/{widget_cell_demo → widget_cell}/app.rb +7 -5
  72. data/examples/{widget_center_demo → widget_center}/README.md +2 -2
  73. data/examples/{widget_center_demo → widget_center}/app.rb +6 -4
  74. data/examples/{widget_chart_demo → widget_chart}/README.md +7 -4
  75. data/examples/{widget_chart_demo → widget_chart}/app.rb +7 -5
  76. data/examples/{widget_gauge_demo → widget_gauge}/README.md +6 -3
  77. data/examples/{widget_gauge_demo → widget_gauge}/app.rb +7 -5
  78. data/examples/widget_layout_split/README.md +5 -2
  79. data/examples/widget_layout_split/app.rb +3 -1
  80. data/examples/{widget_line_gauge_demo → widget_line_gauge}/README.md +6 -3
  81. data/examples/{widget_line_gauge_demo → widget_line_gauge}/app.rb +7 -5
  82. data/examples/{widget_list_demo → widget_list}/README.md +7 -4
  83. data/examples/{widget_list_demo → widget_list}/app.rb +7 -5
  84. data/examples/{widget_map_demo → widget_map}/README.md +7 -4
  85. data/examples/{widget_map_demo → widget_map}/app.rb +4 -2
  86. data/examples/{widget_overlay_demo → widget_overlay}/README.md +6 -3
  87. data/examples/{widget_overlay_demo → widget_overlay}/app.rb +5 -3
  88. data/examples/{widget_popup_demo → widget_popup}/README.md +7 -4
  89. data/examples/{widget_popup_demo → widget_popup}/app.rb +6 -4
  90. data/examples/{widget_ratatui_logo_demo → widget_ratatui_logo}/README.md +6 -3
  91. data/examples/{widget_ratatui_logo_demo → widget_ratatui_logo}/app.rb +8 -6
  92. data/examples/{widget_ratatui_mascot_demo → widget_ratatui_mascot}/README.md +6 -3
  93. data/examples/{widget_ratatui_mascot_demo → widget_ratatui_mascot}/app.rb +6 -4
  94. data/examples/widget_rect/README.md +5 -2
  95. data/examples/widget_rect/app.rb +2 -0
  96. data/examples/widget_render/README.md +4 -1
  97. data/examples/widget_render/app.rb +2 -0
  98. data/examples/widget_rich_text/README.md +4 -1
  99. data/examples/widget_rich_text/app.rb +2 -0
  100. data/examples/widget_scroll_text/README.md +4 -1
  101. data/examples/widget_scroll_text/app.rb +3 -1
  102. data/examples/{widget_scrollbar_demo → widget_scrollbar}/README.md +7 -4
  103. data/examples/{widget_scrollbar_demo → widget_scrollbar}/app.rb +6 -4
  104. data/examples/{widget_sparkline_demo → widget_sparkline}/README.md +6 -3
  105. data/examples/{widget_sparkline_demo → widget_sparkline}/app.rb +7 -5
  106. data/examples/widget_style_colors/README.md +4 -1
  107. data/examples/widget_style_colors/app.rb +2 -0
  108. data/examples/{widget_table_demo → widget_table}/README.md +7 -4
  109. data/examples/{widget_table_demo → widget_table}/app.rb +4 -2
  110. data/examples/{widget_tabs_demo → widget_tabs}/README.md +6 -3
  111. data/examples/{widget_tabs_demo → widget_tabs}/app.rb +7 -5
  112. data/examples/widget_text_width/README.md +5 -2
  113. data/examples/widget_text_width/app.rb +2 -0
  114. data/exe/.gitkeep +0 -0
  115. data/ext/ratatui_ruby/Cargo.lock +1 -1
  116. data/ext/ratatui_ruby/Cargo.toml +1 -1
  117. data/ext/ratatui_ruby/extconf.rb +2 -0
  118. data/ext/ratatui_ruby/src/lib.rs +2 -2
  119. data/ext/ratatui_ruby/src/rendering.rs +9 -0
  120. data/ext/ratatui_ruby/src/style.rs +22 -2
  121. data/ext/ratatui_ruby/src/text.rs +26 -0
  122. data/ext/ratatui_ruby/src/widgets/barchart.rs +8 -6
  123. data/ext/ratatui_ruby/src/widgets/chart.rs +31 -4
  124. data/ext/ratatui_ruby/src/widgets/table.rs +13 -5
  125. data/ext/ratatui_ruby/src/widgets/tabs.rs +49 -9
  126. data/lib/ratatui_ruby/buffer/cell.rb +2 -0
  127. data/lib/ratatui_ruby/buffer.rb +2 -0
  128. data/lib/ratatui_ruby/cell.rb +2 -0
  129. data/lib/ratatui_ruby/event/focus_gained.rb +2 -0
  130. data/lib/ratatui_ruby/event/focus_lost.rb +2 -0
  131. data/lib/ratatui_ruby/event/key/character.rb +2 -0
  132. data/lib/ratatui_ruby/event/key/media.rb +2 -0
  133. data/lib/ratatui_ruby/event/key/modifier.rb +2 -0
  134. data/lib/ratatui_ruby/event/key/navigation.rb +2 -0
  135. data/lib/ratatui_ruby/event/key/system.rb +2 -0
  136. data/lib/ratatui_ruby/event/key.rb +2 -0
  137. data/lib/ratatui_ruby/event/mouse.rb +2 -0
  138. data/lib/ratatui_ruby/event/none.rb +2 -0
  139. data/lib/ratatui_ruby/event/paste.rb +2 -0
  140. data/lib/ratatui_ruby/event/resize.rb +2 -0
  141. data/lib/ratatui_ruby/event.rb +2 -0
  142. data/lib/ratatui_ruby/frame.rb +2 -0
  143. data/lib/ratatui_ruby/layout/constraint.rb +2 -0
  144. data/lib/ratatui_ruby/layout/layout.rb +2 -0
  145. data/lib/ratatui_ruby/layout/rect.rb +2 -0
  146. data/lib/ratatui_ruby/layout.rb +2 -0
  147. data/lib/ratatui_ruby/list_state.rb +2 -0
  148. data/lib/ratatui_ruby/schema/bar_chart/bar.rb +2 -0
  149. data/lib/ratatui_ruby/schema/bar_chart/bar_group.rb +2 -0
  150. data/lib/ratatui_ruby/schema/bar_chart.rb +4 -2
  151. data/lib/ratatui_ruby/schema/block.rb +4 -2
  152. data/lib/ratatui_ruby/schema/calendar.rb +4 -2
  153. data/lib/ratatui_ruby/schema/canvas.rb +2 -0
  154. data/lib/ratatui_ruby/schema/center.rb +2 -0
  155. data/lib/ratatui_ruby/schema/chart.rb +4 -2
  156. data/lib/ratatui_ruby/schema/clear.rb +2 -0
  157. data/lib/ratatui_ruby/schema/constraint.rb +2 -0
  158. data/lib/ratatui_ruby/schema/cursor.rb +2 -0
  159. data/lib/ratatui_ruby/schema/draw.rb +2 -0
  160. data/lib/ratatui_ruby/schema/gauge.rb +4 -2
  161. data/lib/ratatui_ruby/schema/layout.rb +2 -0
  162. data/lib/ratatui_ruby/schema/line_gauge.rb +4 -2
  163. data/lib/ratatui_ruby/schema/list.rb +3 -1
  164. data/lib/ratatui_ruby/schema/list_item.rb +2 -0
  165. data/lib/ratatui_ruby/schema/overlay.rb +2 -0
  166. data/lib/ratatui_ruby/schema/paragraph.rb +2 -0
  167. data/lib/ratatui_ruby/schema/ratatui_logo.rb +4 -2
  168. data/lib/ratatui_ruby/schema/ratatui_mascot.rb +4 -2
  169. data/lib/ratatui_ruby/schema/rect.rb +2 -0
  170. data/lib/ratatui_ruby/schema/row.rb +2 -0
  171. data/lib/ratatui_ruby/schema/scrollbar.rb +4 -2
  172. data/lib/ratatui_ruby/schema/shape/label.rb +2 -0
  173. data/lib/ratatui_ruby/schema/sparkline.rb +4 -2
  174. data/lib/ratatui_ruby/schema/style.rb +2 -0
  175. data/lib/ratatui_ruby/schema/table.rb +2 -0
  176. data/lib/ratatui_ruby/schema/tabs.rb +4 -2
  177. data/lib/ratatui_ruby/schema/text.rb +2 -0
  178. data/lib/ratatui_ruby/scrollbar_state.rb +2 -0
  179. data/lib/ratatui_ruby/style/style.rb +3 -0
  180. data/lib/ratatui_ruby/style.rb +2 -0
  181. data/lib/ratatui_ruby/table_state.rb +2 -0
  182. data/lib/ratatui_ruby/test_helper/event_injection.rb +2 -0
  183. data/lib/ratatui_ruby/test_helper/snapshot.rb +62 -21
  184. data/lib/ratatui_ruby/test_helper/snapshots/axis_labels_alignment.ansi +24 -0
  185. data/lib/ratatui_ruby/test_helper/snapshots/axis_labels_alignment.txt +24 -0
  186. data/lib/ratatui_ruby/test_helper/snapshots/barchart_styled_label.ansi +5 -0
  187. data/lib/ratatui_ruby/test_helper/snapshots/barchart_styled_label.txt +5 -0
  188. data/lib/ratatui_ruby/test_helper/snapshots/chart_rendering.ansi +24 -0
  189. data/lib/ratatui_ruby/test_helper/snapshots/chart_rendering.txt +24 -0
  190. data/lib/ratatui_ruby/test_helper/snapshots/half_block_marker.ansi +12 -0
  191. data/lib/ratatui_ruby/test_helper/snapshots/half_block_marker.txt +12 -0
  192. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_bottom.ansi +12 -0
  193. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_bottom.txt +12 -0
  194. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_left.ansi +12 -0
  195. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_left.txt +12 -0
  196. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_right.ansi +12 -0
  197. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_right.txt +12 -0
  198. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_top.ansi +12 -0
  199. data/lib/ratatui_ruby/test_helper/snapshots/legend_position_top.txt +12 -0
  200. data/lib/ratatui_ruby/test_helper/snapshots/my_snapshot.txt +1 -0
  201. data/lib/ratatui_ruby/test_helper/snapshots/styled_axis_title.ansi +10 -0
  202. data/lib/ratatui_ruby/test_helper/snapshots/styled_axis_title.txt +10 -0
  203. data/lib/ratatui_ruby/test_helper/snapshots/styled_dataset_name.ansi +10 -0
  204. data/lib/ratatui_ruby/test_helper/snapshots/styled_dataset_name.txt +10 -0
  205. data/lib/ratatui_ruby/test_helper/style_assertions.rb +2 -0
  206. data/lib/ratatui_ruby/test_helper/terminal.rb +5 -0
  207. data/lib/ratatui_ruby/test_helper/test_doubles.rb +2 -0
  208. data/lib/ratatui_ruby/test_helper.rb +6 -4
  209. data/lib/ratatui_ruby/tui/buffer_factories.rb +2 -0
  210. data/lib/ratatui_ruby/tui/canvas_factories.rb +2 -0
  211. data/lib/ratatui_ruby/tui/core.rb +2 -0
  212. data/lib/ratatui_ruby/tui/layout_factories.rb +2 -0
  213. data/lib/ratatui_ruby/tui/state_factories.rb +2 -0
  214. data/lib/ratatui_ruby/tui/style_factories.rb +2 -0
  215. data/lib/ratatui_ruby/tui/text_factories.rb +2 -0
  216. data/lib/ratatui_ruby/tui/widget_factories.rb +2 -0
  217. data/lib/ratatui_ruby/tui.rb +2 -0
  218. data/lib/ratatui_ruby/version.rb +3 -1
  219. data/lib/ratatui_ruby/widgets/bar_chart/bar.rb +2 -0
  220. data/lib/ratatui_ruby/widgets/bar_chart/bar_group.rb +2 -0
  221. data/lib/ratatui_ruby/widgets/bar_chart.rb +7 -4
  222. data/lib/ratatui_ruby/widgets/block.rb +46 -2
  223. data/lib/ratatui_ruby/widgets/calendar.rb +4 -2
  224. data/lib/ratatui_ruby/widgets/canvas.rb +2 -0
  225. data/lib/ratatui_ruby/widgets/cell.rb +2 -0
  226. data/lib/ratatui_ruby/widgets/center.rb +2 -0
  227. data/lib/ratatui_ruby/widgets/chart.rb +13 -6
  228. data/lib/ratatui_ruby/widgets/clear.rb +2 -0
  229. data/lib/ratatui_ruby/widgets/cursor.rb +2 -0
  230. data/lib/ratatui_ruby/widgets/gauge.rb +4 -2
  231. data/lib/ratatui_ruby/widgets/line_gauge.rb +4 -2
  232. data/lib/ratatui_ruby/widgets/list.rb +3 -1
  233. data/lib/ratatui_ruby/widgets/list_item.rb +2 -0
  234. data/lib/ratatui_ruby/widgets/overlay.rb +2 -0
  235. data/lib/ratatui_ruby/widgets/paragraph.rb +2 -0
  236. data/lib/ratatui_ruby/widgets/ratatui_logo.rb +4 -2
  237. data/lib/ratatui_ruby/widgets/ratatui_mascot.rb +4 -2
  238. data/lib/ratatui_ruby/widgets/row.rb +2 -0
  239. data/lib/ratatui_ruby/widgets/scrollbar.rb +4 -2
  240. data/lib/ratatui_ruby/widgets/shape/label.rb +2 -0
  241. data/lib/ratatui_ruby/widgets/sparkline.rb +7 -4
  242. data/lib/ratatui_ruby/widgets/table.rb +2 -0
  243. data/lib/ratatui_ruby/widgets/tabs.rb +12 -8
  244. data/lib/ratatui_ruby/widgets.rb +2 -0
  245. data/lib/ratatui_ruby.rb +130 -9
  246. data/tasks/autodoc/examples.rb +2 -0
  247. data/tasks/autodoc/member.rb +2 -0
  248. data/tasks/autodoc/name.rb +2 -0
  249. data/tasks/autodoc.rake +2 -0
  250. data/tasks/bump/cargo_lockfile.rb +2 -0
  251. data/tasks/bump/changelog.rb +2 -0
  252. data/tasks/bump/header.rb +2 -0
  253. data/tasks/bump/history.rb +2 -0
  254. data/tasks/bump/links.rb +2 -0
  255. data/tasks/bump/manifest.rb +2 -0
  256. data/tasks/bump/ruby_gem.rb +2 -0
  257. data/tasks/bump/sem_ver.rb +2 -0
  258. data/tasks/bump/unreleased_section.rb +2 -0
  259. data/tasks/bump.rake +2 -0
  260. data/tasks/doc.rake +268 -0
  261. data/tasks/extension.rake +2 -0
  262. data/tasks/lint.rake +115 -0
  263. data/tasks/rdoc_config.rb +18 -4
  264. data/tasks/sourcehut.rake +2 -0
  265. data/tasks/terminal_preview/app_screenshot.rb +2 -0
  266. data/tasks/terminal_preview/crash_report.rb +2 -0
  267. data/tasks/terminal_preview/example_app.rb +2 -0
  268. data/tasks/terminal_preview/launcher_script.rb +2 -0
  269. data/tasks/terminal_preview/preview_collection.rb +2 -0
  270. data/tasks/terminal_preview/preview_timing.rb +2 -0
  271. data/tasks/terminal_preview/safety_confirmation.rb +2 -0
  272. data/tasks/terminal_preview/saved_screenshot.rb +2 -0
  273. data/tasks/terminal_preview/system_appearance.rb +2 -0
  274. data/tasks/terminal_preview/terminal_window.rb +2 -0
  275. data/tasks/terminal_preview/window_id.rb +2 -0
  276. data/tasks/terminal_preview.rake +2 -0
  277. data/tasks/test.rake +2 -0
  278. data/tasks/website/index_page.rb +2 -0
  279. data/tasks/website/version.rb +12 -2
  280. data/tasks/website/version_menu.rb +2 -0
  281. data/tasks/website/versioned_documentation.rb +2 -0
  282. data/tasks/website/website.rb +2 -0
  283. data/tasks/website.rake +2 -0
  284. metadata +97 -75
  285. data/doc/contributors/architectural_overhaul/chat_conversations.md +0 -4952
  286. data/doc/contributors/architectural_overhaul/implementation_plan.md +0 -60
  287. data/doc/contributors/architectural_overhaul/task.md +0 -37
  288. /data/doc/{async.md → concepts/async.md} +0 -0
  289. /data/doc/{interactive_design.md → concepts/interactive_design.md} +0 -0
  290. /data/doc/images/{widget_barchart_demo.png → widget_barchart.png} +0 -0
  291. /data/doc/images/{widget_block_demo.png → widget_block.png} +0 -0
  292. /data/doc/images/{widget_box_demo.png → widget_box.png} +0 -0
  293. /data/doc/images/{widget_calendar_demo.png → widget_calendar.png} +0 -0
  294. /data/doc/images/{widget_canvas_demo.png → widget_canvas.png} +0 -0
  295. /data/doc/images/{widget_cell_demo.png → widget_cell.png} +0 -0
  296. /data/doc/images/{widget_center_demo.png → widget_center.png} +0 -0
  297. /data/doc/images/{widget_chart_demo.png → widget_chart.png} +0 -0
  298. /data/doc/images/{widget_gauge_demo.png → widget_gauge.png} +0 -0
  299. /data/doc/images/{widget_line_gauge_demo.png → widget_line_gauge.png} +0 -0
  300. /data/doc/images/{widget_list_demo.png → widget_list.png} +0 -0
  301. /data/doc/images/{widget_map_demo.png → widget_map.png} +0 -0
  302. /data/doc/images/{widget_overlay_demo.png → widget_overlay.png} +0 -0
  303. /data/doc/images/{widget_popup_demo.png → widget_popup.png} +0 -0
  304. /data/doc/images/{widget_ratatui_logo_demo.png → widget_ratatui_logo.png} +0 -0
  305. /data/doc/images/{widget_ratatui_mascot_demo.png → widget_ratatui_mascot.png} +0 -0
  306. /data/doc/images/{widget_scrollbar_demo.png → widget_scrollbar.png} +0 -0
  307. /data/doc/images/{widget_sparkline_demo.png → widget_sparkline.png} +0 -0
  308. /data/doc/images/{widget_table_demo.png → widget_table.png} +0 -0
  309. /data/doc/images/{widget_tabs_demo.png → widget_tabs.png} +0 -0
  310. /data/doc/{v0.7.0_migration.md → migration/v0_7_0.md} +0 -0
  311. /data/doc/{debugging.md → troubleshooting/debugging.md} +0 -0
@@ -3,9 +3,9 @@ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
5
 
6
- # List Widget Example
6
+ # List (ListItem) Example
7
7
 
8
- [![widget_list_demo](../../doc/images/widget_list_demo.png)](app.rb)
8
+ [![widget_list](../../doc/images/widget_list.png)](app.rb)
9
9
 
10
10
  Demonstrates a selectable list with extensive configuration options.
11
11
 
@@ -37,13 +37,16 @@ Lists are the workhorse of terminal interfaces. Managing selection state, scroll
37
37
  ## Usage
38
38
 
39
39
  ```bash
40
- ruby examples/widget_list_demo/app.rb
40
+ ruby examples/widget_list/app.rb
41
41
  ```
42
42
 
43
43
  ## Learning Outcomes
44
44
 
45
45
  Use this example if you need to...
46
+
46
47
  - Create a file explorer.
47
48
  - Build a navigation menu.
48
49
  - Display a log where users can scroll back to read history.
49
- - Implement "infinite select" behaviors.
50
+ - Implement "infinite select" behaviors.
51
+
52
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -19,10 +21,10 @@ require "faker" # Use Faker for large, realistic datasets
19
21
  #
20
22
  # Run the demo from the terminal:
21
23
  #
22
- # ruby examples/widget_list_demo/app.rb
24
+ # ruby examples/widget_list/app.rb
23
25
  #
24
- # rdoc-image:/doc/images/widget_list_demo.png
25
- class WidgetListDemo
26
+ # rdoc-image:/doc/images/widget_list.png
27
+ class WidgetList
26
28
  # Initializes the demo with example data and default configuration.
27
29
  def initialize
28
30
  Faker::Config.random = Random.new(12345)
@@ -253,7 +255,7 @@ class WidgetListDemo
253
255
  )
254
256
 
255
257
  # Render title
256
- title = @tui.paragraph(text: "List Widget Demo - Interactive Attribute Cycling")
258
+ title = @tui.paragraph(text: "List Widget - Interactive Attribute Cycling")
257
259
  frame.render_widget(title, title_area)
258
260
 
259
261
  # Render list
@@ -363,4 +365,4 @@ class WidgetListDemo
363
365
  end
364
366
  end
365
367
 
366
- WidgetListDemo.new.run if __FILE__ == $PROGRAM_NAME
368
+ WidgetList.new.run if __FILE__ == $PROGRAM_NAME
@@ -3,9 +3,9 @@ SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
5
 
6
- # Canvas Widget Example
6
+ # Map (World Map, Canvas) Example
7
7
 
8
- [![widget_map_demo](../../doc/images/widget_map_demo.png)](app.rb)
8
+ [![widget_map](../../doc/images/widget_map.png)](app.rb)
9
9
 
10
10
  Demonstrates drawing custom graphics and maps using the standard Braille and Block patterns.
11
11
 
@@ -28,12 +28,15 @@ Standard widgets are great for text, but sometimes you need to draw. The `Canvas
28
28
  ## Usage
29
29
 
30
30
  ```bash
31
- ruby examples/widget_map_demo/app.rb
31
+ ruby examples/widget_map/app.rb
32
32
  ```
33
33
 
34
34
  ## Learning Outcomes
35
35
 
36
36
  Use this example if you need to...
37
+
37
38
  - Render geographic data (World, USA, Europe).
38
39
  - Overlay custom labels and markers on a map.
39
- - Animate visual elements on top of a static background.
40
+ - Animate visual elements on top of a static background.
41
+
42
+ [Read the source code →](app.rb)
@@ -1,13 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
8
10
 
9
11
  # An example of the Canvas widget showing a world map and animated shapes.
10
- class WidgetMapDemo
12
+ class WidgetMap
11
13
  include RatatuiRuby::Widgets
12
14
 
13
15
  COLORS = [:black, :blue, :white, nil].freeze
@@ -90,4 +92,4 @@ class WidgetMapDemo
90
92
  end
91
93
  end
92
94
 
93
- WidgetMapDemo.new.run if __FILE__ == $PROGRAM_NAME
95
+ WidgetMap.new.run if __FILE__ == $PROGRAM_NAME
@@ -2,9 +2,9 @@
2
2
  SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
- # Overlay Widget Demo
5
+ # Overlay Example
6
6
 
7
- [![Overlay Demo](../../doc/images/widget_overlay_demo.png)](app.rb)
7
+ [![](../../doc/images/widget_overlay.png)](app.rb)
8
8
 
9
9
  This example demonstrates the `Overlay` composition pattern for layering widgets with depth. Modals, notifications, and floating panels all require stacking widgets on top of each other.
10
10
 
@@ -25,12 +25,15 @@ This example demonstrates the `Overlay` composition pattern for layering widgets
25
25
  ## Usage
26
26
 
27
27
  ```bash
28
- ruby examples/widget_overlay_demo/app.rb
28
+ ruby examples/widget_overlay/app.rb
29
29
  ```
30
30
 
31
31
  ## Learning Outcomes
32
32
 
33
33
  Use this example if you need to...
34
+
34
35
  - Build modal dialogs or confirmation popups.
35
36
  - Layer notifications over existing content.
36
37
  - Understand the Clear widget's role in opaque overlays.
38
+
39
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -33,9 +35,9 @@ HEADLINES = [
33
35
  "Innovative Urban Planning Reduces Traffic Congestion by 30%",
34
36
  ].freeze
35
37
 
36
- # Overlay Demo Example
38
+ # Overlay Example
37
39
  # Demonstrates the Overlay widget for layering widgets with depth.
38
- class WidgetOverlayDemo
40
+ class WidgetOverlay
39
41
  def initialize
40
42
  @layer_count = 2 # Start with 2 layers visible
41
43
  @swapped = false
@@ -245,4 +247,4 @@ class WidgetOverlayDemo
245
247
  end
246
248
  end
247
249
 
248
- WidgetOverlayDemo.new.run if __FILE__ == $PROGRAM_NAME
250
+ WidgetOverlay.new.run if __FILE__ == $PROGRAM_NAME
@@ -3,9 +3,9 @@ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
5
 
6
- # Popup (Clear) Widget Example
6
+ # Clear (Popup, Modal) Example
7
7
 
8
- [![widget_popup_demo](../../doc/images/widget_popup_demo.png)](app.rb)
8
+ [![widget_popup](../../doc/images/widget_popup.png)](app.rb)
9
9
 
10
10
  Demonstrates how to render opaque overlays on top of content.
11
11
 
@@ -25,12 +25,15 @@ Terminal renders are additive. If you draw a new widget over an old one, the bac
25
25
  ## Usage
26
26
 
27
27
  ```bash
28
- ruby examples/widget_popup_demo/app.rb
28
+ ruby examples/widget_popup/app.rb
29
29
  ```
30
30
 
31
31
  ## Learning Outcomes
32
32
 
33
33
  Use this example if you need to...
34
+
34
35
  - Create a modal dialog (Confirm, Alert, Form).
35
36
  - Implement a dropdown menu that overlays other content.
36
- - Fix visual artifacts where old text shows through new widgets.
37
+ - Fix visual artifacts where old text shows through new widgets.
38
+
39
+ [Read the source code →](app.rb)
@@ -1,15 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
8
10
 
9
- # Popup Demo Example
11
+ # Popup Example
10
12
  # Demonstrates the Clear widget for creating opaque popups.
11
13
 
12
- class WidgetPopupDemo
14
+ class WidgetPopup
13
15
  def initialize
14
16
  @clear_enabled = false
15
17
  end
@@ -75,7 +77,7 @@ class WidgetPopupDemo
75
77
  text: popup_text,
76
78
  alignment: :center,
77
79
  block: tui.block(
78
- title: "Popup Demo (q to quit, space to toggle)",
80
+ title: "Popup (q to quit, space to toggle)",
79
81
  borders: [:all]
80
82
  )
81
83
  )
@@ -101,4 +103,4 @@ class WidgetPopupDemo
101
103
  end
102
104
  end
103
105
 
104
- WidgetPopupDemo.new.run if __FILE__ == $0
106
+ WidgetPopup.new.run if __FILE__ == $0
@@ -5,7 +5,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
5
5
 
6
6
  # Ratatui Logo Example
7
7
 
8
- [![widget_ratatui_logo_demo](../../doc/images/widget_ratatui_logo_demo.png)](app.rb)
8
+ [![widget_ratatui_logo](../../doc/images/widget_ratatui_logo.png)](app.rb)
9
9
 
10
10
  Demonstrates branding with the official logo widget.
11
11
 
@@ -23,12 +23,15 @@ A polished application often needs an "About" screen or a splash screen. This wi
23
23
  ## Usage
24
24
 
25
25
  ```bash
26
- ruby examples/widget_ratatui_logo_demo/app.rb
26
+ ruby examples/widget_ratatui_logo/app.rb
27
27
  ```
28
28
 
29
29
  ## Learning Outcomes
30
30
 
31
31
  Use this example if you need to...
32
+
32
33
  - Create a splash screen.
33
34
  - Add an "About" modal to your application.
34
- - See how to center a widget both vertically and horizontally.
35
+ - See how to center a widget both vertically and horizontally.
36
+
37
+ [Read the source code →](app.rb)
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ #--
1
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
2
5
  #
3
6
  # SPDX-License-Identifier: AGPL-3.0-or-later
4
-
5
- # frozen_string_literal: true
7
+ #++
6
8
 
7
9
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
8
10
  require "ratatui_ruby"
@@ -19,10 +21,10 @@ require "ratatui_ruby"
19
21
  #
20
22
  # Run the demo from the terminal:
21
23
  #
22
- # ruby examples/widget_ratatui_logo_demo/app.rb
24
+ # ruby examples/widget_ratatui_logo/app.rb
23
25
  #
24
- # rdoc-image:/doc/images/widget_ratatui_logo_demo.png
25
- class WidgetRatatuiLogoDemo
26
+ # rdoc-image:/doc/images/widget_ratatui_logo.png
27
+ class WidgetRatatuiLogo
26
28
  def run
27
29
  RatatuiRuby.run do |tui|
28
30
  loop do
@@ -100,4 +102,4 @@ class WidgetRatatuiLogoDemo
100
102
  end
101
103
  end
102
104
 
103
- WidgetRatatuiLogoDemo.new.run if __FILE__ == $0
105
+ WidgetRatatuiLogo.new.run if __FILE__ == $0
@@ -5,7 +5,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
5
5
 
6
6
  # Ratatui Mascot Example
7
7
 
8
- [![widget_ratatui_mascot_demo](../../doc/images/widget_ratatui_mascot_demo.png)](app.rb)
8
+ [![widget_ratatui_mascot](../../doc/images/widget_ratatui_mascot.png)](app.rb)
9
9
 
10
10
  Demonstrates the project mascot widget for adding personality.
11
11
 
@@ -24,11 +24,14 @@ Interfaces can feel clinical. A friendly mascot adds charm and brand identity to
24
24
  ## Usage
25
25
 
26
26
  ```bash
27
- ruby examples/widget_ratatui_mascot_demo/app.rb
27
+ ruby examples/widget_ratatui_mascot/app.rb
28
28
  ```
29
29
 
30
30
  ## Learning Outcomes
31
31
 
32
32
  Use this example if you need to...
33
+
33
34
  - Add visual flair to your UI.
34
- - Create a friendly empty state or success screen.
35
+ - Create a friendly empty state or success screen.
36
+
37
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: CC-BY-SA-4.0
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -18,10 +20,10 @@ require "ratatui_ruby"
18
20
  #
19
21
  # Run the demo from the terminal:
20
22
  #
21
- # ruby examples/widget_ratatui_mascot_demo/app.rb
23
+ # ruby examples/widget_ratatui_mascot/app.rb
22
24
  #
23
- # rdoc-image:/doc/images/widget_ratatui_mascot_demo.png
24
- class WidgetRatatuiMascotDemo
25
+ # rdoc-image:/doc/images/widget_ratatui_mascot.png
26
+ class WidgetRatatuiMascot
25
27
  def initialize
26
28
  @show_block = true
27
29
  end
@@ -90,4 +92,4 @@ class WidgetRatatuiMascotDemo
90
92
  end
91
93
  end
92
94
 
93
- WidgetRatatuiMascotDemo.new.run if __FILE__ == $PROGRAM_NAME
95
+ WidgetRatatuiMascot.new.run if __FILE__ == $PROGRAM_NAME
@@ -3,7 +3,7 @@ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
5
 
6
- # Rect (Geometry) Widget Example
6
+ # Rect (Area, Rectangle) Example
7
7
 
8
8
  [![widget_rect](../../doc/images/widget_rect.png)](app.rb)
9
9
 
@@ -33,6 +33,9 @@ ruby examples/widget_rect/app.rb
33
33
  ## Learning Outcomes
34
34
 
35
35
  Use this example if you need to...
36
+
36
37
  - Handle mouse clicks on specific buttons or areas.
37
38
  - Create resizable panes (like a split pane in an IDE).
38
- - Debug layout issues by inspecting Rect coordinates.
39
+ - Debug layout issues by inspecting Rect coordinates.
40
+
41
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -32,6 +32,9 @@ ruby examples/widget_render/app.rb
32
32
  ## Learning Outcomes
33
33
 
34
34
  Use this example if you need to...
35
+
35
36
  - Build a game (Snake, Tetris) inside the terminal.
36
37
  - Create a specialized visualization (Network topology graph).
37
- - Draw custom UI elements not provided by the library.
38
+ - Draw custom UI elements not provided by the library.
39
+
40
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -30,6 +30,9 @@ ruby examples/widget_rich_text/app.rb
30
30
  ## Learning Outcomes
31
31
 
32
32
  Use this example if you need to...
33
+
33
34
  - Highlight keywords in code (Syntax highlighting).
34
35
  - Create status lines with icons (e.g., "✔ Success" where the checkmark is green).
35
- - Emphasize specific data points in a paragraph.
36
+ - Emphasize specific data points in a paragraph.
37
+
38
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -32,6 +32,9 @@ ruby examples/widget_scroll_text/app.rb
32
32
  ## Learning Outcomes
33
33
 
34
34
  Use this example if you need to...
35
+
35
36
  - Build a log viewer.
36
37
  - Create a "terms and conditions" scrollbox.
37
- - Display code snippets that might be wider than the terminal.
38
+ - Display code snippets that might be wider than the terminal.
39
+
40
+ [Read the source code →](app.rb)
@@ -1,12 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
8
10
 
9
- # Demo: Scrollable Paragraph
11
+ # Scrollable Paragraph
10
12
  # Shows how to scroll through long text content using arrow keys
11
13
  #
12
14
  # Helper: Disable experimental warnings since we use line_count/line_width
@@ -3,9 +3,9 @@ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
5
 
6
- # Scrollbar Widget Example
6
+ # Scrollbar (Scroll) Example
7
7
 
8
- [![widget_scrollbar_demo](../../doc/images/widget_scrollbar_demo.png)](app.rb)
8
+ [![widget_scrollbar](../../doc/images/widget_scrollbar.png)](app.rb)
9
9
 
10
10
  Demonstrates explicit scrollbars for navigation feedback.
11
11
 
@@ -27,11 +27,14 @@ Content overflows. Users get lost in long lists. Scrollbars provide essential sp
27
27
  ## Usage
28
28
 
29
29
  ```bash
30
- ruby examples/widget_scrollbar_demo/app.rb
30
+ ruby examples/widget_scrollbar/app.rb
31
31
  ```
32
32
 
33
33
  ## Learning Outcomes
34
34
 
35
35
  Use this example if you need to...
36
+
36
37
  - Add visual scroll indicators to Lists or Tables.
37
- - Implement specialized inputs like sliders or volume controls.
38
+ - Implement specialized inputs like sliders or volume controls.
39
+
40
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -18,10 +20,10 @@ require "ratatui_ruby"
18
20
  #
19
21
  # Run the demo from the terminal:
20
22
  #
21
- # ruby examples/widget_scrollbar_demo/app.rb
23
+ # ruby examples/widget_scrollbar/app.rb
22
24
  #
23
- # rdoc-image:/doc/images/widget_scrollbar_demo.png
24
- class WidgetScrollbarDemo
25
+ # rdoc-image:/doc/images/widget_scrollbar.png
26
+ class WidgetScrollbar
25
27
  def initialize
26
28
  @scroll_position = 0
27
29
  @content_length = 50
@@ -150,4 +152,4 @@ class WidgetScrollbarDemo
150
152
  end
151
153
  end
152
154
 
153
- WidgetScrollbarDemo.new.run if __FILE__ == $PROGRAM_NAME
155
+ WidgetScrollbar.new.run if __FILE__ == $PROGRAM_NAME
@@ -5,7 +5,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
5
5
 
6
6
  # Sparkline Widget Example
7
7
 
8
- [![widget_sparkline_demo](../../doc/images/widget_sparkline_demo.png)](app.rb)
8
+ [![widget_sparkline](../../doc/images/widget_sparkline.png)](app.rb)
9
9
 
10
10
  Demonstrates high-density data visualization in a condensed footprint.
11
11
 
@@ -31,12 +31,15 @@ Users need context. A single number ("90% CPU") tells you status, but not the tr
31
31
  ## Usage
32
32
 
33
33
  ```bash
34
- ruby examples/widget_sparkline_demo/app.rb
34
+ ruby examples/widget_sparkline/app.rb
35
35
  ```
36
36
 
37
37
  ## Learning Outcomes
38
38
 
39
39
  Use this example if you need to...
40
+
40
41
  - Add a "CPU Load" graph to your header.
41
42
  - Visualize stock price trends in a list row.
42
- - Monitor memory usage over the last 60 seconds.
43
+ - Monitor memory usage over the last 60 seconds.
44
+
45
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -18,10 +20,10 @@ require "ratatui_ruby"
18
20
  #
19
21
  # Run the demo from the terminal:
20
22
  #
21
- # ruby examples/widget_sparkline_demo/app.rb
23
+ # ruby examples/widget_sparkline/app.rb
22
24
  #
23
- # rdoc-image:/doc/images/widget_sparkline_demo.png
24
- class WidgetSparklineDemo
25
+ # rdoc-image:/doc/images/widget_sparkline.png
26
+ class WidgetSparkline
25
27
  def run
26
28
  RatatuiRuby.run do |tui|
27
29
  @tui = tui
@@ -144,7 +146,7 @@ class WidgetSparklineDemo
144
146
  )
145
147
 
146
148
  frame.render_widget(
147
- @tui.paragraph(text: "Sparkline Widget Demo - Cycle attributes with hotkeys"),
149
+ @tui.paragraph(text: "Sparkline Widget - Cycle attributes with hotkeys"),
148
150
  main_layout[0]
149
151
  )
150
152
 
@@ -272,4 +274,4 @@ class WidgetSparklineDemo
272
274
  end
273
275
  end
274
276
 
275
- WidgetSparklineDemo.new.run if __FILE__ == $PROGRAM_NAME
277
+ WidgetSparkline.new.run if __FILE__ == $PROGRAM_NAME
@@ -29,6 +29,9 @@ ruby examples/widget_style_colors/app.rb
29
29
  ## Learning Outcomes
30
30
 
31
31
  Use this example if you need to...
32
+
32
33
  - Create meaningful heatmaps.
33
34
  - Generate color palettes dynamically.
34
- - Test your terminal's color support capabilities.
35
+ - Test your terminal's color support capabilities.
36
+
37
+ [Read the source code →](app.rb)
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #--
3
4
  # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
5
  # SPDX-License-Identifier: AGPL-3.0-or-later
6
+ #++
5
7
 
6
8
  $LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
7
9
  require "ratatui_ruby"
@@ -3,9 +3,9 @@ SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
5
 
6
- # Table Widget Example
6
+ # Table (Row, Cell) Example
7
7
 
8
- [![widget_table_demo](../../doc/images/widget_table_demo.png)](app.rb)
8
+ [![widget_table](../../doc/images/widget_table.png)](app.rb)
9
9
 
10
10
  Demonstrates advanced options for the `Table` widget, including selection, row-level highlighting, and column-level highlighting.
11
11
 
@@ -37,12 +37,15 @@ Data grids are complex. Users expect to navigate them with keys, select rows, an
37
37
  ## Usage
38
38
 
39
39
  ```bash
40
- ruby examples/widget_table_demo/app.rb
40
+ ruby examples/widget_table/app.rb
41
41
  ```
42
42
 
43
43
  ## Learning Outcomes
44
44
 
45
45
  Use this example if you need to...
46
+
46
47
  - Build a file explorer or process list.
47
48
  - Create a data-heavy dashboard.
48
- - Handle conflicting style requirements (e.g., "Highlight this row, but make this error cell red").
49
+ - Handle conflicting style requirements (e.g., "Highlight this row, but make this error cell red").
50
+
51
+ [Read the source code →](app.rb)