Commit Graph

11 Commits

Author SHA1 Message Date
148fd88660 Add fill/screen_fill primitives and string style support
New drawing primitives:
  fill(x:, y:, w:, h:, bg:)   — fills a rectangle with background color
  screen_fill(bg:)             — fills the entire terminal

Box now accepts bg: which fills its interior with a background color.

All drawing methods (text, bar, list, box) now accept raw ANSI escape
strings as style/highlight values in addition to named symbols.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:52:59 +02:00
cac10176a2 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>
2026-05-11 21:30:06 +02:00
8a3e38aa25 Add NAWS terminal size negotiation and dynamic dimensions
- Negotiate NAWS (option 31) on connect to receive terminal cols/rows
- Expose term_cols/term_rows on Session (default 80×24)
- Add term_cols/term_rows helpers to TUIRunner::Context
- Make bar() default width dynamic via term_cols

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:05:44 +02:00
73c711336d TUI 2026-05-11 20:24:40 +02:00
15cd593b33 Update README: new primitives, fetch/pick, BBS::Color
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 10:41:39 +02:00
bd8aa51684 Add BBS::Color module with c() helper
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 10:34:36 +02:00
c01159dc23 Add fetch, pick, body, output primitives
fetch: loading-indicator + ctx store for API calls
pick: numbered list with selection and sub-flow drill-down
body: word-wrapped article text (strip markdown, reflow)
output: raw string block for complex multi-line content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 09:27:45 +02:00
272e75bd6f new primitives 2026-04-29 17:50:45 +02:00
d9232eabb4 upgrade for our main bbs server 2026-04-28 22:47:52 +02:00
ce005cdb1b Add README with full gem documentation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 22:35:00 +02:00
4690ade510 Initial commit: extracted from impostor-bbs gems/bbs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 22:18:57 +02:00