ratatui_ruby 0.7.0 → 0.7.2

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 (284) 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 +8 -1
  7. data/CHANGELOG.md +34 -0
  8. data/README.md +5 -5
  9. data/Rakefile +1 -1
  10. data/doc/{application_architecture.md → concepts/application_architecture.md} +30 -0
  11. data/doc/concepts/async.md +160 -0
  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 +3 -3
  15. data/doc/contributors/v1.0.0_blockers.md +8 -8
  16. data/doc/{quickstart.md → getting_started/quickstart.md} +26 -26
  17. data/doc/{why.md → getting_started/why.md} +1 -1
  18. data/doc/index.md +23 -9
  19. data/doc/troubleshooting/debugging.md +71 -0
  20. data/doc/{terminal_limitations.md → troubleshooting/terminal_limitations.md} +33 -0
  21. data/examples/app_all_events/README.md +1 -0
  22. data/examples/app_all_events/app.rb +2 -0
  23. data/examples/app_all_events/model/app_model.rb +2 -0
  24. data/examples/app_all_events/model/event_color_cycle.rb +2 -0
  25. data/examples/app_all_events/model/event_entry.rb +2 -0
  26. data/examples/app_all_events/model/msg.rb +2 -0
  27. data/examples/app_all_events/model/timestamp.rb +2 -0
  28. data/examples/app_all_events/update.rb +2 -0
  29. data/examples/app_all_events/view/app_view.rb +2 -0
  30. data/examples/app_all_events/view/controls_view.rb +2 -0
  31. data/examples/app_all_events/view/counts_view.rb +2 -0
  32. data/examples/app_all_events/view/live_view.rb +2 -0
  33. data/examples/app_all_events/view/log_view.rb +2 -0
  34. data/examples/app_all_events/view.rb +2 -0
  35. data/examples/app_color_picker/README.md +2 -0
  36. data/examples/app_color_picker/app.rb +2 -0
  37. data/examples/app_color_picker/clipboard.rb +2 -0
  38. data/examples/app_color_picker/color.rb +2 -0
  39. data/examples/app_color_picker/controls.rb +2 -0
  40. data/examples/app_color_picker/copy_dialog.rb +2 -0
  41. data/examples/app_color_picker/export_pane.rb +2 -0
  42. data/examples/app_color_picker/harmony.rb +2 -0
  43. data/examples/app_color_picker/input.rb +2 -0
  44. data/examples/app_color_picker/main_container.rb +2 -0
  45. data/examples/app_color_picker/palette.rb +2 -0
  46. data/examples/app_login_form/README.md +3 -0
  47. data/examples/app_login_form/app.rb +2 -0
  48. data/examples/app_stateful_interaction/README.md +2 -0
  49. data/examples/app_stateful_interaction/app.rb +2 -0
  50. data/examples/timeout_demo.rb +2 -0
  51. data/examples/verify_quickstart_dsl/README.md +2 -2
  52. data/examples/verify_quickstart_dsl/app.rb +2 -0
  53. data/examples/verify_quickstart_layout/README.md +2 -2
  54. data/examples/verify_quickstart_layout/app.rb +2 -0
  55. data/examples/verify_quickstart_lifecycle/README.md +2 -2
  56. data/examples/verify_quickstart_lifecycle/app.rb +2 -0
  57. data/examples/verify_readme_usage/app.rb +2 -0
  58. data/examples/{widget_barchart_demo → widget_barchart}/README.md +5 -3
  59. data/examples/{widget_barchart_demo → widget_barchart}/app.rb +7 -5
  60. data/examples/{widget_block_demo → widget_block}/README.md +5 -3
  61. data/examples/{widget_block_demo → widget_block}/app.rb +6 -4
  62. data/examples/{widget_box_demo → widget_box}/README.md +7 -4
  63. data/examples/{widget_box_demo → widget_box}/app.rb +7 -5
  64. data/examples/{widget_calendar_demo → widget_calendar}/README.md +6 -3
  65. data/examples/{widget_calendar_demo → widget_calendar}/app.rb +6 -4
  66. data/examples/{widget_canvas_demo → widget_canvas}/README.md +2 -2
  67. data/examples/{widget_canvas_demo → widget_canvas}/app.rb +6 -4
  68. data/examples/{widget_cell_demo → widget_cell}/README.md +6 -3
  69. data/examples/{widget_cell_demo → widget_cell}/app.rb +7 -5
  70. data/examples/{widget_center_demo → widget_center}/README.md +2 -2
  71. data/examples/{widget_center_demo → widget_center}/app.rb +6 -4
  72. data/examples/{widget_chart_demo → widget_chart}/README.md +7 -4
  73. data/examples/{widget_chart_demo → widget_chart}/app.rb +7 -5
  74. data/examples/{widget_gauge_demo → widget_gauge}/README.md +6 -3
  75. data/examples/{widget_gauge_demo → widget_gauge}/app.rb +7 -5
  76. data/examples/widget_layout_split/README.md +5 -2
  77. data/examples/widget_layout_split/app.rb +3 -1
  78. data/examples/{widget_line_gauge_demo → widget_line_gauge}/README.md +6 -3
  79. data/examples/{widget_line_gauge_demo → widget_line_gauge}/app.rb +7 -5
  80. data/examples/{widget_list_demo → widget_list}/README.md +7 -4
  81. data/examples/{widget_list_demo → widget_list}/app.rb +7 -5
  82. data/examples/{widget_map_demo → widget_map}/README.md +7 -4
  83. data/examples/{widget_map_demo → widget_map}/app.rb +4 -2
  84. data/examples/{widget_overlay_demo → widget_overlay}/README.md +6 -3
  85. data/examples/{widget_overlay_demo → widget_overlay}/app.rb +5 -3
  86. data/examples/{widget_popup_demo → widget_popup}/README.md +7 -4
  87. data/examples/{widget_popup_demo → widget_popup}/app.rb +6 -4
  88. data/examples/{widget_ratatui_logo_demo → widget_ratatui_logo}/README.md +6 -3
  89. data/examples/{widget_ratatui_logo_demo → widget_ratatui_logo}/app.rb +8 -6
  90. data/examples/{widget_ratatui_mascot_demo → widget_ratatui_mascot}/README.md +6 -3
  91. data/examples/{widget_ratatui_mascot_demo → widget_ratatui_mascot}/app.rb +6 -4
  92. data/examples/widget_rect/README.md +5 -2
  93. data/examples/widget_rect/app.rb +2 -0
  94. data/examples/widget_render/README.md +4 -1
  95. data/examples/widget_render/app.rb +2 -0
  96. data/examples/widget_rich_text/README.md +4 -1
  97. data/examples/widget_rich_text/app.rb +2 -0
  98. data/examples/widget_scroll_text/README.md +4 -1
  99. data/examples/widget_scroll_text/app.rb +3 -1
  100. data/examples/{widget_scrollbar_demo → widget_scrollbar}/README.md +7 -4
  101. data/examples/{widget_scrollbar_demo → widget_scrollbar}/app.rb +6 -4
  102. data/examples/{widget_sparkline_demo → widget_sparkline}/README.md +6 -3
  103. data/examples/{widget_sparkline_demo → widget_sparkline}/app.rb +7 -5
  104. data/examples/widget_style_colors/README.md +4 -1
  105. data/examples/widget_style_colors/app.rb +2 -0
  106. data/examples/{widget_table_demo → widget_table}/README.md +7 -4
  107. data/examples/{widget_table_demo → widget_table}/app.rb +4 -2
  108. data/examples/{widget_tabs_demo → widget_tabs}/README.md +6 -3
  109. data/examples/{widget_tabs_demo → widget_tabs}/app.rb +7 -5
  110. data/examples/widget_text_width/README.md +5 -2
  111. data/examples/widget_text_width/app.rb +2 -0
  112. data/exe/.gitkeep +0 -0
  113. data/ext/ratatui_ruby/Cargo.lock +1 -1
  114. data/ext/ratatui_ruby/Cargo.toml +1 -1
  115. data/ext/ratatui_ruby/extconf.rb +2 -0
  116. data/ext/ratatui_ruby/src/style.rs +25 -9
  117. data/ext/ratatui_ruby/src/widgets/barchart.rs +8 -6
  118. data/ext/ratatui_ruby/src/widgets/chart.rs +26 -4
  119. data/ext/ratatui_ruby/src/widgets/table.rs +13 -5
  120. data/ext/ratatui_ruby/src/widgets/tabs.rs +49 -9
  121. data/lib/ratatui_ruby/buffer/cell.rb +2 -0
  122. data/lib/ratatui_ruby/buffer.rb +2 -0
  123. data/lib/ratatui_ruby/cell.rb +2 -0
  124. data/lib/ratatui_ruby/event/focus_gained.rb +2 -0
  125. data/lib/ratatui_ruby/event/focus_lost.rb +2 -0
  126. data/lib/ratatui_ruby/event/key/character.rb +2 -0
  127. data/lib/ratatui_ruby/event/key/media.rb +2 -0
  128. data/lib/ratatui_ruby/event/key/modifier.rb +2 -0
  129. data/lib/ratatui_ruby/event/key/navigation.rb +2 -0
  130. data/lib/ratatui_ruby/event/key/system.rb +2 -0
  131. data/lib/ratatui_ruby/event/key.rb +2 -0
  132. data/lib/ratatui_ruby/event/mouse.rb +2 -0
  133. data/lib/ratatui_ruby/event/none.rb +2 -0
  134. data/lib/ratatui_ruby/event/paste.rb +2 -0
  135. data/lib/ratatui_ruby/event/resize.rb +2 -0
  136. data/lib/ratatui_ruby/event.rb +2 -0
  137. data/lib/ratatui_ruby/frame.rb +2 -0
  138. data/lib/ratatui_ruby/layout/constraint.rb +2 -0
  139. data/lib/ratatui_ruby/layout/layout.rb +2 -0
  140. data/lib/ratatui_ruby/layout/rect.rb +2 -0
  141. data/lib/ratatui_ruby/layout.rb +2 -0
  142. data/lib/ratatui_ruby/list_state.rb +2 -0
  143. data/lib/ratatui_ruby/schema/bar_chart/bar.rb +2 -0
  144. data/lib/ratatui_ruby/schema/bar_chart/bar_group.rb +2 -0
  145. data/lib/ratatui_ruby/schema/bar_chart.rb +4 -2
  146. data/lib/ratatui_ruby/schema/block.rb +4 -2
  147. data/lib/ratatui_ruby/schema/calendar.rb +4 -2
  148. data/lib/ratatui_ruby/schema/canvas.rb +2 -0
  149. data/lib/ratatui_ruby/schema/center.rb +2 -0
  150. data/lib/ratatui_ruby/schema/chart.rb +4 -2
  151. data/lib/ratatui_ruby/schema/clear.rb +2 -0
  152. data/lib/ratatui_ruby/schema/constraint.rb +2 -0
  153. data/lib/ratatui_ruby/schema/cursor.rb +2 -0
  154. data/lib/ratatui_ruby/schema/draw.rb +2 -0
  155. data/lib/ratatui_ruby/schema/gauge.rb +4 -2
  156. data/lib/ratatui_ruby/schema/layout.rb +2 -0
  157. data/lib/ratatui_ruby/schema/line_gauge.rb +4 -2
  158. data/lib/ratatui_ruby/schema/list.rb +3 -1
  159. data/lib/ratatui_ruby/schema/list_item.rb +2 -0
  160. data/lib/ratatui_ruby/schema/overlay.rb +2 -0
  161. data/lib/ratatui_ruby/schema/paragraph.rb +2 -0
  162. data/lib/ratatui_ruby/schema/ratatui_logo.rb +4 -2
  163. data/lib/ratatui_ruby/schema/ratatui_mascot.rb +4 -2
  164. data/lib/ratatui_ruby/schema/rect.rb +2 -0
  165. data/lib/ratatui_ruby/schema/row.rb +2 -0
  166. data/lib/ratatui_ruby/schema/scrollbar.rb +4 -2
  167. data/lib/ratatui_ruby/schema/shape/label.rb +2 -0
  168. data/lib/ratatui_ruby/schema/sparkline.rb +4 -2
  169. data/lib/ratatui_ruby/schema/style.rb +2 -0
  170. data/lib/ratatui_ruby/schema/table.rb +2 -0
  171. data/lib/ratatui_ruby/schema/tabs.rb +4 -2
  172. data/lib/ratatui_ruby/schema/text.rb +2 -0
  173. data/lib/ratatui_ruby/scrollbar_state.rb +2 -0
  174. data/lib/ratatui_ruby/style/style.rb +2 -0
  175. data/lib/ratatui_ruby/style.rb +2 -0
  176. data/lib/ratatui_ruby/table_state.rb +2 -0
  177. data/lib/ratatui_ruby/test_helper/event_injection.rb +2 -0
  178. data/lib/ratatui_ruby/test_helper/snapshot.rb +2 -0
  179. data/lib/ratatui_ruby/test_helper/style_assertions.rb +2 -0
  180. data/lib/ratatui_ruby/test_helper/terminal.rb +2 -0
  181. data/lib/ratatui_ruby/test_helper/test_doubles.rb +2 -0
  182. data/lib/ratatui_ruby/test_helper.rb +5 -3
  183. data/lib/ratatui_ruby/tui/buffer_factories.rb +2 -0
  184. data/lib/ratatui_ruby/tui/canvas_factories.rb +2 -0
  185. data/lib/ratatui_ruby/tui/core.rb +2 -0
  186. data/lib/ratatui_ruby/tui/layout_factories.rb +2 -0
  187. data/lib/ratatui_ruby/tui/state_factories.rb +2 -0
  188. data/lib/ratatui_ruby/tui/style_factories.rb +2 -0
  189. data/lib/ratatui_ruby/tui/text_factories.rb +2 -0
  190. data/lib/ratatui_ruby/tui/widget_factories.rb +2 -0
  191. data/lib/ratatui_ruby/tui.rb +2 -0
  192. data/lib/ratatui_ruby/version.rb +3 -1
  193. data/lib/ratatui_ruby/widgets/bar_chart/bar.rb +2 -0
  194. data/lib/ratatui_ruby/widgets/bar_chart/bar_group.rb +2 -0
  195. data/lib/ratatui_ruby/widgets/bar_chart.rb +4 -2
  196. data/lib/ratatui_ruby/widgets/block.rb +4 -2
  197. data/lib/ratatui_ruby/widgets/calendar.rb +4 -2
  198. data/lib/ratatui_ruby/widgets/canvas.rb +2 -0
  199. data/lib/ratatui_ruby/widgets/cell.rb +2 -0
  200. data/lib/ratatui_ruby/widgets/center.rb +2 -0
  201. data/lib/ratatui_ruby/widgets/chart.rb +4 -2
  202. data/lib/ratatui_ruby/widgets/clear.rb +2 -0
  203. data/lib/ratatui_ruby/widgets/cursor.rb +2 -0
  204. data/lib/ratatui_ruby/widgets/gauge.rb +4 -2
  205. data/lib/ratatui_ruby/widgets/line_gauge.rb +4 -2
  206. data/lib/ratatui_ruby/widgets/list.rb +3 -1
  207. data/lib/ratatui_ruby/widgets/list_item.rb +2 -0
  208. data/lib/ratatui_ruby/widgets/overlay.rb +2 -0
  209. data/lib/ratatui_ruby/widgets/paragraph.rb +2 -0
  210. data/lib/ratatui_ruby/widgets/ratatui_logo.rb +4 -2
  211. data/lib/ratatui_ruby/widgets/ratatui_mascot.rb +4 -2
  212. data/lib/ratatui_ruby/widgets/row.rb +2 -0
  213. data/lib/ratatui_ruby/widgets/scrollbar.rb +4 -2
  214. data/lib/ratatui_ruby/widgets/shape/label.rb +2 -0
  215. data/lib/ratatui_ruby/widgets/sparkline.rb +4 -2
  216. data/lib/ratatui_ruby/widgets/table.rb +2 -0
  217. data/lib/ratatui_ruby/widgets/tabs.rb +12 -8
  218. data/lib/ratatui_ruby/widgets.rb +2 -0
  219. data/lib/ratatui_ruby.rb +2 -0
  220. data/tasks/autodoc/examples.rb +2 -0
  221. data/tasks/autodoc/member.rb +2 -0
  222. data/tasks/autodoc/name.rb +2 -0
  223. data/tasks/autodoc.rake +2 -0
  224. data/tasks/bump/cargo_lockfile.rb +2 -0
  225. data/tasks/bump/changelog.rb +10 -0
  226. data/tasks/bump/header.rb +2 -0
  227. data/tasks/bump/history.rb +2 -0
  228. data/tasks/bump/links.rb +2 -0
  229. data/tasks/bump/manifest.rb +2 -0
  230. data/tasks/bump/ruby_gem.rb +14 -0
  231. data/tasks/bump/sem_ver.rb +2 -0
  232. data/tasks/bump/unreleased_section.rb +18 -0
  233. data/tasks/bump.rake +2 -0
  234. data/tasks/doc.rake +268 -0
  235. data/tasks/extension.rake +2 -0
  236. data/tasks/lint.rake +115 -0
  237. data/tasks/rdoc_config.rb +18 -4
  238. data/tasks/sourcehut.rake +2 -0
  239. data/tasks/terminal_preview/app_screenshot.rb +2 -0
  240. data/tasks/terminal_preview/crash_report.rb +2 -0
  241. data/tasks/terminal_preview/example_app.rb +2 -0
  242. data/tasks/terminal_preview/launcher_script.rb +2 -0
  243. data/tasks/terminal_preview/preview_collection.rb +2 -0
  244. data/tasks/terminal_preview/preview_timing.rb +2 -0
  245. data/tasks/terminal_preview/safety_confirmation.rb +2 -0
  246. data/tasks/terminal_preview/saved_screenshot.rb +2 -0
  247. data/tasks/terminal_preview/system_appearance.rb +2 -0
  248. data/tasks/terminal_preview/terminal_window.rb +2 -0
  249. data/tasks/terminal_preview/window_id.rb +2 -0
  250. data/tasks/terminal_preview.rake +2 -0
  251. data/tasks/test.rake +2 -0
  252. data/tasks/website/index_page.rb +2 -0
  253. data/tasks/website/version.rb +12 -2
  254. data/tasks/website/version_menu.rb +2 -0
  255. data/tasks/website/versioned_documentation.rb +2 -0
  256. data/tasks/website/website.rb +2 -0
  257. data/tasks/website.rake +2 -0
  258. metadata +72 -72
  259. data/doc/contributors/architectural_overhaul/chat_conversations.md +0 -4952
  260. data/doc/contributors/architectural_overhaul/implementation_plan.md +0 -60
  261. data/doc/contributors/architectural_overhaul/task.md +0 -37
  262. /data/doc/{application_testing.md → concepts/application_testing.md} +0 -0
  263. /data/doc/{interactive_design.md → concepts/interactive_design.md} +0 -0
  264. /data/doc/images/{widget_barchart_demo.png → widget_barchart.png} +0 -0
  265. /data/doc/images/{widget_block_demo.png → widget_block.png} +0 -0
  266. /data/doc/images/{widget_box_demo.png → widget_box.png} +0 -0
  267. /data/doc/images/{widget_calendar_demo.png → widget_calendar.png} +0 -0
  268. /data/doc/images/{widget_canvas_demo.png → widget_canvas.png} +0 -0
  269. /data/doc/images/{widget_cell_demo.png → widget_cell.png} +0 -0
  270. /data/doc/images/{widget_center_demo.png → widget_center.png} +0 -0
  271. /data/doc/images/{widget_chart_demo.png → widget_chart.png} +0 -0
  272. /data/doc/images/{widget_gauge_demo.png → widget_gauge.png} +0 -0
  273. /data/doc/images/{widget_line_gauge_demo.png → widget_line_gauge.png} +0 -0
  274. /data/doc/images/{widget_list_demo.png → widget_list.png} +0 -0
  275. /data/doc/images/{widget_map_demo.png → widget_map.png} +0 -0
  276. /data/doc/images/{widget_overlay_demo.png → widget_overlay.png} +0 -0
  277. /data/doc/images/{widget_popup_demo.png → widget_popup.png} +0 -0
  278. /data/doc/images/{widget_ratatui_logo_demo.png → widget_ratatui_logo.png} +0 -0
  279. /data/doc/images/{widget_ratatui_mascot_demo.png → widget_ratatui_mascot.png} +0 -0
  280. /data/doc/images/{widget_scrollbar_demo.png → widget_scrollbar.png} +0 -0
  281. /data/doc/images/{widget_sparkline_demo.png → widget_sparkline.png} +0 -0
  282. /data/doc/images/{widget_table_demo.png → widget_table.png} +0 -0
  283. /data/doc/images/{widget_tabs_demo.png → widget_tabs.png} +0 -0
  284. /data/doc/{v0.7.0_migration.md → migration/v0_7_0.md} +0 -0
@@ -1668,7 +1668,7 @@ These are v1.0.0 quality improvements that refine the example suite after P0 is
1668
1668
  **Status:** Important for API discoverability — Documentation should link library and examples
1669
1669
 
1670
1670
  RDoc should cross-link between:
1671
- - **Library classes/methods** ↔ **Examples that use them** (See also: examples/widget_foo_demo)
1671
+ - **Library classes/methods** ↔ **Examples that use them** (See also: examples/widget_foo)
1672
1672
  - **Primary methods** ↔ **DWIM/TIMTOWTDI aliases** (See also: tui.foo_bar as alias for tui.foo(:bar))
1673
1673
 
1674
1674
  ###### Current Practice
@@ -1685,7 +1685,7 @@ Done for:
1685
1685
 
1686
1686
  ###### Action
1687
1687
 
1688
- 1. Add `# See also: examples/widget_foo_demo/app.rb` to class/method RDoc
1688
+ 1. Add `# See also: examples/widget_foo/app.rb` to class/method RDoc
1689
1689
  2. Link DWIM methods to TIMTOWTDI variants: `# Also available as: tui.constraint_length (DWIM) vs tui.constraint(:length) (TIMTOWTDI)`
1690
1690
  3. Create consistent pattern across all public APIs in `lib/ratatui_ruby/`
1691
1691
 
@@ -1694,7 +1694,7 @@ Done for:
1694
1694
  ```ruby
1695
1695
  #### Renders text with styling.
1696
1696
  #
1697
- #### See also: examples/widget_paragraph_demo/app.rb (basic paragraph rendering)
1697
+ #### See also: examples/widget_paragraph/app.rb (basic paragraph rendering)
1698
1698
  class Paragraph < Data.define(...)
1699
1699
  # ...
1700
1700
  end
@@ -1714,16 +1714,16 @@ end
1714
1714
 
1715
1715
  Current `widget_*` examples mostly focus on interactive parameter turning (changing colors, borders, etc.). While useful for API discovery, they don't show *how* to use the widget in a real application logic flow.
1716
1716
 
1717
- ###### The Standard: widget_tabs_demo
1717
+ ###### The Standard: widget_tabs
1718
1718
 
1719
- The `widget_tabs_demo` was enhanced to show **conditional rendering** of content based on the selected tab in git commit `38ceed39a011d557cc66e11a4598d3341dc7a0cc`. It doesn't just highlight the tab; it changes the screen content. This connects the widget (the tabs) to the problem it solves (view segregation).
1719
+ The `widget_tabs` was enhanced to show **conditional rendering** of content based on the selected tab in git commit `38ceed39a011d557cc66e11a4598d3341dc7a0cc`. It doesn't just highlight the tab; it changes the screen content. This connects the widget (the tabs) to the problem it solves (view segregation).
1720
1720
 
1721
1721
  ###### Action
1722
1722
 
1723
1723
  Identify other widget examples that could benefit from this "functional context" treatment:
1724
1724
 
1725
- - **widget_popup_demo:** Show a multi-step modal flow (e.g., Confirm -> Success) rather than just a static overlay.
1726
- - **widget_list_demo:** Show a master-detail view where selecting a list item updates a detail pane.
1727
- - **widget_input_demo:** (If created) Show specific validation logic (email vs number).
1725
+ - **widget_popup:** Show a multi-step modal flow (e.g., Confirm -> Success) rather than just a static overlay.
1726
+ - **widget_list:** Show a master-detail view where selecting a list item updates a detail pane.
1727
+ - **widget_input:** (If created) Show specific validation logic (email vs number).
1728
1728
 
1729
1729
  **Goal:** Every widget example should answer "How do I build a feature with this?" not just "What does this parameter do?"
@@ -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
@@ -0,0 +1,71 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: AGPL-3.0-or-later
4
+ -->
5
+
6
+ # Debugging TUI Applications
7
+
8
+ TUI applications run in raw terminal mode. stderr and stdout carry terminal escape sequences. Using `puts` or `warn` inside the render loop corrupts the display.
9
+
10
+ This creates a problem: how do you inspect variables and trace execution?
11
+
12
+ Write debug output to files. Tail them in a separate terminal.
13
+
14
+ ## File-Based Logging
15
+
16
+ Create timestamped log files to avoid overwrites:
17
+
18
+ ```ruby
19
+ FileUtils.mkdir_p(File.join(Dir.tmpdir, "my_debug"))
20
+ timestamp = Time.now.strftime('%Y%m%d_%H%M%S_%N')
21
+ File.write(
22
+ File.join(Dir.tmpdir, "my_debug", "#{timestamp}.log"),
23
+ "variable=#{value.inspect}\n"
24
+ )
25
+ ```
26
+
27
+ Or append to a single file:
28
+
29
+ ```ruby
30
+ File.write("/tmp/debug.log", "#{Time.now}: #{message}\n", mode: "a")
31
+ ```
32
+
33
+ Tail the logs in a separate terminal:
34
+
35
+ ```bash
36
+ # Single file
37
+ tail -f /tmp/debug.log
38
+
39
+ # Directory of timestamped files
40
+ watch -n 0.5 'ls -la /tmp/my_debug/ && cat /tmp/my_debug/*.log'
41
+ ```
42
+
43
+ ## REPL Debugging with `__FILE__` Guards
44
+
45
+ Unit tests verify correctness. But during exploratory debugging, you want to poke at objects interactively. Loading the full TUI just to inspect one object is slow.
46
+
47
+ Wrap your main execution in a guard:
48
+
49
+ ```ruby
50
+ if __FILE__ == $PROGRAM_NAME
51
+ MyApp.new.run
52
+ end
53
+ ```
54
+
55
+ Now load the file and interact with classes directly:
56
+
57
+ ```bash
58
+ ruby -e 'load "./bin/my_tui"; obj = MyClass.new; sleep 1; puts obj.result'
59
+ ```
60
+
61
+ This exercises domain logic without entering raw terminal mode. Use it for exploratory debugging. Write tests using the [TestHelper](application_testing.md) for regression coverage.
62
+
63
+ ## Isolating Terminal Issues
64
+
65
+ Something works in a `ruby -e` script but fails in the TUI. Common causes:
66
+
67
+ 1. **Thread context.** Ruby threads share the process's terminal state.
68
+ 2. **Raw mode.** External commands fail when stdin/stdout are reconfigured.
69
+ 3. **SSH/Git auth.** Commands that prompt for credentials hang or return empty.
70
+
71
+ See [Async Operations](async.md) for solutions.
@@ -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
+
@@ -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)