Commit Graph

22 Commits

Author SHA1 Message Date
11c26a5b63 theme dsl 2026-05-13 18:34:25 +02:00
04eaebdc21 fix 2026-05-13 18:26:35 +02:00
40c9397e12 exit fix 2026-05-12 22:38:51 +02:00
4ffc6243c0 new framework fix 2026-05-12 22:36:33 +02:00
9ae939a213 ascii art 2026-05-12 22:30:56 +02:00
953498a62d new framework 2026-05-12 22:15:07 +02:00
be21826ecc list_view 2026-05-12 21:25:21 +02:00
da5acfd55e refact 2026-05-12 20:49:45 +02:00
3588245624 new message helper 2026-05-12 20:36:28 +02:00
da752535b6 modal 2026-05-12 20:32:10 +02:00
88ef31d8b6 tui helpers 2026-05-12 20:22:53 +02:00
5ced101328 frame buffer 2026-05-12 19:18:11 +02:00
4eca9513a8 Add nav DSL to TUI::Page; helpers accumulates across calls
Page#nav sets up up/down key handlers for four common patterns:
  nav :menu,   size:    – wrapping @menu_sel selection
  nav :cycle           – wrapping @item_sel over @items
  nav :list,   window: – @item_sel/@scroll with a visible window
  nav :scroll, content:, window: – @scroll over arbitrary content

size/window accept an integer or a lambda evaluated on the Context
at runtime, so terminal-size-dependent values work naturally.

TUI#helpers now accumulates into one module instead of replacing it,
so configure methods on page classes can each extend helpers without
clobbering previous calls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 22:17:31 +02:00
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
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
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