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
@@ -59,7 +59,7 @@ end
59
59
  ```
60
60
  <!-- SYNC:END -->
61
61
 
62
- [![quickstart_lifecycle](./images/verify_quickstart_lifecycle.png)](../examples/verify_quickstart_lifecycle/README.md)
62
+ [![quickstart_lifecycle](../images/verify_quickstart_lifecycle.png)](../../examples/verify_quickstart_lifecycle/README.md)
63
63
 
64
64
  #### How it works
65
65
 
@@ -115,7 +115,7 @@ end
115
115
  3. **Method Shorthand**: The `TUI` object also provides aliases for module functions of `RatatuiRuby`, allowing you to write `tui.draw(...)` instead of the more verbose `RatatuiRuby.draw(...)`.
116
116
  4. **Pattern Matching for Events**: Use `case...in` with pattern matching for elegant event dispatch. Always include an `else` clause at the end to catch unmatched event types (mouse, resize, paste, focus, etc.), otherwise Ruby raises `NoMatchingPatternError`.
117
117
 
118
- For a deeper dive into the available application architectures (Manual vs Managed), see [Application Architecture](./application_architecture.md).
118
+ For a deeper dive into the available application architectures (Manual vs Managed), see [Application Architecture](../concepts/application_architecture.md).
119
119
 
120
120
  ### Adding Layouts
121
121
 
@@ -185,7 +185,7 @@ end
185
185
  3. **`Frame#render_widget(widget, rect)`**: You pass the specific area (like `top` or `bottom`) to render the widget into that exact region.
186
186
  4. **`tui.text_span` (`RatatuiRuby::Text::Span`)**: Allows for rich styling within a single line of text.
187
187
 
188
- [![quickstart_layout](./images/verify_quickstart_layout.png)](../examples/verify_quickstart_layout/README.md)
188
+ [![quickstart_layout](../images/verify_quickstart_layout.png)](../../examples/verify_quickstart_layout/README.md)
189
189
 
190
190
  ## Examples
191
191
 
@@ -197,32 +197,32 @@ Focused examples for individual widgets. Each demonstrates a single widget and i
197
197
 
198
198
  | Widget | What it demonstrates |
199
199
  |--------|---------------------|
200
- | [Bar Chart](../examples/widget_barchart_demo/app.rb) | Grouped bars, data visualization, custom bar styling |
201
- | [Block](../examples/widget_block_demo/app.rb) | Borders, titles, padding, nested widgets |
202
- | [Box](../examples/widget_box_demo/app.rb) | Block + Paragraph composition, text wrapping |
203
- | [Calendar](../examples/widget_calendar_demo/app.rb) | Date highlighting, month display, event markers |
204
- | [Chart](../examples/widget_chart_demo/app.rb) | Line/scatter plots, axes, legends, datasets |
205
- | [Gauge](../examples/widget_gauge_demo/app.rb) | Progress bars, percentage display, unicode blocks |
200
+ | [Bar Chart](../examples/widget_barchart/app.rb) | Grouped bars, data visualization, custom bar styling |
201
+ | [Block](../examples/widget_block/app.rb) | Borders, titles, padding, nested widgets |
202
+ | [Box](../examples/widget_box/app.rb) | Block + Paragraph composition, text wrapping |
203
+ | [Calendar](../examples/widget_calendar/app.rb) | Date highlighting, month display, event markers |
204
+ | [Chart](../examples/widget_chart/app.rb) | Line/scatter plots, axes, legends, datasets |
205
+ | [Gauge](../examples/widget_gauge/app.rb) | Progress bars, percentage display, unicode blocks |
206
206
  | [Layout Split](../examples/widget_layout_split/app.rb) | Constraint types, flex modes, responsive layouts |
207
- | [Line Gauge](../examples/widget_line_gauge_demo/app.rb) | Horizontal progress, labels, thin-style gauges |
208
- | [List](../examples/widget_list_demo/app.rb) | Selection, scrolling, highlight styles, rich text items |
209
- | [Map](../examples/widget_map_demo/app.rb) | Canvas widget, world map rendering, coordinates |
210
- | [Popup](../examples/widget_popup_demo/app.rb) | Clear widget, modal dialogs, overlay composition |
211
- | [Ratatui Logo](../examples/widget_ratatui_logo_demo/app.rb) | Decorative branding widget |
212
- | [Ratatui Mascot](../examples/widget_ratatui_mascot_demo/app.rb) | ASCII art Ferris mascot |
207
+ | [Line Gauge](../examples/widget_line_gauge/app.rb) | Horizontal progress, labels, thin-style gauges |
208
+ | [List](../examples/widget_list/app.rb) | Selection, scrolling, highlight styles, rich text items |
209
+ | [Map](../examples/widget_map/app.rb) | Canvas widget, world map rendering, coordinates |
210
+ | [Popup](../examples/widget_popup/app.rb) | Clear widget, modal dialogs, overlay composition |
211
+ | [Ratatui Logo](../examples/widget_ratatui_logo/app.rb) | Decorative branding widget |
212
+ | [Ratatui Mascot](../examples/widget_ratatui_mascot/app.rb) | ASCII art Ferris mascot |
213
213
  | [Rect](../examples/widget_rect/app.rb) | Geometry helpers, area calculations, contains/intersection |
214
214
  | [Rich Text](../examples/widget_rich_text/app.rb) | Spans, lines, inline styling, mixed colors |
215
- | [Scrollbar](../examples/widget_scrollbar_demo/app.rb) | Orientations, thumb/track styling, scroll state |
215
+ | [Scrollbar](../examples/widget_scrollbar/app.rb) | Orientations, thumb/track styling, scroll state |
216
216
  | [Scroll Text](../examples/widget_scroll_text/app.rb) | Paragraph scrolling, viewport control, long content |
217
- | [Sparkline](../examples/widget_sparkline_demo/app.rb) | Mini charts, time series, bar sets |
217
+ | [Sparkline](../examples/widget_sparkline/app.rb) | Mini charts, time series, bar sets |
218
218
  | [Style Colors](../examples/widget_style_colors/app.rb) | Named colors, RGB, indexed 256-color palette |
219
- | [Table](../examples/widget_table_demo/app.rb) | Row selection, column widths, per-cell styling |
220
- | [Tabs](../examples/widget_tabs_demo/app.rb) | Tab navigation, highlighting, dividers |
219
+ | [Table](../examples/widget_table/app.rb) | Row selection, column widths, per-cell styling |
220
+ | [Tabs](../examples/widget_tabs/app.rb) | Tab navigation, highlighting, dividers |
221
221
  | [Text Width](../examples/widget_text_width/app.rb) | Unicode-aware width measurement, CJK support |
222
- | [Canvas](../examples/widget_canvas_demo/app.rb) | Drawing shapes, markers, custom graphics |
223
- | [Cell](../examples/widget_cell_demo/app.rb) | Buffer cell inspection, styling attributes |
224
- | [Center](../examples/widget_center_demo/app.rb) | Centering content, horizontal/vertical alignment |
225
- | [Overlay](../examples/widget_overlay_demo/app.rb) | Layering widgets, modal backgrounds |
222
+ | [Canvas](../examples/widget_canvas/app.rb) | Drawing shapes, markers, custom graphics |
223
+ | [Cell](../examples/widget_cell/app.rb) | Buffer cell inspection, styling attributes |
224
+ | [Center](../examples/widget_center/app.rb) | Centering content, horizontal/vertical alignment |
225
+ | [Overlay](../examples/widget_overlay/app.rb) | Layering widgets, modal backgrounds |
226
226
  | [Custom Render](../examples/widget_render/app.rb) | Low-level Draw API, escape hatch for custom widgets |
227
227
 
228
228
  ### Sample Applications
@@ -253,8 +253,8 @@ These larger examples combine widgets into complete applications, demonstrating
253
253
 
254
254
  Now that you've seen what **ratatui_ruby** can do:
255
255
 
256
- - **Deep dive**: Read the [Application Architecture](./application_architecture.md) guide for scaling patterns
257
- - **Test your TUI**: See the [Testing Guide](./application_testing.md) for snapshot and style assertions
258
- - **Explore the API**: Browse the [full RDoc documentation](./index.md)
256
+ - **Deep dive**: Read the [Application Architecture](../concepts/application_architecture.md) guide for scaling patterns
257
+ - **Test your TUI**: See the [Testing Guide](../concepts/application_testing.md) for snapshot and style assertions
258
+ - **Explore the API**: Browse the [full RDoc documentation](../index.md)
259
259
  - **Learn the philosophy**: Read [Why RatatuiRuby?](./why.md) for comparisons and design decisions
260
260
  - **Get help**: Join the [discussion mailing list](https://lists.sr.ht/~kerrick/ratatui_ruby-discuss)
@@ -90,4 +90,4 @@ Ready to build?
90
90
 
91
91
  - [Quickstart Guide](./quickstart.md) — Your first app in 5 minutes
92
92
  - [Widget Gallery](./quickstart.md#widget-demos) — See what's possible
93
- - [Application Architecture](./application_architecture.md) — Patterns for scaling
93
+ - [Application Architecture](../concepts/application_architecture.md) — Patterns for scaling
data/doc/index.md CHANGED
@@ -2,20 +2,34 @@
2
2
  SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
- # **ratatui_ruby** Documentation
5
+ # Start Here
6
6
 
7
7
 
8
8
  ## Documentation for Users
9
9
 
10
10
  - [README](../README.md): Project overview and installation
11
- - [Why RatatuiRuby?](./why.md): Philosophy, comparisons, and what makes us different
12
- - [Quickstart](./quickstart.md): Build your first TUI app
13
- - [Application Architecture](./application_architecture.md): Lifecycle patterns and API choices
14
- - [Event Handling](./event_handling.md): Keyboard, mouse, and terminal events
15
- - [Interactive Design](./interactive_design.md): Cached layout pattern for hit testing
16
- - [Terminal Limitations](./terminal_limitations.md): Platform quirks and workarounds
17
- - [Testing Your Application](./application_testing.md): Snapshot testing and style assertions
18
- - [Migrating to v0.7.0](./v0.7.0_migration.md): Namespace changes and upgrade guide
11
+
12
+ ### Getting Started
13
+
14
+ - [Why RatatuiRuby?](./getting_started/why.md): Philosophy, comparisons, and what makes us different
15
+ - [Quickstart](./getting_started/quickstart.md): Build your first TUI app
16
+
17
+ ### Concepts
18
+
19
+ - [Application Architecture](./concepts/application_architecture.md): Lifecycle patterns and API choices
20
+ - [Event Handling](./concepts/event_handling.md): Keyboard, mouse, and terminal events
21
+ - [Interactive Design](./concepts/interactive_design.md): Cached layout pattern for hit testing
22
+ - [Testing Your Application](./concepts/application_testing.md): Snapshot testing and style assertions
23
+ - [Async Operations](./concepts/async.md): Background tasks and non-blocking I/O
24
+
25
+ ### Troubleshooting
26
+
27
+ - [Debugging](./troubleshooting/debugging.md): Debugging techniques and tools
28
+ - [Terminal Limitations](./troubleshooting/terminal_limitations.md): Platform quirks and workarounds
29
+
30
+ ### Migration
31
+
32
+ - [Migrating to v0.7.0](./migration/v0_7_0.md): Namespace changes and upgrade guide
19
33
 
20
34
 
21
35
  ## Documentation for Contributors
@@ -90,3 +90,36 @@ Focus event reporting requires explicit terminal support and configuration. Some
90
90
  ### The Solution
91
91
 
92
92
  Don't rely on focus events for critical functionality. Treat them as nice-to-have enhancements. If your application shows stale data when the user returns, periodically refresh instead of waiting for focus events.
93
+
94
+ ## Process Termination
95
+
96
+ ### The Problem
97
+
98
+ Your TUI app is terminated by `kill -9` or the [OOM killer](https://en.wikipedia.org/wiki/Out_of_memory#Out_of_memory_management). The terminal stays in raw mode. The user's cursor vanishes. Input echoes weirdly. Their shell is unusable.
99
+
100
+ ### The Cause
101
+
102
+ SIGKILL (`kill -9`) terminates processes immediately. No cleanup code runs. The terminal never receives the escape sequences to restore normal mode.
103
+
104
+ This also happens when:
105
+ - The system OOM killer terminates your process
106
+ - A parent process force-kills your app
107
+ - A debugger disconnects ungracefully
108
+
109
+ ### The Solution
110
+
111
+ There's no way to catch SIGKILL. You can only mitigate the impact.
112
+
113
+ **Tell your users how to recover.** In your README or troubleshooting docs, explain: if the terminal breaks, type `reset` and press Enter. The characters won't echo, but the command runs.
114
+
115
+ **Script graceful shutdowns.** If you write deployment or process management scripts, prefer graceful signals with a timeout before SIGKILL:
116
+
117
+ ```bash
118
+ # Graceful first, force if needed
119
+ kill -15 $PID
120
+ sleep 2
121
+ kill -0 $PID 2>/dev/null && kill -9 $PID
122
+ ```
123
+
124
+ See [Application Architecture: Signal Handling](../concepts/application_architecture.md#signal-handling) for programmatic cleanup strategies.
125
+
@@ -0,0 +1,76 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Terminal Output During TUI Sessions
7
+
8
+ ## The Problem
9
+
10
+ Writing to stdout or stderr during a TUI session **corrupts the display**.
11
+
12
+ When your application is running inside `RatatuiRuby.run`, the terminal is in "raw mode" and RatatuiRuby has taken control of the display buffer. Any output via `puts`, `warn`, `p`, `print`, or direct writes to `STDOUT`/`STDERR` will:
13
+
14
+ 1. **Corrupt the screen layout** - Characters appear in random positions
15
+ 2. **Mix with TUI output** - Text interleaves with your widgets unpredictably
16
+ 3. **Trigger escape sequence errors** - Partial ANSI codes can break rendering
17
+
18
+ ## Why This Happens
19
+
20
+ In raw mode:
21
+ - The terminal doesn't process newlines or carriage returns normally
22
+ - Output bypasses the TUI's controlled buffer
23
+ - Cursor position is undefined from the TUI's perspective
24
+
25
+ ## Safe Patterns
26
+
27
+ ### Defer output until after the TUI exits
28
+
29
+ ```ruby
30
+ messages = []
31
+
32
+ RatatuiRuby.run do |tui|
33
+ # Collect messages instead of printing them
34
+ messages << "Something happened"
35
+
36
+ # ... TUI logic ...
37
+ end
38
+
39
+ # Now safe to print
40
+ messages.each { |msg| puts msg }
41
+ ```
42
+
43
+ ### Use debug logging to a file
44
+
45
+ ```ruby
46
+ DEBUG_LOG = File.open("/tmp/my_app_debug.log", "a")
47
+
48
+ RatatuiRuby.run do |tui|
49
+ DEBUG_LOG.puts "Debug: something happened"
50
+ DEBUG_LOG.flush
51
+
52
+ # ... TUI logic ...
53
+ end
54
+ ```
55
+
56
+ ### Display messages in the TUI itself
57
+
58
+ ```ruby
59
+ RatatuiRuby.run do |tui|
60
+ @status_message = "Something happened"
61
+
62
+ tui.draw do |frame|
63
+ # Show status in the UI
64
+ frame.render_widget(
65
+ tui.paragraph(text: @status_message),
66
+ status_area
67
+ )
68
+ end
69
+ end
70
+ ```
71
+
72
+ ## Library Behavior
73
+
74
+ RatatuiRuby automatically defers its own warnings (like experimental feature notices) during TUI sessions. They are queued and printed after `restore_terminal` is called.
75
+
76
+ You don't need to do anything special for library warnings—they're handled automatically.
@@ -99,3 +99,4 @@ The Color Picker uses a Component-Based pattern. Each component encapsulates its
99
99
 
100
100
  Use this pattern for forms, editors, and mouse-driven tools.
101
101
 
102
+ [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
  $LOAD_PATH.unshift File.expand_path(__dir__)
@@ -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
  require_relative "timestamp"
7
9
  require_relative "event_entry"
@@ -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
  # Cycles through a set of colors for event logging.
7
9
  #
@@ -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
  require_relative "timestamp"
7
9
  require "ratatui_ruby"
@@ -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
  # Semantic message types for the Model-View-Update architecture.
7
9
  #
@@ -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
  # Represents a high-resolution point in time.
7
9
  #
@@ -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
  require_relative "model/app_model"
7
9
  require_relative "model/msg"
@@ -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
  require_relative "../view"
7
9
  require_relative "counts_view"
@@ -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
  require_relative "../view"
7
9
 
@@ -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
  require_relative "../view"
7
9
 
@@ -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
  require_relative "../view"
7
9
 
@@ -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
  require_relative "../view"
7
9
 
@@ -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
  module View
7
9
  end
@@ -134,3 +134,5 @@ Use this pattern for forms, editors, and mouse-driven tools.
134
134
  Dashboards display data. They rarely require complex mouse interaction. Model-View-Update works best there. State is immutable. Logic is pure. Updates are predictable. This simplifies testing.
135
135
 
136
136
  Use that pattern for logs, monitors, and data viewers.
137
+
138
+ [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
  $LOAD_PATH.unshift File.expand_path(__dir__)
@@ -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
  # Manages system clipboard interaction with transient feedback.
7
9
  #
@@ -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
  require "chroma"
7
9
  require "wcag_color_contrast"
@@ -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
  # A display-only component showing keyboard shortcuts and clipboard feedback.
7
9
  #
@@ -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
  require_relative "clipboard"
7
9
 
@@ -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
  # A self-contained component displaying export formats for a color.
7
9
  #
@@ -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
  # A single color variant with label and styling information.
7
9
  #
@@ -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
  require_relative "color"
7
9
 
@@ -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
  require_relative "input"
7
9
  require_relative "palette"
@@ -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
  require_relative "color"
7
9
 
@@ -43,7 +43,10 @@ ruby examples/app_login_form/app.rb
43
43
  ## Learning Outcomes
44
44
 
45
45
  Use this example if you need to...
46
+
46
47
  - Create a modal dialog or popup.
47
48
  - Center a widget on the screen (vertically and horizontally).
48
49
  - Implement a simple text input field with cursor management.
49
50
  - layer widgets using the `Overlay` widget.
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"
@@ -31,3 +31,5 @@ In `ratatui_ruby`'s Stateful Rendering:
31
31
  | `Tab` / `←` / `→` | Switch active pane (List vs Table) |
32
32
  | `Mouse Click` | Select the clicked row (Works with scrolling!) |
33
33
  | `q` | Quit |
34
+
35
+ [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"
@@ -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
  # Timeout Demo: Non-Blocking Event Polling
7
9
  #
@@ -5,7 +5,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
5
5
 
6
6
  # Quickstart DSL Verification
7
7
 
8
- Verifies the "Simplified API" tutorial in the [Quickstart](../../doc/quickstart.md#simplified-api).
8
+ Verifies the "Simplified API" tutorial in the [Quickstart](../../doc/getting_started/quickstart.md#simplified-api).
9
9
 
10
10
  This example exists as a documentation regression test. It ensures the recommended TUI facade and managed lifecycle workflow remains functional.
11
11
 
@@ -46,4 +46,4 @@ end
46
46
  ```
47
47
  <!-- SYNC:END -->
48
48
 
49
- [![verify_quickstart_dsl](../../doc/images/verify_quickstart_dsl.png)](../../doc/quickstart.md#simplified-api)
49
+ [![verify_quickstart_dsl](../../doc/images/verify_quickstart_dsl.png)](../../doc/getting_started/quickstart.md#simplified-api)
@@ -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
 
@@ -5,7 +5,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
5
5
 
6
6
  # Quickstart Layout Verification
7
7
 
8
- Verifies the "Adding Layouts" tutorial in the [Quickstart](../../doc/quickstart.md#adding-layouts).
8
+ Verifies the "Adding Layouts" tutorial in the [Quickstart](../../doc/getting_started/quickstart.md#adding-layouts).
9
9
 
10
10
  This example exists as a documentation regression test. It ensures the layout and constraints examples remain functional.
11
11
 
@@ -68,4 +68,4 @@ end
68
68
  ```
69
69
  <!-- SYNC:END -->
70
70
 
71
- [![verify_quickstart_layout](../../doc/images/verify_quickstart_layout.png)](../../doc/quickstart.md#adding-layouts)
71
+ [![verify_quickstart_layout](../../doc/images/verify_quickstart_layout.png)](../../doc/getting_started/quickstart.md#adding-layouts)
@@ -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
 
@@ -5,7 +5,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
5
5
 
6
6
  # Quickstart Lifecycle Verification
7
7
 
8
- Verifies the "Basic Application" tutorial in the [Quickstart](../../doc/quickstart.md#basic-application).
8
+ Verifies the "Basic Application" tutorial in the [Quickstart](../../doc/getting_started/quickstart.md#basic-application).
9
9
 
10
10
  This example exists as a documentation regression test. It ensures the core lifecycle example presented to new users remains functional.
11
11
 
@@ -53,4 +53,4 @@ end
53
53
  ```
54
54
  <!-- SYNC:END -->
55
55
 
56
- [![verify_quickstart_lifecycle](../../doc/images/verify_quickstart_lifecycle.png)](../../doc/quickstart.md#basic-application)
56
+ [![verify_quickstart_lifecycle](../../doc/images/verify_quickstart_lifecycle.png)](../../doc/getting_started/quickstart.md#basic-application)