Add page-based TUI DSL

Each screen is now a self-contained `page` block with its own `enter`,
`render`, and `key` handlers. Shared logic lives in a `helpers` block
mixed into the render context. A `chrome` block renders persistent UI
(header, sidebar, footer) before every frame.

New context primitives: `go(page)` for transitions, `reload` to re-run
the current page's `enter` block, `printable` key binding for text input.

`FlowRunner#run_tui` now passes the flow context to TUIRunner so username
and other session data are available without reaching into internals.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 21:30:06 +02:00
parent 8a3e38aa25
commit cac10176a2
4 changed files with 74 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'bbs'
s.version = '0.1.0'
s.version = '0.2.0'
s.summary = 'Universal telnet BBS server library'
s.author = 'Zsolt Tasnadi'
s.files = Dir['lib/**/*.rb']