zhangheng b9cc578d28 feat(terminal): mouse reporting (P2)
Implement xterm-compatible mouse reporting so vim, htop, btm, tmux, etc.
can receive click / drag / wheel events.

Core:
- Expose `mouse_protocol_mode()` and `mouse_protocol_encoding()` on
  `TerminalCore`, re-exporting the vt100 enums.

Component:
- Add `MouseAction`, `mouse_button_base`, `with_mouse_modifiers`,
  `encode_mouse_report`, and `pixel_to_grid` pure helpers.
- Support SGR (1006), Default, and UTF-8 encodings.  SGR is fully correct
  and ASCII-only; Default/UTF-8 are correct for the common ≤94 col/row
  range.
- Wire `on:mousedown` / `on:mouseup` / `on:mousemove` to report mouse
  events when the app enabled mouse reporting; otherwise fall back to
  local text selection.
- Shift+click bypasses mouse reporting and forces local selection (xterm
  behaviour).
- Throttle motion reports to one per grid cell.
- Report vertical/horizontal wheel ticks as buttons 64/65/66/67 when
  mouse reporting is active, otherwise keep the existing alt-screen
  arrow-key paging.

Tests: 23/23 pass, clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 14:57:36 +08:00
2026-06-18 14:57:36 +08:00

BASE_PATH Demo

Minimal Leptos SSR project that reuses a few components from ui to validate SiteConfig::BASE_PATH.

The public app path is /rustui, while Leptos SSR routes are still declared as /, /check, and /deep/nested. The server strips /rustui before route matching, and the client router uses /rustui as its base.

cargo leptos watch

Then open:

  • http://127.0.0.1:3100/rustui
  • http://127.0.0.1:3100/rustui/check
  • http://127.0.0.1:3100/rustui/deep/nested

Change app_config/src/lib.rs to test another base path.

Description
No description provided
Readme 5.1 MiB
Languages
Rust 88.8%
CSS 7.6%
JavaScript 3.6%